API Reference of GS2-LoginReward SDK

Model

Namespace

Namespace

Namespace is a mechanism that allows multiple uses of the same service for different purposes within a single project. Basically, GS2 services have a layer called namespace, and different namespaces are treated as completely different data spaces, even for the same service.

Therefore, it is necessary to create a namespace before starting to use each service.

TypeConditionRequireDefaultLimitationDescription
namespaceIdstring~ 1024 charsNamespace GRN
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
receiveScriptScriptSettingScript to run when receiving rewards
logSettingLogSettingLog output settings
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

BonusModelMaster

Bonus Model Set the distribution schedule of login bonuses. There are two types of distribution schedules: “Schedule Mode” and “Streaming Mode”.

In Schedule Mode, the GS2-Schedule event is required, and the bonus is distributed based on the number of days elapsed since the start of the event. If you miss a shot in the middle, you will not receive the bonus for that shot.

In Streaming Mode, the rewards set for the bonus are distributed one by one from the beginning every day. In Streaming Mode, you can set it to repeat. In that case, if you reach the end of the stream, you will start distributing from the beginning again.

Both Schedule Mode and Streaming Mode have a rescue function for missed shots. By paying a certain cost, you can receive the bonus you missed. However, if the GS2-Schedule event is associated, you can only receive the bonus after the number of days elapsed since the start of the event. The missed capture function is not available in streaming mode and when repetition is enabled.

The maximum number of days of bonuses that can be set in both Scheduled and Streaming modes is 100 days.

TypeConditionRequireDefaultLimitationDescription
bonusModelIdstring~ 1024 charsLogin Reward Model Master Data GRN
namestring~ 128 charsLogin Bonus Model Name
descriptionstring~ 1024 charsDescription
metadatastring~ 2048 charsmetadata
modeenum {
    “schedule”,
    “streaming”
}
~ 128 charsmode
periodEventIdstring~ 1024 charsGS2-Schedule Event GRN that represents the period during which to enable login bonuses
resetHourint{periodEventId} == ""~ 23Reset time of the receive flag (UTC)
repeatenum {
    “enabled”,
    “disabled”
}
{mode} == “streaming”~ 128 charsWhether to repeat when the end of the stream is reached
rewardsList<Reward>~ 100 itemsList of rewards
missedReceiveReliefenum {
    “enabled”,
    “disabled”
}
“disabled”~ 128 charsMissed Rescue Function
missedReceiveReliefVerifyActionsList<VerifyAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of verify actions for missed receive relief
missedReceiveReliefConsumeActionsList<ConsumeAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of consumption actions for missed receive relief
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

Enumeration type definition to specify as mode

Enumerator String DefinitionDescription
scheduleSchedule Mode
streamingStreaming Mode

Enumeration type definition to specify as repeat

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Enumeration type definition to specify as missedReceiveRelief

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

CurrentBonusMaster

Currently available master data

GS2 uses JSON format files for master data management. By uploading the file, you can actually reflect the settings on the server.

We provide a master data editor on the management console as a way to create JSON files, but you can also create JSON files using the The service can also be used by creating a tool more appropriate for game management and exporting a JSON file in the appropriate format.

TypeConditionRequireDefaultLimitationDescription
namespaceIdstring~ 1024 charsCurrently available login reward master data GRN
settingsstring~ 5242880 charsMaster data

BonusModel

Bonus Model Set the distribution schedule of login bonuses. There are two types of distribution schedules: “Schedule Mode” and “Streaming Mode”.

In Schedule Mode, the GS2-Schedule event is required, and the bonus is distributed based on the number of days elapsed since the start of the event. If you miss a shot in the middle, you will not receive the bonus for that shot.

In Streaming Mode, the rewards set for the bonus are distributed one by one from the beginning every day. In Streaming Mode, you can set it to repeat. In that case, if you reach the end of the stream, you will start distributing from the beginning again.

Both Schedule Mode and Streaming Mode have a rescue function for missed shots. By paying a certain cost, you can receive the bonus you missed. However, if the GS2-Schedule event is associated, you can only receive the bonus after the number of days elapsed since the start of the event. The missed capture function is not available in streaming mode and when repetition is enabled.

The maximum number of days of bonuses that can be set in both Scheduled and Streaming modes is 100 days.

TypeConditionRequireDefaultLimitationDescription
bonusModelIdstring~ 1024 charsLogin Bonus Model GRN
namestring~ 128 charsBonus Model Name
metadatastring~ 2048 charsmetadata
modeenum {
    “schedule”,
    “streaming”
}
~ 128 charsmode
periodEventIdstring~ 1024 charsGS2-Schedule Event GRN that represents the period during which to enable login bonuses
resetHourint{periodEventId} == ""~ 23Reset time of the receive flag (UTC)
repeatenum {
    “enabled”,
    “disabled”
}
{mode} == “streaming”~ 128 charsReset time of the receive flag (UTC)
rewardsList<Reward>~ 100 itemsList of rewards
missedReceiveReliefenum {
    “enabled”,
    “disabled”
}
“disabled”~ 128 charsMissed Rescue Function
missedReceiveReliefVerifyActionsList<VerifyAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of verify actions for missed receive relief
missedReceiveReliefConsumeActionsList<ConsumeAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of consume actions for missed receive relief

Enumeration type definition to specify as mode

Enumerator String DefinitionDescription
scheduleSchedule Mode
streamingStreaming Mode

Enumeration type definition to specify as repeat

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Enumeration type definition to specify as missedReceiveRelief

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Reward

Reward

TypeConditionRequireDefaultLimitationDescription
acquireActionsList<AcquireAction>1 ~ 10 itemsList of Acquire Action

ReceiveStatus

Receive status

This model holds the receive status of login bonuses.

TypeConditionRequireDefaultLimitationDescription
receiveStatusIdstring~ 1024 charsReceive status GRN
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
receivedStepsList<bool>~ 100 itemsList of received flags
lastReceivedAtlong0Last received time (Unix time unit:milliseconds)
createdAtlongNowDatetime of creation (Unix time unit:milliseconds)
updatedAtlongNowDatetime of last update (Unix time unit:milliseconds)
revisionlong0~ 9223372036854775805Revision

ConsumeAction

Consume Action

TypeConditionRequireDefaultLimitationDescription
actionenum {
"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",
"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~ 1048576 charsJSON of request

AcquireAction

Acquire Action

TypeConditionRequireDefaultLimitationDescription
actionenum {
"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",
"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~ 1048576 charsJSON of request

VerifyAction

Verify Action

TypeConditionRequireDefaultLimitationDescription
actionenum {
"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",
}
~ 128 charsTypes of actions to be performed in the verify task
requeststring~ 1048576 charsJSON of request

Config

Configration

Set values to be applied to transaction variables

TypeConditionRequireDefaultLimitationDescription
keystring~ 64 charsName
valuestring~ 51200 charsValue

GitHubCheckoutSetting

Setup to check out master data from GitHub

TypeConditionRequireDefaultLimitationDescription
apiKeyIdstring~ 1024 charsGitHub API key GRN
repositoryNamestring~ 1024 charsRepository Name
sourcePathstring~ 1024 charsSource code file path
referenceTypeenum {
    “commit_hash”,
    “branch”,
    “tag”
}
~ 128 charsSource of code
commitHashstring{referenceType} == “commit_hash”~ 1024 charsCommit hash
branchNamestring{referenceType} == “branch”~ 1024 charsBranch Name
tagNamestring{referenceType} == “tag”~ 1024 charsTag Name

Enumeration type definition to specify as referenceType

Enumerator String DefinitionDescription
commit_hashCommit hash
branchBranch
tagTag

LogSetting

Log setting

This type manages log output settings. This type holds the identifier of the log namespace used to output log data. The log namespace ID specifies the GS2-Log namespace to aggregate and store the log data. Through this setting, API request and response log data under this namespace will be output to the target GS2-Log. GS2-Log provides logs in real time, which can be used for system monitoring, analysis, debugging, etc.

TypeConditionRequireDefaultLimitationDescription
loggingNamespaceIdstring~ 1024 charsNamespace GRN

TransactionSetting

Transaction settings

TypeConditionRequireDefaultLimitationDescription
enableAutoRunboolfalseAutomatically run issued transactions on the server side, or
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor namespace used for transaction execution
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsNamespace in GS2-JobQueue used to run the transaction

ScriptSetting

Script settings

In GS2, you can associate custom scripts with microservice events and execute them. This model holds the settings for triggering script execution.

There are two main ways to execute a script: synchronous execution and asynchronous execution. Synchronous execution blocks processing until the script has finished executing. Instead, you can use the script execution result to stop the execution of the API or to tamper with the result of the API.

On the other hand, asynchronous execution does not block processing until the script has finished executing. Instead, you can use the script execution result to stop the execution of the API or to tamper with the result of the API. However, asynchronous execution does not block processing until the script has finished executing, so it is generally recommended to use asynchronous execution.

There are two types of asynchronous execution methods: GS2-Script and Amazon EventBridge. By using Amazon EventBridge, you can write processing in languages other than Lua.

TypeConditionRequireDefaultLimitationDescription
triggerScriptIdstring~ 1024 charsScript GRN
doneTriggerTargetTypeenum {
    “none”,
    “gs2_script”,
    “aws”
}
“none”~ 128 charsNotification of Completion
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsScript GRN
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsNamespace GRN

Enumeration type definition to specify as doneTriggerTargetType

Enumerator String DefinitionDescription
noneNone
gs2_scriptGS2-Script
awsAmazon EventBridge

Methods

describeNamespaces

Get list of namespaces

Request

TypeConditionRequireDefaultLimitationDescription
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<Namespace>List of Namespace
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &login_reward.DescribeNamespacesRequest {
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DescribeNamespacesRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DescribeNamespacesRequest;
import io.gs2.loginReward.result.DescribeNamespacesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DescribeNamespacesResult result = client.describeNamespaces(
        new DescribeNamespacesRequest()
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DescribeNamespacesRequest;
using Gs2.Gs2LoginReward.Result.DescribeNamespacesResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2LoginReward.Request.DescribeNamespacesRequest()
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.describeNamespaces(
        new Gs2LoginReward.DescribeNamespacesRequest()
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.describe_namespaces(
        login_reward.DescribeNamespacesRequest()
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.describe_namespaces({
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('loginReward')

api_result_handler = client.describe_namespaces_async({
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createNamespace

Create a new namespace

Request

TypeConditionRequireDefaultLimitationDescription
namestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
receiveScriptScriptSettingScript to run when receiving rewards
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceNamespace created

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &login_reward.CreateNamespaceRequest {
        Name: pointy.String("namespace1"),
        Description: nil,
        TransactionSetting: &loginReward.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
            KeyId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001"),
        },
        ReceiveScript: nil,
        LogSetting: &loginReward.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\CreateNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName(self::namespace1)
            ->withDescription(null)
            ->withTransactionSetting((new \Gs2\LoginReward\Model\TransactionSetting())
                ->withEnableAutoRun(False)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
                ->withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:\namespace1:key:key-0001"))
            ->withReceiveScript(null)
            ->withLogSetting((new \Gs2\LoginReward\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.CreateNamespaceRequest;
import io.gs2.loginReward.result.CreateNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withTransactionSetting(new io.gs2.loginReward.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
                .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001"))
            .withReceiveScript(null)
            .withLogSetting(new io.gs2.loginReward.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.CreateNamespaceRequest;
using Gs2.Gs2LoginReward.Result.CreateNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2LoginReward.Request.CreateNamespaceRequest()
        .WithName("namespace1")
        .WithDescription(null)
        .WithTransactionSetting(new Gs2.Gs2LoginReward.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
            .WithKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001"))
        .WithReceiveScript(null)
        .WithLogSetting(new Gs2.Gs2LoginReward.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.createNamespace(
        new Gs2LoginReward.CreateNamespaceRequest()
            .withName("namespace1")
            .withDescription(null)
            .withTransactionSetting(new Gs2LoginReward.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
                .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001"))
            .withReceiveScript(null)
            .withLogSetting(new Gs2LoginReward.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.create_namespace(
        login_reward.CreateNamespaceRequest()
            .with_name(self.hash1)
            .with_description(None)
            .with_transaction_setting(
                login_reward.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001')
                    .with_key_id('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001'))
            .with_receive_script(None)
            .with_log_setting(
                login_reward.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.create_namespace({
    name="namespace1",
    description=nil,
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
        keyId="grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001",
    },
    receiveScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.create_namespace_async({
    name="namespace1",
    description=nil,
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
        keyId="grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0001",
    },
    receiveScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

getNamespaceStatus

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
statusstring

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &login_reward.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetNamespaceStatusRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName(self::namespace1)
    );
    $status = $result->getStatus();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetNamespaceStatusRequest;
import io.gs2.loginReward.result.GetNamespaceStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetNamespaceStatusResult result = client.getNamespaceStatus(
        new GetNamespaceStatusRequest()
            .withNamespaceName("namespace1")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetNamespaceStatusRequest;
using Gs2.Gs2LoginReward.Result.GetNamespaceStatusResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2LoginReward.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getNamespaceStatus(
        new Gs2LoginReward.GetNamespaceStatusRequest()
            .withNamespaceName("namespace1")
    );
    const status = result.getStatus();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_namespace_status(
        login_reward.GetNamespaceStatusRequest()
            .with_namespace_name(self.hash1)
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_namespace_status({
    namespaceName="namespace1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
status = result.status;
client = gs2('loginReward')

api_result_handler = client.get_namespace_status_async({
    namespaceName="namespace1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
status = result.status;

getNamespace

Get namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceNamespace

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &login_reward.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetNamespaceRequest;
import io.gs2.loginReward.result.GetNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetNamespaceResult result = client.getNamespace(
        new GetNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetNamespaceRequest;
using Gs2.Gs2LoginReward.Result.GetNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2LoginReward.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getNamespace(
        new Gs2LoginReward.GetNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_namespace(
        login_reward.GetNamespaceRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_namespace({
    namespaceName="namespace1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.get_namespace_async({
    namespaceName="namespace1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

updateNamespace

Update namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSettingTransaction settings
receiveScriptScriptSettingScript to run when receiving rewards
logSettingLogSettingLog output settings

Result

TypeDescription
itemNamespaceUpdated namespace

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &login_reward.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
        Description: pointy.String("description1"),
        TransactionSetting: &loginReward.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
            KeyId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002"),
        },
        ReceiveScript: nil,
        LogSetting: &loginReward.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\UpdateNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName(self::namespace1)
            ->withDescription("description1")
            ->withTransactionSetting((new \Gs2\LoginReward\Model\TransactionSetting())
                ->withEnableAutoRun(False)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
                ->withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:\namespace1:key:key-0002"))
            ->withReceiveScript(null)
            ->withLogSetting((new \Gs2\LoginReward\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:\namespace1"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.UpdateNamespaceRequest;
import io.gs2.loginReward.result.UpdateNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withTransactionSetting(new io.gs2.loginReward.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
                .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002"))
            .withReceiveScript(null)
            .withLogSetting(new io.gs2.loginReward.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.UpdateNamespaceRequest;
using Gs2.Gs2LoginReward.Result.UpdateNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2LoginReward.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace1")
        .WithDescription("description1")
        .WithTransactionSetting(new Gs2.Gs2LoginReward.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
            .WithKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002"))
        .WithReceiveScript(null)
        .WithLogSetting(new Gs2.Gs2LoginReward.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.updateNamespace(
        new Gs2LoginReward.UpdateNamespaceRequest()
            .withNamespaceName("namespace1")
            .withDescription("description1")
            .withTransactionSetting(new Gs2LoginReward.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002")
                .withKeyId("grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002"))
            .withReceiveScript(null)
            .withLogSetting(new Gs2LoginReward.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.update_namespace(
        login_reward.UpdateNamespaceRequest()
            .with_namespace_name(self.hash1)
            .with_description('description1')
            .with_transaction_setting(
                login_reward.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002')
                    .with_key_id('grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002'))
            .with_receive_script(None)
            .with_log_setting(
                login_reward.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.update_namespace({
    namespaceName="namespace1",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
        keyId="grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002",
    },
    receiveScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace1",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
        keyId="grn:gs2:ap-northeast-1:YourOwnerId:key:namespace1:key:key-0002",
    },
    receiveScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace1",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

deleteNamespace

Delete namespace

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemNamespaceDeleted namespace

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &login_reward.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DeleteNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DeleteNamespaceRequest;
import io.gs2.loginReward.result.DeleteNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DeleteNamespaceResult result = client.deleteNamespace(
        new DeleteNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DeleteNamespaceRequest;
using Gs2.Gs2LoginReward.Result.DeleteNamespaceResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2LoginReward.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.deleteNamespace(
        new Gs2LoginReward.DeleteNamespaceRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.delete_namespace(
        login_reward.DeleteNamespaceRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.delete_namespace({
    namespaceName="namespace1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.delete_namespace_async({
    namespaceName="namespace1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

dumpUserDataByUserId

Get dump data of the data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &login_reward.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DumpUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DumpUserDataByUserIdRequest;
import io.gs2.loginReward.result.DumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DumpUserDataByUserIdResult result = client.dumpUserDataByUserId(
        new DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DumpUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.DumpUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.DumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.dumpUserDataByUserId(
        new Gs2LoginReward.DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.dump_user_data_by_user_id(
        login_reward.DumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
client = gs2('loginReward')

api_result_handler = client.dump_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result

checkDumpUserDataByUserId

Check if the dump of the data associated with the specified user ID is complete

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of output data

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &login_reward.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\CheckDumpUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.loginReward.result.CheckDumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    CheckDumpUserDataByUserIdResult result = client.checkDumpUserDataByUserId(
        new CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.CheckDumpUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.CheckDumpUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.CheckDumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.checkDumpUserDataByUserId(
        new Gs2LoginReward.CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.check_dump_user_data_by_user_id(
        login_reward.CheckDumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.check_dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
url = result.url;
client = gs2('loginReward')

api_result_handler = client.check_dump_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
url = result.url;

cleanUserDataByUserId

Get clean data of the data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &login_reward.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\CleanUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.CleanUserDataByUserIdRequest;
import io.gs2.loginReward.result.CleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    CleanUserDataByUserIdResult result = client.cleanUserDataByUserId(
        new CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.CleanUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.CleanUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.CleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.cleanUserDataByUserId(
        new Gs2LoginReward.CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.clean_user_data_by_user_id(
        login_reward.CleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
client = gs2('loginReward')

api_result_handler = client.clean_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result

checkCleanUserDataByUserId

Check if the clean of the data associated with the specified user ID is complete

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &login_reward.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\CheckCleanUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.loginReward.result.CheckCleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    CheckCleanUserDataByUserIdResult result = client.checkCleanUserDataByUserId(
        new CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.CheckCleanUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.CheckCleanUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.CheckCleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.checkCleanUserDataByUserId(
        new Gs2LoginReward.CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.check_clean_user_data_by_user_id(
        login_reward.CheckCleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.check_clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
client = gs2('loginReward')

api_result_handler = client.check_clean_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result

prepareImportUserDataByUserId

Start importing data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
uploadTokenstringToken used to reflect results after upload
uploadUrlstringURL used to upload user data

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &login_reward.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\PrepareImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.loginReward.result.PrepareImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    PrepareImportUserDataByUserIdResult result = client.prepareImportUserDataByUserId(
        new PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.PrepareImportUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.PrepareImportUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.PrepareImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.prepareImportUserDataByUserId(
        new Gs2LoginReward.PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.prepare_import_user_data_by_user_id(
        login_reward.PrepareImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.prepare_import_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;
client = gs2('loginReward')

api_result_handler = client.prepare_import_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

importUserDataByUserId

Start importing data associated with the specified user ID

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
uploadTokenstring~ 1024 charsToken received in preparation for upload
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &login_reward.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\ImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.ImportUserDataByUserIdRequest;
import io.gs2.loginReward.result.ImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    ImportUserDataByUserIdResult result = client.importUserDataByUserId(
        new ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.ImportUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.ImportUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.ImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.importUserDataByUserId(
        new Gs2LoginReward.ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.import_user_data_by_user_id(
        login_reward.ImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
client = gs2('loginReward')

api_result_handler = client.import_user_data_by_user_id_async({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result

checkImportUserDataByUserId

Check if the import of the data associated with the specified user ID is complete

Request

TypeConditionRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
uploadTokenstring~ 1024 charsToken received in preparation for upload
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
urlstringURL of log data

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &login_reward.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\CheckImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.CheckImportUserDataByUserIdRequest;
import io.gs2.loginReward.result.CheckImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    CheckImportUserDataByUserIdResult result = client.checkImportUserDataByUserId(
        new CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.CheckImportUserDataByUserIdRequest;
using Gs2.Gs2LoginReward.Result.CheckImportUserDataByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2LoginReward.Request.CheckImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.checkImportUserDataByUserId(
        new Gs2LoginReward.CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.check_import_user_data_by_user_id(
        login_reward.CheckImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.check_import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
url = result.url;
client = gs2('loginReward')

api_result_handler = client.check_import_user_data_by_user_id_async({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
url = result.url;

describeBonusModelMasters

Obtain list of Login Bonus Model Masters

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<BonusModelMaster>List of Login Bonus Model Masters
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DescribeBonusModelMasters(
    &login_reward.DescribeBonusModelMastersRequest {
        NamespaceName: pointy.String("namespace1"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DescribeBonusModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeBonusModelMasters(
        (new DescribeBonusModelMastersRequest())
            ->withNamespaceName(self::namespace1)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DescribeBonusModelMastersRequest;
import io.gs2.loginReward.result.DescribeBonusModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DescribeBonusModelMastersResult result = client.describeBonusModelMasters(
        new DescribeBonusModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    List<BonusModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DescribeBonusModelMastersRequest;
using Gs2.Gs2LoginReward.Result.DescribeBonusModelMastersResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DescribeBonusModelMastersResult> asyncResult = null;
yield return client.DescribeBonusModelMasters(
    new Gs2.Gs2LoginReward.Request.DescribeBonusModelMastersRequest()
        .WithNamespaceName("namespace1")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.describeBonusModelMasters(
        new Gs2LoginReward.DescribeBonusModelMastersRequest()
            .withNamespaceName("namespace1")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.describe_bonus_model_masters(
        login_reward.DescribeBonusModelMastersRequest()
            .with_namespace_name(self.hash1)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.describe_bonus_model_masters({
    namespaceName="namespace1",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('loginReward')

api_result_handler = client.describe_bonus_model_masters_async({
    namespaceName="namespace1",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createBonusModelMaster

Create a new Login Bonus Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
namestring~ 128 charsLogin Bonus Model Name
descriptionstring~ 1024 charsDescription
metadatastring~ 2048 charsmetadata
modeenum {
    “schedule”,
    “streaming”
}
~ 128 charsmode
periodEventIdstring~ 1024 charsGS2-Schedule Event GRN that represents the period during which to enable login bonuses
resetHourint{periodEventId} == ""~ 23Reset time of the receive flag (UTC)
repeatenum {
    “enabled”,
    “disabled”
}
{mode} == “streaming”~ 128 charsWhether to repeat when the end of the stream is reached
rewardsList<Reward>~ 100 itemsList of rewards
missedReceiveReliefenum {
    “enabled”,
    “disabled”
}
“disabled”~ 128 charsMissed Rescue Function
missedReceiveReliefVerifyActionsList<VerifyAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of verify actions for missed receive relief
missedReceiveReliefConsumeActionsList<ConsumeAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of consumption actions for missed receive relief

Enumeration type definition to specify as mode

Enumerator String DefinitionDescription
scheduleSchedule Mode
streamingStreaming Mode

Enumeration type definition to specify as repeat

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Enumeration type definition to specify as missedReceiveRelief

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Result

TypeDescription
itemBonusModelMasterCreated Login Bonus Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.CreateBonusModelMaster(
    &login_reward.CreateBonusModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Name: pointy.String("bonusModel-0001"),
        Description: nil,
        Metadata: nil,
        Mode: pointy.String("schedule"),
        PeriodEventId: pointy.String("grn:gs2:schedule:grn-0001"),
        ResetHour: nil,
        Repeat: nil,
        Rewards: []loginReward.Reward{
            loginReward.Reward{
                AcquireActions: []loginReward.AcquireAction{
                    loginReward.AcquireAction{
                        Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    },
                },
            },
            loginReward.Reward{
                AcquireActions: []loginReward.AcquireAction{
                    loginReward.AcquireAction{
                        Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    },
                },
            },
            loginReward.Reward{
                AcquireActions: []loginReward.AcquireAction{
                    loginReward.AcquireAction{
                        Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    },
                },
            },
        },
        MissedReceiveRelief: pointy.String("disabled"),
        MissedReceiveReliefVerifyActions: nil,
        MissedReceiveReliefConsumeActions: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\CreateBonusModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->createBonusModelMaster(
        (new CreateBonusModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withName("bonusModel-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMode("schedule")
            ->withPeriodEventId("grn:gs2:schedule:grn-0001")
            ->withResetHour(null)
            ->withRepeat(null)
            ->withRewards([
                (new \Gs2\LoginReward\Model\Reward())
                    ->withAcquireActions([
                        (new \Gs2\LoginReward\Model\AcquireAction())
                            ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                            ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                (new \Gs2\LoginReward\Model\Reward())
                    ->withAcquireActions([
                        (new \Gs2\LoginReward\Model\AcquireAction())
                            ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                            ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                (new \Gs2\LoginReward\Model\Reward())
                    ->withAcquireActions([
                        (new \Gs2\LoginReward\Model\AcquireAction())
                            ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                            ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
            ])
            ->withMissedReceiveRelief("disabled")
            ->withMissedReceiveReliefVerifyActions(null)
            ->withMissedReceiveReliefConsumeActions(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.CreateBonusModelMasterRequest;
import io.gs2.loginReward.result.CreateBonusModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    CreateBonusModelMasterResult result = client.createBonusModelMaster(
        new CreateBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("bonusModel-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMode("schedule")
            .withPeriodEventId("grn:gs2:schedule:grn-0001")
            .withResetHour(null)
            .withRepeat(null)
            .withRewards(Arrays.asList(
                new io.gs2.loginReward.model.Reward()
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.loginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
                    )),
                new io.gs2.loginReward.model.Reward()
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.loginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
                    )),
                new io.gs2.loginReward.model.Reward()
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.loginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
                    ))
            ))
            .withMissedReceiveRelief("disabled")
            .withMissedReceiveReliefVerifyActions(null)
            .withMissedReceiveReliefConsumeActions(null)
    );
    BonusModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.CreateBonusModelMasterRequest;
using Gs2.Gs2LoginReward.Result.CreateBonusModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.CreateBonusModelMasterResult> asyncResult = null;
yield return client.CreateBonusModelMaster(
    new Gs2.Gs2LoginReward.Request.CreateBonusModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithName("bonusModel-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMode("schedule")
        .WithPeriodEventId("grn:gs2:schedule:grn-0001")
        .WithResetHour(null)
        .WithRepeat(null)
        .WithRewards(new Gs2.Gs2LoginReward.Model.Reward[] {
            new Gs2.Gs2LoginReward.Model.Reward()
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                        .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                }),
            new Gs2.Gs2LoginReward.Model.Reward()
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                        .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                }),
            new Gs2.Gs2LoginReward.Model.Reward()
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                        .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                }),
        })
        .WithMissedReceiveRelief("disabled")
        .WithMissedReceiveReliefVerifyActions(null)
        .WithMissedReceiveReliefConsumeActions(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.createBonusModelMaster(
        new Gs2LoginReward.CreateBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withName("bonusModel-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMode("schedule")
            .withPeriodEventId("grn:gs2:schedule:grn-0001")
            .withResetHour(null)
            .withRepeat(null)
            .withRewards([
                new Gs2LoginReward.model.Reward()
                    .withAcquireActions([
                        new Gs2LoginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                new Gs2LoginReward.model.Reward()
                    .withAcquireActions([
                        new Gs2LoginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                new Gs2LoginReward.model.Reward()
                    .withAcquireActions([
                        new Gs2LoginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
            ])
            .withMissedReceiveRelief("disabled")
            .withMissedReceiveReliefVerifyActions(null)
            .withMissedReceiveReliefConsumeActions(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.create_bonus_model_master(
        login_reward.CreateBonusModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_name('bonusModel-0001')
            .with_description(None)
            .with_metadata(None)
            .with_mode('schedule')
            .with_period_event_id('grn:gs2:schedule:grn-0001')
            .with_reset_hour(None)
            .with_repeat(None)
            .with_rewards([
                login_reward.Reward()
                    .with_acquire_actions([
                        login_reward.AcquireAction()
                            .with_action('Gs2Stamina:RecoverStaminaByUserId')
                            .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
                    ]),
                login_reward.Reward()
                    .with_acquire_actions([
                        login_reward.AcquireAction()
                            .with_action('Gs2Stamina:RecoverStaminaByUserId')
                            .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
                    ]),
                login_reward.Reward()
                    .with_acquire_actions([
                        login_reward.AcquireAction()
                            .with_action('Gs2Stamina:RecoverStaminaByUserId')
                            .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
                    ]),
            ])
            .with_missed_receive_relief('disabled')
            .with_missed_receive_relief_verify_actions(None)
            .with_missed_receive_relief_consume_actions(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.create_bonus_model_master({
    namespaceName="namespace1",
    name="bonusModel-0001",
    description=nil,
    metadata=nil,
    mode="schedule",
    periodEventId="grn:gs2:schedule:grn-0001",
    resetHour=nil,
    repeat=nil,
    rewards={
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        }
    },
    missedReceiveRelief="disabled",
    missedReceiveReliefVerifyActions=nil,
    missedReceiveReliefConsumeActions=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.create_bonus_model_master_async({
    namespaceName="namespace1",
    name="bonusModel-0001",
    description=nil,
    metadata=nil,
    mode="schedule",
    periodEventId="grn:gs2:schedule:grn-0001",
    resetHour=nil,
    repeat=nil,
    rewards={
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        }
    },
    missedReceiveRelief="disabled",
    missedReceiveReliefVerifyActions=nil,
    missedReceiveReliefConsumeActions=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

getBonusModelMaster

Get Login Bonus Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsLogin Bonus Model Name

Result

TypeDescription
itemBonusModelMasterLogin Bonus Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetBonusModelMaster(
    &login_reward.GetBonusModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonusModel-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetBonusModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getBonusModelMaster(
        (new GetBonusModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonusModel-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetBonusModelMasterRequest;
import io.gs2.loginReward.result.GetBonusModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetBonusModelMasterResult result = client.getBonusModelMaster(
        new GetBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonusModel-0001")
    );
    BonusModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetBonusModelMasterRequest;
using Gs2.Gs2LoginReward.Result.GetBonusModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetBonusModelMasterResult> asyncResult = null;
yield return client.GetBonusModelMaster(
    new Gs2.Gs2LoginReward.Request.GetBonusModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonusModel-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getBonusModelMaster(
        new Gs2LoginReward.GetBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonusModel-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_bonus_model_master(
        login_reward.GetBonusModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonusModel-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_bonus_model_master({
    namespaceName="namespace1",
    bonusModelName="bonusModel-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.get_bonus_model_master_async({
    namespaceName="namespace1",
    bonusModelName="bonusModel-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

updateBonusModelMaster

Update Login Bonus Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsLogin Bonus Model Name
descriptionstring~ 1024 charsDescription
metadatastring~ 2048 charsmetadata
modeenum {
    “schedule”,
    “streaming”
}
~ 128 charsmode
periodEventIdstring~ 1024 charsGS2-Schedule Event GRN that represents the period during which to enable login bonuses
resetHourint{periodEventId} == ""~ 23Reset time of the receive flag (UTC)
repeatenum {
    “enabled”,
    “disabled”
}
{mode} == “streaming”~ 128 charsWhether to repeat when the end of the stream is reached
rewardsList<Reward>~ 100 itemsList of rewards
missedReceiveReliefenum {
    “enabled”,
    “disabled”
}
“disabled”~ 128 charsMissed Rescue Function
missedReceiveReliefVerifyActionsList<VerifyAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of verify actions for missed receive relief
missedReceiveReliefConsumeActionsList<ConsumeAction>{missedReceiveRelief} == “enabled”~ 10 itemsList of consumption actions for missed receive relief

Enumeration type definition to specify as mode

Enumerator String DefinitionDescription
scheduleSchedule Mode
streamingStreaming Mode

Enumeration type definition to specify as repeat

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Enumeration type definition to specify as missedReceiveRelief

Enumerator String DefinitionDescription
enabledEnabled
disabledDisabled

Result

TypeDescription
itemBonusModelMasterUpdated Login Bonus Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.UpdateBonusModelMaster(
    &login_reward.UpdateBonusModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonusModel-0001"),
        Description: pointy.String("description1"),
        Metadata: nil,
        Mode: pointy.String("streaming"),
        PeriodEventId: pointy.String("grn:gs2:schedule:grn-0001"),
        ResetHour: nil,
        Repeat: pointy.String("disabled"),
        Rewards: []loginReward.Reward{
            loginReward.Reward{
                AcquireActions: []loginReward.AcquireAction{
                    loginReward.AcquireAction{
                        Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    },
                },
            },
            loginReward.Reward{
                AcquireActions: []loginReward.AcquireAction{
                    loginReward.AcquireAction{
                        Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    },
                },
            },
            loginReward.Reward{
                AcquireActions: []loginReward.AcquireAction{
                    loginReward.AcquireAction{
                        Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    },
                },
            },
        },
        MissedReceiveRelief: pointy.String("enabled"),
        MissedReceiveReliefVerifyActions: nil,
        MissedReceiveReliefConsumeActions: []loginReward.ConsumeAction{
            loginReward.ConsumeAction{
                Action: pointy.String("Gs2Money:WithdrawByUserId"),
                Request: pointy.String("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\UpdateBonusModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateBonusModelMaster(
        (new UpdateBonusModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonusModel-0001")
            ->withDescription("description1")
            ->withMetadata(null)
            ->withMode("streaming")
            ->withPeriodEventId("grn:gs2:schedule:grn-0001")
            ->withResetHour(null)
            ->withRepeat("disabled")
            ->withRewards([
                (new \Gs2\LoginReward\Model\Reward())
                    ->withAcquireActions([
                        (new \Gs2\LoginReward\Model\AcquireAction())
                            ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                            ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                (new \Gs2\LoginReward\Model\Reward())
                    ->withAcquireActions([
                        (new \Gs2\LoginReward\Model\AcquireAction())
                            ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                            ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                (new \Gs2\LoginReward\Model\Reward())
                    ->withAcquireActions([
                        (new \Gs2\LoginReward\Model\AcquireAction())
                            ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                            ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
            ])
            ->withMissedReceiveRelief("enabled")
            ->withMissedReceiveReliefVerifyActions(null)
            ->withMissedReceiveReliefConsumeActions([
                (new \Gs2\LoginReward\Model\ConsumeAction())
                    ->withAction("Gs2Money:WithdrawByUserId")
                    ->withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.UpdateBonusModelMasterRequest;
import io.gs2.loginReward.result.UpdateBonusModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    UpdateBonusModelMasterResult result = client.updateBonusModelMaster(
        new UpdateBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonusModel-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withMode("streaming")
            .withPeriodEventId("grn:gs2:schedule:grn-0001")
            .withResetHour(null)
            .withRepeat("disabled")
            .withRewards(Arrays.asList(
                new io.gs2.loginReward.model.Reward()
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.loginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
                    )),
                new io.gs2.loginReward.model.Reward()
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.loginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
                    )),
                new io.gs2.loginReward.model.Reward()
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.loginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
                    ))
            ))
            .withMissedReceiveRelief("enabled")
            .withMissedReceiveReliefVerifyActions(null)
            .withMissedReceiveReliefConsumeActions(Arrays.asList(
                new io.gs2.loginReward.model.ConsumeAction()
                    .withAction("Gs2Money:WithdrawByUserId")
                    .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}")
            ))
    );
    BonusModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.UpdateBonusModelMasterRequest;
using Gs2.Gs2LoginReward.Result.UpdateBonusModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.UpdateBonusModelMasterResult> asyncResult = null;
yield return client.UpdateBonusModelMaster(
    new Gs2.Gs2LoginReward.Request.UpdateBonusModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonusModel-0001")
        .WithDescription("description1")
        .WithMetadata(null)
        .WithMode("streaming")
        .WithPeriodEventId("grn:gs2:schedule:grn-0001")
        .WithResetHour(null)
        .WithRepeat("disabled")
        .WithRewards(new Gs2.Gs2LoginReward.Model.Reward[] {
            new Gs2.Gs2LoginReward.Model.Reward()
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                        .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                }),
            new Gs2.Gs2LoginReward.Model.Reward()
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                        .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                }),
            new Gs2.Gs2LoginReward.Model.Reward()
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                        .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                }),
        })
        .WithMissedReceiveRelief("enabled")
        .WithMissedReceiveReliefVerifyActions(null)
        .WithMissedReceiveReliefConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
            new Gs2.Core.Model.ConsumeAction()
                .WithAction("Gs2Money:WithdrawByUserId")
                .WithRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.updateBonusModelMaster(
        new Gs2LoginReward.UpdateBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonusModel-0001")
            .withDescription("description1")
            .withMetadata(null)
            .withMode("streaming")
            .withPeriodEventId("grn:gs2:schedule:grn-0001")
            .withResetHour(null)
            .withRepeat("disabled")
            .withRewards([
                new Gs2LoginReward.model.Reward()
                    .withAcquireActions([
                        new Gs2LoginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                new Gs2LoginReward.model.Reward()
                    .withAcquireActions([
                        new Gs2LoginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
                new Gs2LoginReward.model.Reward()
                    .withAcquireActions([
                        new Gs2LoginReward.model.AcquireAction()
                            .withAction("Gs2Stamina:RecoverStaminaByUserId")
                            .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
                    ]),
            ])
            .withMissedReceiveRelief("enabled")
            .withMissedReceiveReliefVerifyActions(null)
            .withMissedReceiveReliefConsumeActions([
                new Gs2LoginReward.model.ConsumeAction()
                    .withAction("Gs2Money:WithdrawByUserId")
                    .withRequest("{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.update_bonus_model_master(
        login_reward.UpdateBonusModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonusModel-0001')
            .with_description('description1')
            .with_metadata(None)
            .with_mode('streaming')
            .with_period_event_id('grn:gs2:schedule:grn-0001')
            .with_reset_hour(None)
            .with_repeat('disabled')
            .with_rewards([
                login_reward.Reward()
                    .with_acquire_actions([
                        login_reward.AcquireAction()
                            .with_action('Gs2Stamina:RecoverStaminaByUserId')
                            .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
                    ]),
                login_reward.Reward()
                    .with_acquire_actions([
                        login_reward.AcquireAction()
                            .with_action('Gs2Stamina:RecoverStaminaByUserId')
                            .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
                    ]),
                login_reward.Reward()
                    .with_acquire_actions([
                        login_reward.AcquireAction()
                            .with_action('Gs2Stamina:RecoverStaminaByUserId')
                            .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
                    ]),
            ])
            .with_missed_receive_relief('enabled')
            .with_missed_receive_relief_verify_actions(None)
            .with_missed_receive_relief_consume_actions([
                login_reward.ConsumeAction()
                    .with_action('Gs2Money:WithdrawByUserId')
                    .with_request('{"namespaceName": "stamina-0001", "userId": "user-0001", "slot": 0, "count": 200, "paidOnly": false}'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.update_bonus_model_master({
    namespaceName="namespace1",
    bonusModelName="bonusModel-0001",
    description="description1",
    metadata=nil,
    mode="streaming",
    periodEventId="grn:gs2:schedule:grn-0001",
    resetHour=nil,
    repeat="disabled",
    rewards={
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        }
    },
    missedReceiveRelief="enabled",
    missedReceiveReliefVerifyActions=nil,
    missedReceiveReliefConsumeActions={
        {
            action="Gs2Money:WithdrawByUserId",
            request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.update_bonus_model_master_async({
    namespaceName="namespace1",
    bonusModelName="bonusModel-0001",
    description="description1",
    metadata=nil,
    mode="streaming",
    periodEventId="grn:gs2:schedule:grn-0001",
    resetHour=nil,
    repeat="disabled",
    rewards={
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        },
        {
            acquireActions={
                {
                    action="Gs2Stamina:RecoverStaminaByUserId",
                    request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
                }
            },
        }
    },
    missedReceiveRelief="enabled",
    missedReceiveReliefVerifyActions=nil,
    missedReceiveReliefConsumeActions={
        {
            action="Gs2Money:WithdrawByUserId",
            request="{\"namespaceName\": \"stamina-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

deleteBonusModelMaster

Delete Login Bonus Model Master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsLogin Bonus Model Name

Result

TypeDescription
itemBonusModelMasterDeleted Login Bonus Model Master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DeleteBonusModelMaster(
    &login_reward.DeleteBonusModelMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonusModel-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DeleteBonusModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteBonusModelMaster(
        (new DeleteBonusModelMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonusModel-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DeleteBonusModelMasterRequest;
import io.gs2.loginReward.result.DeleteBonusModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DeleteBonusModelMasterResult result = client.deleteBonusModelMaster(
        new DeleteBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonusModel-0001")
    );
    BonusModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DeleteBonusModelMasterRequest;
using Gs2.Gs2LoginReward.Result.DeleteBonusModelMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DeleteBonusModelMasterResult> asyncResult = null;
yield return client.DeleteBonusModelMaster(
    new Gs2.Gs2LoginReward.Request.DeleteBonusModelMasterRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonusModel-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.deleteBonusModelMaster(
        new Gs2LoginReward.DeleteBonusModelMasterRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonusModel-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.delete_bonus_model_master(
        login_reward.DeleteBonusModelMasterRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonusModel-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.delete_bonus_model_master({
    namespaceName="namespace1",
    bonusModelName="bonusModel-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.delete_bonus_model_master_async({
    namespaceName="namespace1",
    bonusModelName="bonusModel-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

exportMaster

Export master data for the currently available loginReward master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemCurrentBonusMasterCurrently available loginReward master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &login_reward.ExportMasterRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\ExportMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.ExportMasterRequest;
import io.gs2.loginReward.result.ExportMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentBonusMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.ExportMasterRequest;
using Gs2.Gs2LoginReward.Result.ExportMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2LoginReward.Request.ExportMasterRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.exportMaster(
        new Gs2LoginReward.ExportMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.export_master(
        login_reward.ExportMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.export_master({
    namespaceName="namespace1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.export_master_async({
    namespaceName="namespace1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

getCurrentBonusMaster

Get the currently available loginReward master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemCurrentBonusMasterCurrently available loginReward master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetCurrentBonusMaster(
    &login_reward.GetCurrentBonusMasterRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetCurrentBonusMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getCurrentBonusMaster(
        (new GetCurrentBonusMasterRequest())
            ->withNamespaceName(self::namespace1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetCurrentBonusMasterRequest;
import io.gs2.loginReward.result.GetCurrentBonusMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetCurrentBonusMasterResult result = client.getCurrentBonusMaster(
        new GetCurrentBonusMasterRequest()
            .withNamespaceName("namespace1")
    );
    CurrentBonusMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetCurrentBonusMasterRequest;
using Gs2.Gs2LoginReward.Result.GetCurrentBonusMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetCurrentBonusMasterResult> asyncResult = null;
yield return client.GetCurrentBonusMaster(
    new Gs2.Gs2LoginReward.Request.GetCurrentBonusMasterRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getCurrentBonusMaster(
        new Gs2LoginReward.GetCurrentBonusMasterRequest()
            .withNamespaceName("namespace1")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_current_bonus_master(
        login_reward.GetCurrentBonusMasterRequest()
            .with_namespace_name(self.hash1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_current_bonus_master({
    namespaceName="namespace1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.get_current_bonus_master_async({
    namespaceName="namespace1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

updateCurrentBonusMaster

Update the currently available loginReward master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
settingsstring~ 5242880 charsMaster data

Result

TypeDescription
itemCurrentBonusMasterUpdated and currently available loginReward master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentBonusMaster(
    &login_reward.UpdateCurrentBonusMasterRequest {
        NamespaceName: pointy.String("namespace1"),
        Settings: pointy.String("{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\UpdateCurrentBonusMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentBonusMaster(
        (new UpdateCurrentBonusMasterRequest())
            ->withNamespaceName(self::namespace1)
            ->withSettings("{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.UpdateCurrentBonusMasterRequest;
import io.gs2.loginReward.result.UpdateCurrentBonusMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    UpdateCurrentBonusMasterResult result = client.updateCurrentBonusMaster(
        new UpdateCurrentBonusMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}")
    );
    CurrentBonusMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.UpdateCurrentBonusMasterRequest;
using Gs2.Gs2LoginReward.Result.UpdateCurrentBonusMasterResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.UpdateCurrentBonusMasterResult> asyncResult = null;
yield return client.UpdateCurrentBonusMaster(
    new Gs2.Gs2LoginReward.Request.UpdateCurrentBonusMasterRequest()
        .WithNamespaceName("namespace1")
        .WithSettings("{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.updateCurrentBonusMaster(
        new Gs2LoginReward.UpdateCurrentBonusMasterRequest()
            .withNamespaceName("namespace1")
            .withSettings("{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.update_current_bonus_master(
        login_reward.UpdateCurrentBonusMasterRequest()
            .with_namespace_name(self.hash1)
            .with_settings('{"version": "2023-07-11", "bonusModels": [{"name": "schedule", "mode": "schedule", "periodEventId": "grn:gs2:schedule:grn-0001", "rewards": [{"acquireActions": [{"action": "Gs2Stamina:RecoverStaminaByUserId", "request": {"namespaceName": "stamina-0001", "staminaName": "quest", "userId": "#{userId}", "recoverValue": 100}}]}, {"acquireActions": [{"action": "Gs2Stamina:RecoverStaminaByUserId", "request": {"namespaceName": "stamina-0001", "staminaName": "quest", "userId": "#{userId}", "recoverValue": 100}}]}, {"acquireActions": [{"action": "Gs2Stamina:RecoverStaminaByUserId", "request": {"namespaceName": "stamina-0001", "staminaName": "quest", "userId": "#{userId}", "recoverValue": 100}}]}], "missedReceiveRelief": "disabled"}, {"name": "streaming", "mode": "streaming", "resetHour": 15, "repeat": "enabled", "rewards": [{"acquireActions": [{"action": "Gs2Stamina:RecoverStaminaByUserId", "request": {"namespaceName": "stamina-0001", "staminaName": "quest", "userId": "#{userId}", "recoverValue": 100}}]}, {"acquireActions": [{"action": "Gs2Stamina:RecoverStaminaByUserId", "request": {"namespaceName": "stamina-0001", "staminaName": "quest", "userId": "#{userId}", "recoverValue": 100}}]}, {"acquireActions": [{"action": "Gs2Stamina:RecoverStaminaByUserId", "request": {"namespaceName": "stamina-0001", "staminaName": "quest", "userId": "#{userId}", "recoverValue": 100}}]}], "missedReceiveRelief": "enabled", "missedReceiveReliefConsumeActions": [{"action": "Gs2Money:WithdrawByUserId", "request": {"namespaceName": "money-0001", "userId": "#{userId}", "slot": 0, "count": 200, "paidOnly": false}}]}]}')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.update_current_bonus_master({
    namespaceName="namespace1",
    settings="{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.update_current_bonus_master_async({
    namespaceName="namespace1",
    settings="{\"version\": \"2023-07-11\", \"bonusModels\": [{\"name\": \"schedule\", \"mode\": \"schedule\", \"periodEventId\": \"grn:gs2:schedule:grn-0001\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"disabled\"}, {\"name\": \"streaming\", \"mode\": \"streaming\", \"resetHour\": 15, \"repeat\": \"enabled\", \"rewards\": [{\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}, {\"acquireActions\": [{\"action\": \"Gs2Stamina:RecoverStaminaByUserId\", \"request\": {\"namespaceName\": \"stamina-0001\", \"staminaName\": \"quest\", \"userId\": \"#{userId}\", \"recoverValue\": 100}}]}], \"missedReceiveRelief\": \"enabled\", \"missedReceiveReliefConsumeActions\": [{\"action\": \"Gs2Money:WithdrawByUserId\", \"request\": {\"namespaceName\": \"money-0001\", \"userId\": \"#{userId}\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}}]}]}",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

updateCurrentBonusMasterFromGitHub

Update the currently available loginReward master

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
checkoutSettingGitHubCheckoutSettingSetup to check out master data from GitHub

Result

TypeDescription
itemCurrentBonusMasterUpdated and currently available loginReward master

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentBonusMasterFromGitHub(
    &login_reward.UpdateCurrentBonusMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace1"),
        CheckoutSetting: &loginReward.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("$gitHubApiKey1.apiKeyId"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("develop"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\UpdateCurrentBonusMasterFromGitHubRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->updateCurrentBonusMasterFromGitHub(
        (new UpdateCurrentBonusMasterFromGitHubRequest())
            ->withNamespaceName(self::namespace1)
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId(self::$gitHubApiKey1.apiKeyId)
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.UpdateCurrentBonusMasterFromGitHubRequest;
import io.gs2.loginReward.result.UpdateCurrentBonusMasterFromGitHubResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    UpdateCurrentBonusMasterFromGitHubResult result = client.updateCurrentBonusMasterFromGitHub(
        new UpdateCurrentBonusMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("$gitHubApiKey1.apiKeyId")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentBonusMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.UpdateCurrentBonusMasterFromGitHubRequest;
using Gs2.Gs2LoginReward.Result.UpdateCurrentBonusMasterFromGitHubResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.UpdateCurrentBonusMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentBonusMasterFromGitHub(
    new Gs2.Gs2LoginReward.Request.UpdateCurrentBonusMasterFromGitHubRequest()
        .WithNamespaceName("namespace1")
        .WithCheckoutSetting(new Gs2.Gs2LoginReward.Model.GitHubCheckoutSetting()
            .WithApiKeyId("$gitHubApiKey1.apiKeyId")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.updateCurrentBonusMasterFromGitHub(
        new Gs2LoginReward.UpdateCurrentBonusMasterFromGitHubRequest()
            .withNamespaceName("namespace1")
            .withCheckoutSetting(new Gs2LoginReward.model.GitHubCheckoutSetting()
                .withApiKeyId("$gitHubApiKey1.apiKeyId")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.update_current_bonus_master_from_git_hub(
        login_reward.UpdateCurrentBonusMasterFromGitHubRequest()
            .with_namespace_name(self.hash1)
            .with_checkout_setting(login_reward.GitHubCheckoutSetting()
                .with_api_key_id(self.git_hub_api_key1.api_key_id)
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.update_current_bonus_master_from_git_hub({
    namespaceName="namespace1",
    checkoutSetting={
        api_key_id="$gitHubApiKey1.apiKeyId",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.update_current_bonus_master_from_git_hub_async({
    namespaceName="namespace1",
    checkoutSetting={
        api_key_id="$gitHubApiKey1.apiKeyId",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

describeBonusModels

Get list of loginReward

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name

Result

TypeDescription
itemsList<BonusModel>List of Bonuss

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DescribeBonusModels(
    &login_reward.DescribeBonusModelsRequest {
        NamespaceName: pointy.String("namespace1"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DescribeBonusModelsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeBonusModels(
        (new DescribeBonusModelsRequest())
            ->withNamespaceName(self::namespace1)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DescribeBonusModelsRequest;
import io.gs2.loginReward.result.DescribeBonusModelsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DescribeBonusModelsResult result = client.describeBonusModels(
        new DescribeBonusModelsRequest()
            .withNamespaceName("namespace1")
    );
    List<BonusModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DescribeBonusModelsRequest;
using Gs2.Gs2LoginReward.Result.DescribeBonusModelsResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DescribeBonusModelsResult> asyncResult = null;
yield return client.DescribeBonusModels(
    new Gs2.Gs2LoginReward.Request.DescribeBonusModelsRequest()
        .WithNamespaceName("namespace1"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.describeBonusModels(
        new Gs2LoginReward.DescribeBonusModelsRequest()
            .withNamespaceName("namespace1")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.describe_bonus_models(
        login_reward.DescribeBonusModelsRequest()
            .with_namespace_name(self.hash1)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.describe_bonus_models({
    namespaceName="namespace1",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
client = gs2('loginReward')

api_result_handler = client.describe_bonus_models_async({
    namespaceName="namespace1",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;

getBonusModel

Get loginReward

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name

Result

TypeDescription
itemBonusModelBonus

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetBonusModel(
    &login_reward.GetBonusModelRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetBonusModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getBonusModel(
        (new GetBonusModelRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetBonusModelRequest;
import io.gs2.loginReward.result.GetBonusModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetBonusModelResult result = client.getBonusModel(
        new GetBonusModelRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
    );
    BonusModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetBonusModelRequest;
using Gs2.Gs2LoginReward.Result.GetBonusModelResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetBonusModelResult> asyncResult = null;
yield return client.GetBonusModel(
    new Gs2.Gs2LoginReward.Request.GetBonusModelRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getBonusModel(
        new Gs2LoginReward.GetBonusModelRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_bonus_model(
        login_reward.GetBonusModelRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_bonus_model({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
client = gs2('loginReward')

api_result_handler = client.get_bonus_model_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;

receive

Get login rewards

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
accessTokenstring~ 128 charsUser Id
configList<Config>[]~ 32 itemsSet values to be applied to transaction variables

Result

TypeDescription
itemReceiveStatusReceive status
bonusModelBonusModelLogin Bonus Model
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the purchase process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is transaction auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.Receive(
    &login_reward.ReceiveRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\ReceiveRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->receive(
        (new ReceiveRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.ReceiveRequest;
import io.gs2.loginReward.result.ReceiveResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    ReceiveResult result = client.receive(
        new ReceiveRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
            .withConfig(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.ReceiveRequest;
using Gs2.Gs2LoginReward.Result.ReceiveResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.ReceiveResult> asyncResult = null;
yield return client.Receive(
    new Gs2.Gs2LoginReward.Request.ReceiveRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithAccessToken("accessToken-0001")
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.receive(
        new Gs2LoginReward.ReceiveRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
            .withConfig(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.receive(
        login_reward.ReceiveRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_access_token(self.access_token_0001)
            .with_config(None)
    )
    item = result.item
    bonus_model = result.bonus_model
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.receive({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
    config=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
client = gs2('loginReward')

api_result_handler = client.receive_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
    config=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

receiveByUserId

Get login rewards by userId

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
configList<Config>[]~ 32 itemsSet values to be applied to transaction variables
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemReceiveStatusReceive status
bonusModelBonusModelLogin Bonus Model
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the purchase process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is transaction auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.ReceiveByUserId(
    &login_reward.ReceiveByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        UserId: pointy.String("user-0001"),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\ReceiveByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->receiveByUserId(
        (new ReceiveByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withUserId("user-0001")
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.ReceiveByUserIdRequest;
import io.gs2.loginReward.result.ReceiveByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    ReceiveByUserIdResult result = client.receiveByUserId(
        new ReceiveByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.ReceiveByUserIdRequest;
using Gs2.Gs2LoginReward.Result.ReceiveByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.ReceiveByUserIdResult> asyncResult = null;
yield return client.ReceiveByUserId(
    new Gs2.Gs2LoginReward.Request.ReceiveByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithUserId("user-0001")
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.receiveByUserId(
        new Gs2LoginReward.ReceiveByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.receive_by_user_id(
        login_reward.ReceiveByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_user_id('user-0001')
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    bonus_model = result.bonus_model
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.receive_by_user_id({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    config=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
client = gs2('loginReward')

api_result_handler = client.receive_by_user_id_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    config=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

missedReceive

Get login rewards

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
accessTokenstring~ 128 charsUser Id
stepNumberint~ 100Step number to receive
configList<Config>[]~ 32 itemsSet values to be applied to transaction variables

Result

TypeDescription
itemReceiveStatusReceive status
bonusModelBonusModelLogin Bonus Model
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the purchase process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is transaction auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.MissedReceive(
    &login_reward.MissedReceiveRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        StepNumber: pointy.Int32(1),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\MissedReceiveRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->missedReceive(
        (new MissedReceiveRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withStepNumber(1)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.MissedReceiveRequest;
import io.gs2.loginReward.result.MissedReceiveResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    MissedReceiveResult result = client.missedReceive(
        new MissedReceiveRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
            .withStepNumber(1)
            .withConfig(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.MissedReceiveRequest;
using Gs2.Gs2LoginReward.Result.MissedReceiveResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.MissedReceiveResult> asyncResult = null;
yield return client.MissedReceive(
    new Gs2.Gs2LoginReward.Request.MissedReceiveRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithAccessToken("accessToken-0001")
        .WithStepNumber(1)
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.missedReceive(
        new Gs2LoginReward.MissedReceiveRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
            .withStepNumber(1)
            .withConfig(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.missed_receive(
        login_reward.MissedReceiveRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_access_token(self.access_token_0001)
            .with_step_number(1)
            .with_config(None)
    )
    item = result.item
    bonus_model = result.bonus_model
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.missed_receive({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
    stepNumber=1,
    config=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
client = gs2('loginReward')

api_result_handler = client.missed_receive_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
    stepNumber=1,
    config=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

missedReceiveByUserId

Get login rewards by userId

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
stepNumberint~ 100Step number to receive
configList<Config>[]~ 32 itemsSet values to be applied to transaction variables
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemReceiveStatusReceive status
bonusModelBonusModelLogin Bonus Model
transactionIdstringIssed transaction ID
stampSheetstringStamp sheets used to execute the purchase process
stampSheetEncryptionKeyIdstringCryptographic key GRN used for stamp sheet signature calculations
autoRunStampSheetbool?Is transaction auto-execution enabled?

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.MissedReceiveByUserId(
    &login_reward.MissedReceiveByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        UserId: pointy.String("user-0001"),
        StepNumber: pointy.Int32(1),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\MissedReceiveByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->missedReceiveByUserId(
        (new MissedReceiveByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withUserId("user-0001")
            ->withStepNumber(1)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.MissedReceiveByUserIdRequest;
import io.gs2.loginReward.result.MissedReceiveByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    MissedReceiveByUserIdResult result = client.missedReceiveByUserId(
        new MissedReceiveByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withStepNumber(1)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.MissedReceiveByUserIdRequest;
using Gs2.Gs2LoginReward.Result.MissedReceiveByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.MissedReceiveByUserIdResult> asyncResult = null;
yield return client.MissedReceiveByUserId(
    new Gs2.Gs2LoginReward.Request.MissedReceiveByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithUserId("user-0001")
        .WithStepNumber(1)
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.missedReceiveByUserId(
        new Gs2LoginReward.MissedReceiveByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withStepNumber(1)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.missed_receive_by_user_id(
        login_reward.MissedReceiveByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_user_id('user-0001')
            .with_step_number(1)
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    bonus_model = result.bonus_model
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.missed_receive_by_user_id({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    stepNumber=1,
    config=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
client = gs2('loginReward')

api_result_handler = client.missed_receive_by_user_id_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    stepNumber=1,
    config=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;

describeReceiveStatuses

Get list of login_reward

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
accessTokenstring~ 128 charsUser Id
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired

Result

TypeDescription
itemsList<ReceiveStatus>List of ReceiveStatuses
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DescribeReceiveStatuses(
    &login_reward.DescribeReceiveStatusesRequest {
        NamespaceName: pointy.String("namespace1"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DescribeReceiveStatusesRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeReceiveStatuses(
        (new DescribeReceiveStatusesRequest())
            ->withNamespaceName(self::namespace1)
            ->withAccessToken(self::$accessToken0001)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DescribeReceiveStatusesRequest;
import io.gs2.loginReward.result.DescribeReceiveStatusesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DescribeReceiveStatusesResult result = client.describeReceiveStatuses(
        new DescribeReceiveStatusesRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<ReceiveStatus> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DescribeReceiveStatusesRequest;
using Gs2.Gs2LoginReward.Result.DescribeReceiveStatusesResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DescribeReceiveStatusesResult> asyncResult = null;
yield return client.DescribeReceiveStatuses(
    new Gs2.Gs2LoginReward.Request.DescribeReceiveStatusesRequest()
        .WithNamespaceName("namespace1")
        .WithAccessToken("accessToken-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.describeReceiveStatuses(
        new Gs2LoginReward.DescribeReceiveStatusesRequest()
            .withNamespaceName("namespace1")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.describe_receive_statuses(
        login_reward.DescribeReceiveStatusesRequest()
            .with_namespace_name(self.hash1)
            .with_access_token(self.access_token_0001)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.describe_receive_statuses({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('loginReward')

api_result_handler = client.describe_receive_statuses_async({
    namespaceName="namespace1",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

describeReceiveStatusesByUserId

Obtain list of login_reward by specifying a user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
userIdstring~ 128 charsUser Id
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data
limitint301 ~ 1000Number of data acquired
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemsList<ReceiveStatus>List of ReceiveStatuses
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DescribeReceiveStatusesByUserId(
    &login_reward.DescribeReceiveStatusesByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DescribeReceiveStatusesByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->describeReceiveStatusesByUserId(
        (new DescribeReceiveStatusesByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DescribeReceiveStatusesByUserIdRequest;
import io.gs2.loginReward.result.DescribeReceiveStatusesByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DescribeReceiveStatusesByUserIdResult result = client.describeReceiveStatusesByUserId(
        new DescribeReceiveStatusesByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<ReceiveStatus> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DescribeReceiveStatusesByUserIdRequest;
using Gs2.Gs2LoginReward.Result.DescribeReceiveStatusesByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DescribeReceiveStatusesByUserIdResult> asyncResult = null;
yield return client.DescribeReceiveStatusesByUserId(
    new Gs2.Gs2LoginReward.Request.DescribeReceiveStatusesByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithUserId("user-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.describeReceiveStatusesByUserId(
        new Gs2LoginReward.DescribeReceiveStatusesByUserIdRequest()
            .withNamespaceName("namespace1")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.describe_receive_statuses_by_user_id(
        login_reward.DescribeReceiveStatusesByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_user_id('user-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.describe_receive_statuses_by_user_id({
    namespaceName="namespace1",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('loginReward')

api_result_handler = client.describe_receive_statuses_by_user_id_async({
    namespaceName="namespace1",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

getReceiveStatus

Get Receive Status

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
accessTokenstring~ 128 charsUser Id

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetReceiveStatus(
    &login_reward.GetReceiveStatusRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetReceiveStatusRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getReceiveStatus(
        (new GetReceiveStatusRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withAccessToken(self::$accessToken0001)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetReceiveStatusRequest;
import io.gs2.loginReward.result.GetReceiveStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetReceiveStatusResult result = client.getReceiveStatus(
        new GetReceiveStatusRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetReceiveStatusRequest;
using Gs2.Gs2LoginReward.Result.GetReceiveStatusResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetReceiveStatusResult> asyncResult = null;
yield return client.GetReceiveStatus(
    new Gs2.Gs2LoginReward.Request.GetReceiveStatusRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getReceiveStatus(
        new Gs2LoginReward.GetReceiveStatusRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_receive_status(
        login_reward.GetReceiveStatusRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_access_token(self.access_token_0001)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_receive_status({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.get_receive_status_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

getReceiveStatusByUserId

Get Receive Status by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.GetReceiveStatusByUserId(
    &login_reward.GetReceiveStatusByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\GetReceiveStatusByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->getReceiveStatusByUserId(
        (new GetReceiveStatusByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.GetReceiveStatusByUserIdRequest;
import io.gs2.loginReward.result.GetReceiveStatusByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    GetReceiveStatusByUserIdResult result = client.getReceiveStatusByUserId(
        new GetReceiveStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.GetReceiveStatusByUserIdRequest;
using Gs2.Gs2LoginReward.Result.GetReceiveStatusByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.GetReceiveStatusByUserIdResult> asyncResult = null;
yield return client.GetReceiveStatusByUserId(
    new Gs2.Gs2LoginReward.Request.GetReceiveStatusByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.getReceiveStatusByUserId(
        new Gs2LoginReward.GetReceiveStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.get_receive_status_by_user_id(
        login_reward.GetReceiveStatusByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.get_receive_status_by_user_id({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.get_receive_status_by_user_id_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

deleteReceiveStatusByUserId

Delete receive status by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DeleteReceiveStatusByUserId(
    &login_reward.DeleteReceiveStatusByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DeleteReceiveStatusByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteReceiveStatusByUserId(
        (new DeleteReceiveStatusByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DeleteReceiveStatusByUserIdRequest;
import io.gs2.loginReward.result.DeleteReceiveStatusByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DeleteReceiveStatusByUserIdResult result = client.deleteReceiveStatusByUserId(
        new DeleteReceiveStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DeleteReceiveStatusByUserIdRequest;
using Gs2.Gs2LoginReward.Result.DeleteReceiveStatusByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DeleteReceiveStatusByUserIdResult> asyncResult = null;
yield return client.DeleteReceiveStatusByUserId(
    new Gs2.Gs2LoginReward.Request.DeleteReceiveStatusByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.deleteReceiveStatusByUserId(
        new Gs2LoginReward.DeleteReceiveStatusByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.delete_receive_status_by_user_id(
        login_reward.DeleteReceiveStatusByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.delete_receive_status_by_user_id({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.delete_receive_status_by_user_id_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

deleteReceiveStatusByStampSheet

Execute reset of receive status as acquire action

Request

TypeConditionRequireDefaultLimitationDescription
stampSheetstring~ 5242880 charsTransaction
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.DeleteReceiveStatusByStampSheet(
    &login_reward.DeleteReceiveStatusByStampSheetRequest {
        StampSheet: pointy.String("stampSheet"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\DeleteReceiveStatusByStampSheetRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->deleteReceiveStatusByStampSheet(
        (new DeleteReceiveStatusByStampSheetRequest())
            ->withStampSheet(self::stampSheet)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.DeleteReceiveStatusByStampSheetRequest;
import io.gs2.loginReward.result.DeleteReceiveStatusByStampSheetResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    DeleteReceiveStatusByStampSheetResult result = client.deleteReceiveStatusByStampSheet(
        new DeleteReceiveStatusByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.DeleteReceiveStatusByStampSheetRequest;
using Gs2.Gs2LoginReward.Result.DeleteReceiveStatusByStampSheetResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.DeleteReceiveStatusByStampSheetResult> asyncResult = null;
yield return client.DeleteReceiveStatusByStampSheet(
    new Gs2.Gs2LoginReward.Request.DeleteReceiveStatusByStampSheetRequest()
        .WithStampSheet("stampSheet")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.deleteReceiveStatusByStampSheet(
        new Gs2LoginReward.DeleteReceiveStatusByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.delete_receive_status_by_stamp_sheet(
        login_reward.DeleteReceiveStatusByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.delete_receive_status_by_stamp_sheet({
    stampSheet="stampSheet",
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.delete_receive_status_by_stamp_sheet_async({
    stampSheet="stampSheet",
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

markReceived

Mark as received

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
accessTokenstring~ 128 charsUser Id
stepNumberint~ 100Step Number

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.MarkReceived(
    &login_reward.MarkReceivedRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        StepNumber: pointy.Int32(1),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\MarkReceivedRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->markReceived(
        (new MarkReceivedRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withAccessToken(self::$accessToken0001)
            ->withStepNumber(1)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.MarkReceivedRequest;
import io.gs2.loginReward.result.MarkReceivedResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    MarkReceivedResult result = client.markReceived(
        new MarkReceivedRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
            .withStepNumber(1)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.MarkReceivedRequest;
using Gs2.Gs2LoginReward.Result.MarkReceivedResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.MarkReceivedResult> asyncResult = null;
yield return client.MarkReceived(
    new Gs2.Gs2LoginReward.Request.MarkReceivedRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithAccessToken("accessToken-0001")
        .WithStepNumber(1),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.markReceived(
        new Gs2LoginReward.MarkReceivedRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withAccessToken("accessToken-0001")
            .withStepNumber(1)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.mark_received(
        login_reward.MarkReceivedRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_access_token(self.access_token_0001)
            .with_step_number(1)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.mark_received({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
    stepNumber=1,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.mark_received_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    accessToken="accessToken-0001",
    stepNumber=1,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

markReceivedByUserId

Mark as received by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
stepNumberint~ 100Step Number
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.MarkReceivedByUserId(
    &login_reward.MarkReceivedByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        UserId: pointy.String("user-0001"),
        StepNumber: pointy.Int32(1),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\MarkReceivedByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->markReceivedByUserId(
        (new MarkReceivedByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withUserId("user-0001")
            ->withStepNumber(1)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.MarkReceivedByUserIdRequest;
import io.gs2.loginReward.result.MarkReceivedByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    MarkReceivedByUserIdResult result = client.markReceivedByUserId(
        new MarkReceivedByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withStepNumber(1)
            .withTimeOffsetToken(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.MarkReceivedByUserIdRequest;
using Gs2.Gs2LoginReward.Result.MarkReceivedByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.MarkReceivedByUserIdResult> asyncResult = null;
yield return client.MarkReceivedByUserId(
    new Gs2.Gs2LoginReward.Request.MarkReceivedByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithUserId("user-0001")
        .WithStepNumber(1)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.markReceivedByUserId(
        new Gs2LoginReward.MarkReceivedByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withStepNumber(1)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.mark_received_by_user_id(
        login_reward.MarkReceivedByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_user_id('user-0001')
            .with_step_number(1)
            .with_time_offset_token(None)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.mark_received_by_user_id({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    stepNumber=1,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.mark_received_by_user_id_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    stepNumber=1,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

unmarkReceivedByUserId

Unmark as received by specifying user ID

Request

TypeConditionRequireDefaultLimitationDescription
namespaceNamestring~ 128 charsNamespace name
bonusModelNamestring~ 128 charsBonus Model Name
userIdstring~ 128 charsUser Id
stepNumberint~ 100Step Number
timeOffsetTokenstring~ 1024 charsTime offset token

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.UnmarkReceivedByUserId(
    &login_reward.UnmarkReceivedByUserIdRequest {
        NamespaceName: pointy.String("namespace1"),
        BonusModelName: pointy.String("bonus-0001"),
        UserId: pointy.String("user-0001"),
        StepNumber: pointy.Int32(1),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\UnmarkReceivedByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->unmarkReceivedByUserId(
        (new UnmarkReceivedByUserIdRequest())
            ->withNamespaceName(self::namespace1)
            ->withBonusModelName("bonus-0001")
            ->withUserId("user-0001")
            ->withStepNumber(1)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.UnmarkReceivedByUserIdRequest;
import io.gs2.loginReward.result.UnmarkReceivedByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    UnmarkReceivedByUserIdResult result = client.unmarkReceivedByUserId(
        new UnmarkReceivedByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withStepNumber(1)
            .withTimeOffsetToken(null)
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.UnmarkReceivedByUserIdRequest;
using Gs2.Gs2LoginReward.Result.UnmarkReceivedByUserIdResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.UnmarkReceivedByUserIdResult> asyncResult = null;
yield return client.UnmarkReceivedByUserId(
    new Gs2.Gs2LoginReward.Request.UnmarkReceivedByUserIdRequest()
        .WithNamespaceName("namespace1")
        .WithBonusModelName("bonus-0001")
        .WithUserId("user-0001")
        .WithStepNumber(1)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.unmarkReceivedByUserId(
        new Gs2LoginReward.UnmarkReceivedByUserIdRequest()
            .withNamespaceName("namespace1")
            .withBonusModelName("bonus-0001")
            .withUserId("user-0001")
            .withStepNumber(1)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.unmark_received_by_user_id(
        login_reward.UnmarkReceivedByUserIdRequest()
            .with_namespace_name(self.hash1)
            .with_bonus_model_name('bonus-0001')
            .with_user_id('user-0001')
            .with_step_number(1)
            .with_time_offset_token(None)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.unmark_received_by_user_id({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    stepNumber=1,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.unmark_received_by_user_id_async({
    namespaceName="namespace1",
    bonusModelName="bonus-0001",
    userId="user-0001",
    stepNumber=1,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;

markReceivedByStampTask

Execute mark as received as consume action

Request

TypeConditionRequireDefaultLimitationDescription
stampTaskstring~ 5242880 charsConsume Action
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model
newContextStackstringRequest of context in which consume action execution results are recorded

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.MarkReceivedByStampTask(
    &login_reward.MarkReceivedByStampTaskRequest {
        StampTask: pointy.String("stampTask"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
newContextStack := result.NewContextStack
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\MarkReceivedByStampTaskRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->markReceivedByStampTask(
        (new MarkReceivedByStampTaskRequest())
            ->withStampTask(self::stampTask)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
    $newContextStack = $result->getNewContextStack();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.MarkReceivedByStampTaskRequest;
import io.gs2.loginReward.result.MarkReceivedByStampTaskResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    MarkReceivedByStampTaskResult result = client.markReceivedByStampTask(
        new MarkReceivedByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
    String newContextStack = result.getNewContextStack();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.MarkReceivedByStampTaskRequest;
using Gs2.Gs2LoginReward.Result.MarkReceivedByStampTaskResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.MarkReceivedByStampTaskResult> asyncResult = null;
yield return client.MarkReceivedByStampTask(
    new Gs2.Gs2LoginReward.Request.MarkReceivedByStampTaskRequest()
        .WithStampTask("stampTask")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
var newContextStack = result.NewContextStack;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.markReceivedByStampTask(
        new Gs2LoginReward.MarkReceivedByStampTaskRequest()
            .withStampTask("stampTask")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
    const newContextStack = result.getNewContextStack();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.mark_received_by_stamp_task(
        login_reward.MarkReceivedByStampTaskRequest()
            .with_stamp_task(self.stamp_task)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    bonus_model = result.bonus_model
    new_context_stack = result.new_context_stack
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.mark_received_by_stamp_task({
    stampTask="stampTask",
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
newContextStack = result.newContextStack;
client = gs2('loginReward')

api_result_handler = client.mark_received_by_stamp_task_async({
    stampTask="stampTask",
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
newContextStack = result.newContextStack;

unmarkReceivedByStampSheet

Execute unmark as received as acquire action

Request

TypeConditionRequireDefaultLimitationDescription
stampSheetstring~ 5242880 charsTransaction
keyIdstring~ 1024 charsencryption key GRN

Result

TypeDescription
itemReceiveStatusReceiveStatus
bonusModelBonusModelBonus Model

Implementation Example

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/login_reward"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := login_reward.Gs2LoginRewardRestClient{
    Session: &session,
}
result, err := client.UnmarkReceivedByStampSheet(
    &login_reward.UnmarkReceivedByStampSheetRequest {
        StampSheet: pointy.String("stampSheet"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
bonusModel := result.BonusModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\LoginReward\Gs2LoginRewardRestClient;
use Gs2\LoginReward\Request\UnmarkReceivedByStampSheetRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2AccountRestClient(
    $session
);

try {
    $result = $client->unmarkReceivedByStampSheet(
        (new UnmarkReceivedByStampSheetRequest())
            ->withStampSheet(self::stampSheet)
            ->withKeyId(self::key-0001)
    );
    $item = $result->getItem();
    $bonusModel = $result->getBonusModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.loginReward.rest.Gs2LoginRewardRestClient;
import io.gs2.loginReward.request.UnmarkReceivedByStampSheetRequest;
import io.gs2.loginReward.result.UnmarkReceivedByStampSheetResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
session.connect();
Gs2LoginRewardRestClient client = new Gs2LoginRewardRestClient(session);

try {
    UnmarkReceivedByStampSheetResult result = client.unmarkReceivedByStampSheet(
        new UnmarkReceivedByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    ReceiveStatus item = result.getItem();
    BonusModel bonusModel = result.getBonusModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core.Model.Region;
using Gs2.Core.Model.BasicGs2Credential;
using Gs2.Core.Net.Gs2RestSession;
using Gs2.Core.Exception.Gs2Exception;
using Gs2.Core.AsyncResult;
using Gs2.Gs2LoginReward.Gs2LoginRewardRestClient;
using Gs2.Gs2LoginReward.Request.UnmarkReceivedByStampSheetRequest;
using Gs2.Gs2LoginReward.Result.UnmarkReceivedByStampSheetResult;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    Region.ApNortheast1
);
yield return session.Open();
var client = new Gs2LoginRewardRestClient(session);

AsyncResult<Gs2.Gs2LoginReward.Result.UnmarkReceivedByStampSheetResult> asyncResult = null;
yield return client.UnmarkReceivedByStampSheet(
    new Gs2.Gs2LoginReward.Request.UnmarkReceivedByStampSheetRequest()
        .WithStampSheet("stampSheet")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var bonusModel = result.BonusModel;
import Gs2Core from '@/gs2/core';
import * as Gs2LoginReward from '@/gs2/loginReward';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2LoginReward.Gs2LoginRewardRestClient(session);

try {
    const result = await client.unmarkReceivedByStampSheet(
        new Gs2LoginReward.UnmarkReceivedByStampSheetRequest()
            .withStampSheet("stampSheet")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const bonusModel = result.getBonusModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import login_reward

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = login_reward.Gs2LoginRewardRestClient(session)

try:
    result = client.unmark_received_by_stamp_sheet(
        login_reward.UnmarkReceivedByStampSheetRequest()
            .with_stamp_sheet(self.stamp_sheet)
            .with_key_id(self.key1.key_id)
    )
    item = result.item
    bonus_model = result.bonus_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('loginReward')

api_result = client.unmark_received_by_stamp_sheet({
    stampSheet="stampSheet",
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;
client = gs2('loginReward')

api_result_handler = client.unmark_received_by_stamp_sheet_async({
    stampSheet="stampSheet",
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['message'])
end

result = api_result.result
item = result.item;
bonusModel = result.bonusModel;