GS2-Money2 SDK API Reference
Model
Namespace
Namespace
A Namespace allows multiple independent instances of the same service within a single project by separating data spaces and usage contexts. Each GS2 service is managed on a per-namespace basis. Even when using the same service, if the namespace differs, the data is treated as a completely independent data space.
Therefore, you must create a namespace before you can start using each service.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceId | string | * | ~ 1024 chars | Namespace GRN * Set automatically by the server | ||||||||
| name | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| description | string | ~ 1024 chars | Description | |||||||||
| transactionSetting | TransactionSetting | Transaction Setting | ||||||||||
| currencyUsagePriority | String Enum enum { “PrioritizeFree”, “PrioritizePaid” } | ✓ | Consumption priority
| |||||||||
| sharedFreeCurrency | bool | ✓ | Share the free currency with different slots | |||||||||
| platformSetting | PlatformSetting | ✓ | Store platform settings | |||||||||
| depositBalanceScript | ScriptSetting | Script setting to be executed when depositing wallet balance Script Trigger Reference - deposit | ||||||||||
| withdrawBalanceScript | ScriptSetting | Script setting to be executed when withdrawing wallet balance Script Trigger Reference - withdraw | ||||||||||
| verifyReceiptScript | ScriptSetting | Script setting to be executed when verifying a receipt Script Trigger Reference - verifyReceipt | ||||||||||
| subscribeScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when subscribing to a new contract(Not called when the user associated with the subscription is changed / Called when re-subscribing after contract expiration) Script Trigger Reference - subscribe | |||||||||
| renewScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when renewing a contract Script Trigger Reference - renew | |||||||||
| unsubscribeScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when unsubscribing from a contract(Not called when the user associated with the subscription is changed) Script Trigger Reference - unsubscribe | |||||||||
| takeOverScript | ScriptSetting | Script setting to be executed when taking over a contract Script Trigger Reference - takeOver | ||||||||||
| changeSubscriptionStatusNotification | NotificationSetting | Push notification when the subscription status of the period changes | ||||||||||
| logSetting | LogSetting | Log Output Setting | ||||||||||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server | ||||||||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||||||||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
TransactionSetting
Transaction Setting
Transaction Setting controls how transactions are executed, including their consistency, asynchronous processing, and conflict avoidance mechanisms. Combining features like AutoRun, AtomicCommit, asynchronous execution using GS2-Distributor, batch application of script results, and asynchronous Acquire Actions via GS2-JobQueue enables robust transaction management tailored to game logic.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| enableAutoRun | bool | false | Whether to automatically execute issued transactions on the server side | |||
| enableAtomicCommit | bool | {enableAutoRun} == true | false | Whether to commit the execution of transactions atomically * Applicable only if enableAutoRun is true | ||
| transactionUseDistributor | bool | {enableAtomicCommit} == true | false | Whether to execute transactions asynchronously * Applicable only if enableAtomicCommit is true | ||
| commitScriptResultInUseDistributor | bool | {transactionUseDistributor} == true | false | Whether to execute the commit processing of the script result asynchronously * Applicable only if transactionUseDistributor is true | ||
| acquireActionUseJobQueue | bool | {enableAtomicCommit} == true | false | Whether to use GS2-JobQueue to execute the acquire action * Applicable only if enableAtomicCommit is true | ||
| distributorNamespaceId | string | “grn:gs2:{region}:{ownerId}:distributor:default” | ~ 1024 chars | GS2-Distributor Namespace GRN used to execute transactions | ||
| queueNamespaceId | string | “grn:gs2:{region}:{ownerId}:queue:default” | ~ 1024 chars | GS2-JobQueue Namespace GRN used to execute transactions |
ScriptSetting
Script Setting
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’s execution results to halt API execution or control the API’s response content.
In contrast, asynchronous execution does not block processing until the script has finished executing. However, because the script result cannot be used to stop the API execution or modify the API response, asynchronous execution does not affect the API response flow and is generally recommended.
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.
| Type | Condition | Required | Default | Value Limits | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| triggerScriptId | string | ~ 1024 chars | GS2-Script script GRN
executed synchronously when the API is executed Must be specified in GRN format starting with “grn:gs2:”. | |||||||||||
| doneTriggerTargetType | String Enum enum { “none”, “gs2_script”, “aws” } | “none” | How to execute asynchronous scripts Specifies the type of script to use for asynchronous execution. You can choose from “Do not use asynchronous execution scripts (none)”, “Use GS2-Script (gs2_script)”, and “Use Amazon EventBridge (aws)”.
| |||||||||||
| doneTriggerScriptId | string | {doneTriggerTargetType} == “gs2_script” | ~ 1024 chars | GS2-Script script GRN
for asynchronous execution Must be specified in GRN format starting with “grn:gs2:”. * Applicable only if doneTriggerTargetType is “gs2_script” | ||||||||||
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == “gs2_script” | ~ 1024 chars | GS2-JobQueue namespace GRN
to execute asynchronous execution scripts If you want to execute asynchronous execution scripts via GS2-JobQueue instead of executing them directly, specify the GS2-JobQueue namespace GRN. There are not many cases where GS2-JobQueue is required, so you generally do not need to specify it unless you have a specific reason. * Applicable only if doneTriggerTargetType is “gs2_script” |
NotificationSetting
Push Notification Settings
This is a setting for sending push notifications when an event occurs in a GS2 microservice. The push notification here refers to the processing via the WebSocket interface provided by GS2-Gateway, and is different from the push notification of a smartphone. For example, when a matchmaking is completed or a friend request is received, the GS2-Gateway can send a push notification via the WebSocket interface, and the game client can detect the change of the state.
GS2-Gateway’s push notifications can be used to forward notifications to mobile push notification services when the destination device is offline. By properly utilizing mobile push notifications, you can implement a flow in which players are notified even if they exit the game during matchmaking and later return to it.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gatewayNamespaceId | string | “grn:gs2:{region}:{ownerId}:gateway:default” | ~ 1024 chars | GS2-Gateway namespace to use for push notifications Specify the GS2-Gateway namespace ID in GRN format starting with “grn:gs2:”. | ||||||||
| enableTransferMobileNotification | bool? | false | Forwarding to mobile push notification When this notification is sent, if the destination device is offline, specify whether to forward it to mobile push notification. | |||||||||
| sound | string | {enableTransferMobileNotification} == true | ~ 1024 chars | Sound file name to be used for mobile push notifications The sound file name specified here is used when sending mobile push notifications, and you can send notifications with a special sound. * Applicable only if enableTransferMobileNotification is true | ||||||||
| enable | String Enum enum { “Enabled”, “Disabled” } | “Enabled” | Whether to enable push notifications
|
LogSetting
Log Output Setting
Log Output Setting defines how log data is exported. This type holds the GS2-Log namespace identifier (Namespace ID) used to export log data. Specify the GS2-Log namespace where log data is collected and stored in the GRN format for the Log Namespace ID (loggingNamespaceId). Configuring this setting ensures that log data for API requests and responses occurring within the specified namespace is output to the target GS2-Log namespace. GS2-Log provides real-time logs that can be used for system monitoring, analysis, debugging, and other operational purposes.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| loggingNamespaceId | string | ✓ | ~ 1024 chars | GS2-Log namespace GRN
to output logs Must be specified in GRN format starting with “grn:gs2:”. |
GitHubCheckoutSetting
Setup to check out master data from GitHub
| Type | Condition | Required | Default | Value Limits | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| apiKeyId | string | ✓ | ~ 1024 chars | GitHub API Key GRN | ||||||||||
| repositoryName | string | ✓ | ~ 1024 chars | Repository Name | ||||||||||
| sourcePath | string | ✓ | ~ 1024 chars | Master data (JSON) file path | ||||||||||
| referenceType | String Enum enum { “commit_hash”, “branch”, “tag” } | ✓ | Source of code
| |||||||||||
| commitHash | string | {referenceType} == “commit_hash” | ✓* | ~ 1024 chars | Commit hash * Required if referenceType is “commit_hash” | |||||||||
| branchName | string | {referenceType} == “branch” | ✓* | ~ 1024 chars | Branch Name * Required if referenceType is “branch” | |||||||||
| tagName | string | {referenceType} == “tag” | ✓* | ~ 1024 chars | Tag Name * Required if referenceType is “tag” |
Wallet
Wallet
Currency in the wallet is managed separately for currency purchased for a fee and currency obtained for free. Currency purchased for a fee is further managed by the unit price at the time of purchase, allowing for refunds in the event of service termination, or to determine if the balance is sufficient to meet the requirements of the Funds Settlement Act.
The wallet has slots and each slot has a different balance. If balances cannot be shared across platforms, they can be managed separately by using different slots for each platform. Currency acquired for free can also be shared across all platforms.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| walletId | string | * | ~ 1024 chars | Wallet GRN * Set automatically by the server | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| summary | WalletSummary | ✓ | Wallet Status | |||
| depositTransactions | List<DepositTransaction> | [] | 0 ~ 1000 items | List of deposit transactions | ||
| sharedFreeCurrency | bool | ✓ | Share free currency | |||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server | ||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
Event
Event
Event are entities that record payment history. Payment history includes not only requests for increases or decreases in billing currency, but also the history of payment transactions on various delivery platforms.
| Type | Condition | Required | Default | Value Limits | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| eventId | string | * | ~ 1024 chars | Event GRN * Set automatically by the server | ||||||||||||
| transactionId | string | ✓ | ~ 1024 chars | Transaction ID | ||||||||||||
| userId | string | ✓ | ~ 128 chars | User ID | ||||||||||||
| eventType | String Enum enum { “VerifyReceipt”, “Deposit”, “Withdraw”, “Refund” } | ✓ | Event Type
| |||||||||||||
| verifyReceiptEvent | VerifyReceiptEvent | Verify Receipt Event | ||||||||||||||
| depositEvent | DepositEvent | Deposit Event | ||||||||||||||
| withdrawEvent | WithdrawEvent | Withdraw Event | ||||||||||||||
| refundEvent | RefundEvent | Refund Event | ||||||||||||||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server | ||||||||||||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
SubscribeTransaction
Subscription purchase information
| Type | Condition | Required | Default | Value Limits | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| subscribeTransactionId | string | * | ~ 1024 chars | Subscription Transaction GRN * Set automatically by the server | ||||||||||||||||||||||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||||||||||||||||||||||
| transactionId | string | ✓ | ~ 1024 chars | Transaction ID | ||||||||||||||||||||||
| store | String Enum enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | Store
| |||||||||||||||||||||||
| userId | string | ~ 128 chars | User ID | |||||||||||||||||||||||
| statusDetail | String Enum enum { “active@active”, “active@converted_from_trial”, “active@in_trial”, “active@in_intro_offer”, “grace@canceled”, “grace@grace_period”, “grace@on_hold”, “inactive@expired”, “inactive@revoked” } | ✓ | Status
| |||||||||||||||||||||||
| expiresAt | long | ✓ | Expiration time | |||||||||||||||||||||||
| lastAllocatedAt | long | Last time allocated to user | ||||||||||||||||||||||||
| lastTakeOverAt | long | Last time taken over by user | ||||||||||||||||||||||||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server | ||||||||||||||||||||||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||||||||||||||||||||||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
SubscriptionStatus
Subscription status
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| userId | string | ~ 128 chars | User ID | |||||||||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||||||||
| status | String Enum enum { “active”, “inactive” } | ✓ | Status
| |||||||||
| expiresAt | long | ✓ | Expiration time | |||||||||
| detail | List<SubscribeTransaction> | [] | 0 ~ 100 items | Subscription status details |
RefundHistory
Refund history information
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| refundHistoryId | string | * | ~ 1024 chars | Subscription Transaction GRN * Set automatically by the server | ||
| transactionId | string | ✓ | ~ 1024 chars | Transaction ID | ||
| year | int | ✓ | 2000 ~ 3000 | Year | ||
| month | int | ✓ | 1 ~ 12 | Month | ||
| day | int | ✓ | 1 ~ 31 | Day | ||
| userId | string | ~ 128 chars | User ID | |||
| detail | RefundEvent | ✓ | Refund event information | |||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server |
DailyTransactionHistory
Transaction History of Daily Transactions
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| dailyTransactionHistoryId | string | * | ~ 1024 chars | Transaction History of Daily Transactions GRN * Set automatically by the server | ||
| year | int | ✓ | 2000 ~ 3000 | Year | ||
| month | int | ✓ | 1 ~ 12 | Month | ||
| day | int | ✓ | 1 ~ 31 | Day | ||
| currency | string | ✓ | ~ 8 chars | Currency Code | ||
| depositAmount | double | 0 | 0 ~ 281474976710654 | Deposit Amount | ||
| withdrawAmount | double | 0 | 0 ~ 281474976710654 | Withdraw Amount | ||
| issueCount | long | 0 | 0 ~ 9223372036854775805 | Issue Count | ||
| consumeCount | long | 0 | 0 ~ 9223372036854775805 | Consume Count | ||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
UnusedBalance
Unused Balance
Entity that holds the Unused Balance of billing currency for each currency.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| unusedBalanceId | string | * | ~ 1024 chars | Unused Balance GRN * Set automatically by the server | ||
| currency | string | ✓ | ~ 8 chars | Currency Code | ||
| balance | double | ✓ | 0 ~ 16777214 | Unused balance | ||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
StoreContentModel
Store Content Model
This is a model for storing content from various store platforms.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| storeContentModelId | string | * | ~ 1024 chars | Store Content Model GRN * Set automatically by the server | ||
| name | string | ✓ | ~ 128 chars | Store Content Model name | ||
| metadata | string | ~ 1024 chars | Metadata Arbitrary values can be set in the metadata. Since they do not affect GS2’s behavior, they can be used to store information used in the game. | |||
| appleAppStore | AppleAppStoreContent | Apple AppStore Content | ||||
| googlePlay | GooglePlayContent | Google Play Content |
StoreSubscriptionContentModel
Store Subscription Content Model
This is a model for storing subscription-based content from various store platforms.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| storeSubscriptionContentModelId | string | * | ~ 1024 chars | Subscription Content Model GRN * Set automatically by the server | ||||||||
| name | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||||||||
| metadata | string | ~ 1024 chars | Metadata | |||||||||
| scheduleNamespaceId | string | ✓ | ~ 1024 chars | Namespace GRN of GS2-Schedule to link the subscription period | ||||||||
| triggerName | string | ✓ | ~ 128 chars | Trigger name to reflect the subscription period | ||||||||
| triggerExtendMode | String Enum enum { “just”, “rollupHour” } | “just” | Mode to reflect the subscription period on the trigger
| |||||||||
| rollupHour | int | {triggerExtendMode} == “rollupHour” | 0 | 0 ~ 23 | Hour of the day to roll up the subscription period (UTC) * Applicable only if triggerExtendMode is “rollupHour” | |||||||
| reallocateSpanDays | int | 30 | 0 ~ 365 | Time span (days) that allows subscription contract information to be assigned to other users | ||||||||
| appleAppStore | AppleAppStoreSubscriptionContent | Apple AppStore Content | ||||||||||
| googlePlay | GooglePlaySubscriptionContent | Google Play Content |
Receipt
Receipt of store platform
| Type | Condition | Required | Default | Value Limits | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Store | String Enum enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | Store
| |||||||||||
| TransactionID | string | ✓ | ~ 1024 chars | Transaction ID | ||||||||||
| Payload | string | ✓ | ~ 1048576 chars | Payload |
PlatformSetting
Platform Setting
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| appleAppStore | AppleAppStoreSetting | Apple AppStore Setting | ||||
| googlePlay | GooglePlaySetting | Google Play Setting | ||||
| fake | FakeSetting | Fake(Unity Editor) Setting |
AppleAppStoreSetting
Apple AppStore Setting
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| bundleId | string | ~ 1024 chars | Apple AppStore Bundle ID | |||
| sharedSecretKey | string | ~ 1024 chars | Shared secret key used to encrypt the receipt issued by AppStore Connect | |||
| issuerId | string | ~ 1024 chars | Issuer ID of in-app purchases registered with AppStore Connect | |||
| keyId | string | ~ 1024 chars | Key ID registered with Apple | |||
| privateKeyPem | string | ~ 10240 chars | Private Key received from Apple |
GooglePlaySetting
Google Play Setting
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| packageName | string | ~ 5120 chars | Package Name to be distributed on Google Play | |||
| publicKey | string | ~ 5120 chars | Public key used for signature verification |
FakeSetting
Fake Setting for Debug
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| acceptFakeReceipt | String Enum enum { “Accept”, “Reject” } | “Reject” | Whether to allow payments using fake receipts output by UnityEditor
|
WalletSummary
Wallet Status
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| paid | int | 0 | 0 ~ 2147483646 | Count of paid currency | ||
| free | int | 0 | 0 ~ 2147483646 | Count of free currency | ||
| total | int | 0 | 0 ~ 2147483646 | Count of Total |
DepositTransaction
Deposit Transaction
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| price | double | ✓ | 0.0 ~ 100000000.0 | Purchase Price | ||
| currency | string | {price} > 0 | ✓* | ~ 8 chars | Currency Code * Required if price is greater than 0 | |
| count | int | ✓ | 0 ~ 2147483646 | Quantity of premium currency | ||
| depositedAt | long | Deposit Date |
VerifyReceiptEvent
Verify Receipt Event
| Type | Condition | Required | Default | Value Limits | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| contentName | string | ✓ | ~ 128 chars | Store Content Model name | ||||||||||
| platform | String Enum enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | Store Platform
| |||||||||||
| appleAppStoreVerifyReceiptEvent | AppleAppStoreVerifyReceiptEvent | Apple AppStore Verify Receipt Event | ||||||||||||
| googlePlayVerifyReceiptEvent | GooglePlayVerifyReceiptEvent | Google Play Verify Receipt Event |
DepositEvent
Deposit Event
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| depositTransactions | List<DepositTransaction> | [] | 0 ~ 1000 items | List of deposit transactions | ||
| status | WalletSummary | ✓ | Wallet Status |
WithdrawEvent
Withdraw Event
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| withdrawDetails | List<DepositTransaction> | [] | 0 ~ 1000 items | List of details of the withdrawn wallet | ||
| status | WalletSummary | ✓ | Wallet Status |
RefundEvent
Refund Event
| Type | Condition | Required | Default | Value Limits | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| contentName | string | ✓ | ~ 128 chars | Store Content Model name | ||||||||||
| platform | String Enum enum { “AppleAppStore”, “GooglePlay”, “fake” } | ✓ | Store Platform
| |||||||||||
| appleAppStoreRefundEvent | AppleAppStoreVerifyReceiptEvent | Apple AppStore Verify Receipt Event | ||||||||||||
| googlePlayRefundEvent | GooglePlayVerifyReceiptEvent | Google Play Verify Receipt Event |
AppleAppStoreVerifyReceiptEvent
Apple AppStore Receipt
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| environment | String Enum enum { “sandbox”, “production” } | ✓ | Environment
|
GooglePlayVerifyReceiptEvent
Google Play Receipt Verification Event
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| purchaseToken | string | ~ 4096 chars | Purchase Token |
AppleAppStoreContent
Content of Apple AppStore
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| productId | string | ~ 1024 chars | Product ID |
GooglePlayContent
Content of Google Play
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| productId | string | ~ 1024 chars | Product ID |
AppleAppStoreSubscriptionContent
Subscription content of Apple AppStore
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| subscriptionGroupIdentifier | string | ~ 64 chars | Subscription Group ID |
GooglePlaySubscriptionContent
Google Play Subscription Content
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| productId | string | ~ 1024 chars | Product ID |
GooglePlayRealtimeNotificationMessage
RTDN Message
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| data | string | ✓ | ~ 1048576 chars | Data | ||
| messageId | string | ✓ | ~ 1024 chars | Message ID | ||
| publishTime | string | ✓ | ~ 1024 chars | Publish Time |
CurrentModelMaster
Currently active Models master data
This master data describes the definitions of Models currently active within the namespace. GS2 uses JSON format files for managing master data. By uploading these files, the master data settings are updated on the server.
To create JSON files, GS2 provides a master data editor within the management console. Additionally, you can create tools better suited for game operations and export JSON files in the appropriate format.
Note
Please refer to Master Data Reference of GS2-Money2 for the JSON file format.| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceId | string | * | ~ 1024 chars | Namespace GRN * Set automatically by the server | ||
| settings | string | ✓ | ~ 5242880 bytes (5MB) | Master Data |
StoreContentModelMaster
Store Content Model Master
The Store Content Model is a model that stores content from various store platforms.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| storeContentModelId | string | * | ~ 1024 chars | Content Model Master GRN * Set automatically by the server | ||
| name | string | ✓ | ~ 128 chars | Store Content Model name | ||
| description | string | ~ 1024 chars | Description | |||
| metadata | string | ~ 1024 chars | Metadata | |||
| appleAppStore | AppleAppStoreContent | Apple AppStore Content | ||||
| googlePlay | GooglePlayContent | Google Play Content | ||||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server | ||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
StoreSubscriptionContentModelMaster
Store Subscription Content Model Master
The Store Subscription Content Model is a model that stores subscription-based content from various store platforms.
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| storeSubscriptionContentModelId | string | * | ~ 1024 chars | Subscription Content Model Master GRN * Set automatically by the server | ||||||||
| name | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||||||||
| description | string | ~ 1024 chars | Description | |||||||||
| metadata | string | ~ 1024 chars | Metadata | |||||||||
| scheduleNamespaceId | string | ✓ | ~ 1024 chars | Namespace GRN of GS2-Schedule to link the subscription period | ||||||||
| triggerName | string | ✓ | ~ 128 chars | Trigger name to reflect the subscription period | ||||||||
| reallocateSpanDays | int | 30 | 0 ~ 365 | Time span (days) that allows subscription contract information to be assigned to other users | ||||||||
| triggerExtendMode | String Enum enum { “just”, “rollupHour” } | “just” | Mode to reflect the subscription period on the trigger
| |||||||||
| rollupHour | int | {triggerExtendMode} == “rollupHour” | 0 | 0 ~ 23 | Hour of the day to roll up the subscription period (UTC) * Applicable only if triggerExtendMode is “rollupHour” | |||||||
| appleAppStore | AppleAppStoreSubscriptionContent | Apple AppStore Content | ||||||||||
| googlePlay | GooglePlaySubscriptionContent | Google Play Content | ||||||||||
| createdAt | long | * | Now | Datetime of creation Unix time, milliseconds * Set automatically by the server | ||||||||
| updatedAt | long | * | Now | Datetime of last update Unix time, milliseconds * Set automatically by the server | ||||||||
| revision | long | 0 | 0 ~ 9223372036854775805 | Revision |
Methods
describeNamespaces
Get a list of Namespaces
Retrieves a list of namespaces that have been created on a per-service basis within the project. You can use the optional page token to start acquiring data from a specific location in the list. You can also limit the number of namespaces to be acquired.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namePrefix | string | ~ 64 chars | Filter by Namespace name prefix | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<Namespace> | List of Namespace |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeNamespaces(
&money2.DescribeNamespacesRequest {
NamePrefix: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokencreateNamespace
Create a new Namespace
You must specify detailed information including the name, description, and various settings of the namespace.
Request
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| currencyUsagePriority | String Enum enum { “PrioritizeFree”, “PrioritizePaid” } | ✓ | Consumption priority
| |||||||||
| description | string | ~ 1024 chars | Description | |||||||||
| transactionSetting | TransactionSetting | Transaction Setting | ||||||||||
| sharedFreeCurrency | bool | ✓ | Share the free currency with different slots | |||||||||
| platformSetting | PlatformSetting | ✓ | Store platform settings | |||||||||
| depositBalanceScript | ScriptSetting | Script setting to be executed when depositing wallet balance Script Trigger Reference - deposit | ||||||||||
| withdrawBalanceScript | ScriptSetting | Script setting to be executed when withdrawing wallet balance Script Trigger Reference - withdraw | ||||||||||
| verifyReceiptScript | ScriptSetting | Script setting to be executed when verifying a receipt Script Trigger Reference - verifyReceipt | ||||||||||
| subscribeScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when subscribing to a new contract(Not called when the user associated with the subscription is changed / Called when re-subscribing after contract expiration) Script Trigger Reference - subscribe | |||||||||
| renewScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when renewing a contract Script Trigger Reference - renew | |||||||||
| unsubscribeScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when unsubscribing from a contract(Not called when the user associated with the subscription is changed) Script Trigger Reference - unsubscribe | |||||||||
| takeOverScript | ScriptSetting | Script setting to be executed when taking over a contract Script Trigger Reference - takeOver | ||||||||||
| changeSubscriptionStatusNotification | NotificationSetting | Push notification when the subscription status of the period changes | ||||||||||
| logSetting | LogSetting | Log Output Setting |
Result
| Type | Description | |
|---|---|---|
| item | Namespace | Namespace created |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CreateNamespace(
&money2.CreateNamespaceRequest {
Name: pointy.String("namespace-0001"),
CurrencyUsagePriority: pointy.String("PrioritizeFree"),
Description: nil,
TransactionSetting: nil,
SharedFreeCurrency: pointy.Bool(false),
PlatformSetting: nil,
DepositBalanceScript: nil,
WithdrawBalanceScript: nil,
VerifyReceiptScript: nil,
SubscribeScript: nil,
RenewScript: nil,
UnsubscribeScript: nil,
TakeOverScript: nil,
ChangeSubscriptionStatusNotification: nil,
LogSetting: &money2.LogSetting{
LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetNamespaceStatus
Get Namespace status
Get the current status of the specified namespace. This includes whether the Namespace is active, pending, or in some other state.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| status | string |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetNamespaceStatus(
&money2.GetNamespaceStatusRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
status := result.StatusgetNamespace
Get namespace
Get detailed information about the specified namespace. This includes the name, description, and other settings of the namespace.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| item | Namespace | Namespace |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetNamespace(
&money2.GetNamespaceRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemupdateNamespace
Update Namespace
Update the settings of the specified namespace. You can change the description of the Namespace and specific settings.
Request
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| currencyUsagePriority | String Enum enum { “PrioritizeFree”, “PrioritizePaid” } | ✓ | Consumption priority
| |||||||||
| description | string | ~ 1024 chars | Description | |||||||||
| transactionSetting | TransactionSetting | Transaction Setting | ||||||||||
| platformSetting | PlatformSetting | ✓ | Store platform settings | |||||||||
| depositBalanceScript | ScriptSetting | Script setting to be executed when depositing wallet balance Script Trigger Reference - deposit | ||||||||||
| withdrawBalanceScript | ScriptSetting | Script setting to be executed when withdrawing wallet balance Script Trigger Reference - withdraw | ||||||||||
| verifyReceiptScript | ScriptSetting | Script setting to be executed when verifying a receipt Script Trigger Reference - verifyReceipt | ||||||||||
| subscribeScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when subscribing to a new contract(Not called when the user associated with the subscription is changed / Called when re-subscribing after contract expiration) Script Trigger Reference - subscribe | |||||||||
| renewScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when renewing a contract Script Trigger Reference - renew | |||||||||
| unsubscribeScript | string | ~ 1024 chars | GS2-Script script GRN to be executed when unsubscribing from a contract(Not called when the user associated with the subscription is changed) Script Trigger Reference - unsubscribe | |||||||||
| takeOverScript | ScriptSetting | Script setting to be executed when taking over a contract Script Trigger Reference - takeOver | ||||||||||
| changeSubscriptionStatusNotification | NotificationSetting | Push notification when the subscription status of the period changes | ||||||||||
| logSetting | LogSetting | Log Output Setting |
Result
| Type | Description | |
|---|---|---|
| item | Namespace | Namespace updated |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.UpdateNamespace(
&money2.UpdateNamespaceRequest {
NamespaceName: pointy.String("namespace-0001"),
CurrencyUsagePriority: pointy.String("PrioritizePaid"),
Description: pointy.String("description1"),
TransactionSetting: nil,
PlatformSetting: &money2.PlatformSetting{
},
DepositBalanceScript: &money2.ScriptSetting{
TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1003"),
DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1004"),
},
WithdrawBalanceScript: &money2.ScriptSetting{
TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1005"),
DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-1006"),
},
VerifyReceiptScript: nil,
SubscribeScript: nil,
RenewScript: nil,
UnsubscribeScript: nil,
TakeOverScript: nil,
ChangeSubscriptionStatusNotification: nil,
LogSetting: &money2.LogSetting{
LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdeleteNamespace
Delete Namespace
Delete the specified namespace. This operation is irreversible and all data associated with the deleted Namespace will be lost.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| item | Namespace | The deleted Namespace |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DeleteNamespace(
&money2.DeleteNamespaceRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetServiceVersion
Get the microservice version
Request
Request parameters: None
Result
| Type | Description | |
|---|---|---|
| item | string | Version |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetServiceVersion(
&money2.GetServiceVersionRequest {
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdumpUserDataByUserId
Dump data associated with the specified user ID
Can be used to meet legal requirements for the protection of personal information, or to back up or migrate data.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description |
|---|
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DumpUserDataByUserId(
&money2.DumpUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}checkDumpUserDataByUserId
Check if the dump of the data associated with the specified user ID is complete
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| url | string | URL of output data |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
&money2.CheckDumpUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
url := result.UrlcleanUserDataByUserId
Delete user data
Execute cleaning of data associated with the specified user ID This allows you to safely delete specific user data from the project.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description |
|---|
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CleanUserDataByUserId(
&money2.CleanUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}checkCleanUserDataByUserId
Check if the clean of the data associated with the specified user ID is complete
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description |
|---|
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
&money2.CheckCleanUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}prepareImportUserDataByUserId
Execute import of data associated with the specified user ID
The data that can be used for import is limited to the data exported by GS2, and old data may fail to import. You can import data with a user ID different from the one you exported, but if the user ID is included in the payload of the user data, this may not be the case.
You can start the actual import process by uploading the exported zip file to the URL returned in the return value of this API and calling importUserDataByUserId.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| uploadToken | string | Token used to reflect results after upload |
| uploadUrl | string | URL used to upload user data |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
&money2.PrepareImportUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrlimportUserDataByUserId
Execute import of data associated with the specified user ID
The data that can be used for import is limited to the data exported by GS2, and old data may fail to import. You can import data with a user ID different from the one you exported, but if the user ID is included in the payload of the user data, this may not be the case.
Before calling this API, you must call prepareImportUserDataByUserId to complete the upload preparation.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| uploadToken | string | ✓ | ~ 1024 chars | Token received in preparation for upload | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description |
|---|
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.ImportUserDataByUserId(
&money2.ImportUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
UploadToken: pointy.String("upload-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}checkImportUserDataByUserId
Check if the import of the data associated with the specified user ID is complete
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| userId | string | ✓ | ~ 128 chars | User ID | ||
| uploadToken | string | ✓ | ~ 1024 chars | Token received in preparation for upload | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| url | string | URL of log data |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
&money2.CheckImportUserDataByUserIdRequest {
UserId: pointy.String("user-0001"),
UploadToken: pointy.String("upload-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
url := result.UrldescribeWallets
Get a list of wallets
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<Wallet> | List of Wallets |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeWallets(
&money2.DescribeWalletsRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokendescribeWalletsByUserId
Get a list of wallets by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| items | List<Wallet> | List of Wallets |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeWalletsByUserId(
&money2.DescribeWalletsByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
PageToken: nil,
Limit: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokengetWallet
Get Wallet
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number |
Result
| Type | Description | |
|---|---|---|
| item | Wallet | Wallet |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetWallet(
&money2.GetWalletRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
Slot: pointy.Int32(0),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetWalletByUserId
Get Wallet by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | Wallet | Wallet |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetWalletByUserId(
&money2.GetWalletByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
Slot: pointy.Int32(0),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdepositByUserId
Deposit balance to Wallet by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| depositTransactions | List<DepositTransaction> | ✓ | 1 ~ 1000 items | List of Deposit transactions | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | Wallet | Wallet after deposit |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DepositByUserId(
&money2.DepositByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
Slot: pointy.Int32(0),
DepositTransactions: []money2.DepositTransaction{
money2.DepositTransaction{
Price: pointy.Float64(120),
Currency: pointy.String("JPY"),
Count: pointy.Int32(50),
},
},
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Itemwithdraw
Withdraw balance from wallet
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| withdrawCount | int | ✓ | 1 ~ 2147483646 | Quantity of premium currency to be consumed | ||
| paidOnly | bool | false | Only for paid currency |
Result
| Type | Description | |
|---|---|---|
| item | Wallet | Post-withdraw Wallet |
| withdrawTransactions | List<DepositTransaction> | List of consumed deposit transactions |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.Withdraw(
&money2.WithdrawRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
Slot: pointy.Int32(0),
WithdrawCount: pointy.Int32(50),
PaidOnly: pointy.Bool(false),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
withdrawTransactions := result.WithdrawTransactionswithdrawByUserId
Withdraw balance from Wallet by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| slot | int | ✓ | 0 ~ 100000000 | Slot Number | ||
| withdrawCount | int | ✓ | 1 ~ 2147483646 | Quantity of premium currency to be consumed | ||
| paidOnly | bool | false | Only for paid currency | |||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | Wallet | Post-withdraw Wallet |
| withdrawTransactions | List<DepositTransaction> | List of consumed deposit transactions |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.WithdrawByUserId(
&money2.WithdrawByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
Slot: pointy.Int32(0),
WithdrawCount: pointy.Int32(50),
PaidOnly: pointy.Bool(false),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.Item
withdrawTransactions := result.WithdrawTransactionsdescribeEventsByUserId
Get a list of Events
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| begin | long | The absolute time 30 days prior to the current time | Search start date and time | |||
| end | long | Now | Search end date and time | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| items | List<Event> | List of Events |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeEventsByUserId(
&money2.DescribeEventsByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
Begin: nil,
End: nil,
PageToken: nil,
Limit: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokengetEventByTransactionId
Get Event by specifying transaction ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| transactionId | string | ✓ | ~ 1024 chars | Transaction ID |
Result
| Type | Description | |
|---|---|---|
| item | Event | Event |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetEventByTransactionId(
&money2.GetEventByTransactionIdRequest {
NamespaceName: pointy.String("namespace-0001"),
TransactionId: pointy.String("transaction-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemverifyReceipt
Record receipt
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ✓ | ~ 128 chars | Access token | ||
| contentName | string | ✓ | ~ 128 chars | Store Content Model name | ||
| receipt | Receipt | ✓ | Receipt |
Result
| Type | Description | |
|---|---|---|
| item | Event | Event |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.VerifyReceipt(
&money2.VerifyReceiptRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
ContentName: pointy.String("content-0001"),
Receipt: &money2.Receipt{
Store: pointy.String("AppleAppStore"),
TransactionID: pointy.String("transaction-0001"),
Payload: pointy.String("payload"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemverifyReceiptByUserId
Record receipt as used by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ✓ | ~ 128 chars | User ID | ||
| contentName | string | ✓ | ~ 128 chars | Store Content Model name | ||
| receipt | Receipt | ✓ | Receipt | |||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | Event | Event |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.VerifyReceiptByUserId(
&money2.VerifyReceiptByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
ContentName: pointy.String("content-0001"),
Receipt: &money2.Receipt{
Store: pointy.String("AppleAppStore"),
TransactionID: pointy.String("transaction-0001"),
Payload: pointy.String("payload"),
},
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeSubscriptionStatuses
Get a list of Store Subscription Statuses
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ~ 128 chars | Access token |
Result
| Type | Description | |
|---|---|---|
| items | List<SubscriptionStatus> | List of Subscription statuses |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeSubscriptionStatuses(
&money2.DescribeSubscriptionStatusesRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
}
)
if err != nil {
panic("error occurred")
}
items := result.ItemsdescribeSubscriptionStatusesByUserId
Get a list of Store Subscription Statuses by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ~ 128 chars | User ID | |||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| items | List<SubscriptionStatus> | List of Subscription statuses |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeSubscriptionStatusesByUserId(
&money2.DescribeSubscriptionStatusesByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.ItemsgetSubscriptionStatus
Get subscription status
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ~ 128 chars | Access token | |||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | SubscriptionStatus | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetSubscriptionStatus(
&money2.GetSubscriptionStatusRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetSubscriptionStatusByUserId
Get subscription status by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ~ 128 chars | User ID | |||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | SubscriptionStatus | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetSubscriptionStatusByUserId(
&money2.GetSubscriptionStatusByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
ContentName: pointy.String("content-0001"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemallocateSubscriptionStatus
Allocate subscription status from receipt
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ~ 128 chars | Access token | |||
| receipt | string | ✓ | ~ 1024 chars | Receipt |
Result
| Type | Description | |
|---|---|---|
| item | SubscriptionStatus | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.AllocateSubscriptionStatus(
&money2.AllocateSubscriptionStatusRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
Receipt: pointy.String("{\"Store\": \"AppleAppStore\", \"TransactionID\": \"transaction-0001\", \"Payload\": \"payload\"}"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemallocateSubscriptionStatusByUserId
Allocate subscription status by specifying a user ID from receipt
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ~ 128 chars | User ID | |||
| receipt | string | ✓ | ~ 1024 chars | Receipt | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | SubscriptionStatus | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.AllocateSubscriptionStatusByUserId(
&money2.AllocateSubscriptionStatusByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
Receipt: pointy.String("{\"Store\": \"AppleAppStore\", \"TransactionID\": \"transaction-0001\", \"Payload\": \"payload\"}"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemtakeoverSubscriptionStatus
Take over the subscription status of a subscription that is already assigned to another user
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| accessToken | string | ~ 128 chars | Access token | |||
| receipt | string | ✓ | ~ 1024 chars | Receipt |
Result
| Type | Description | |
|---|---|---|
| item | SubscriptionStatus | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.TakeoverSubscriptionStatus(
&money2.TakeoverSubscriptionStatusRequest {
NamespaceName: pointy.String("namespace-0001"),
AccessToken: pointy.String("accessToken-0001"),
Receipt: pointy.String("{\"Store\": \"AppleAppStore\", \"TransactionID\": \"transaction-0001\", \"Payload\": \"payload\"}"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemtakeoverSubscriptionStatusByUserId
Take over the subscription status of a subscription that is already assigned to another user
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ~ 128 chars | User ID | |||
| receipt | string | ✓ | ~ 1024 chars | Receipt | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| item | SubscriptionStatus | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.TakeoverSubscriptionStatusByUserId(
&money2.TakeoverSubscriptionStatusByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
Receipt: pointy.String("{\"Store\": \"AppleAppStore\", \"TransactionID\": \"transaction-0001\", \"Payload\": \"payload\"}"),
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeRefundHistoriesByUserId
Get a list of store refund history by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| userId | string | ~ 128 chars | User ID | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve | ||
| timeOffsetToken | string | ~ 1024 chars | Time offset token |
Result
| Type | Description | |
|---|---|---|
| items | List<RefundHistory> | List of refund history |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeRefundHistoriesByUserId(
&money2.DescribeRefundHistoriesByUserIdRequest {
NamespaceName: pointy.String("namespace-0001"),
UserId: pointy.String("user-0001"),
PageToken: nil,
Limit: nil,
TimeOffsetToken: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokendescribeRefundHistoriesByDate
Get a list of store refund history by year and month
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| year | int | ✓ | 2000 ~ 3000 | Year | ||
| month | int | ✓ | 1 ~ 12 | Month | ||
| day | int | 1 ~ 31 | Day | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<RefundHistory> | List of refund history |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeRefundHistoriesByDate(
&money2.DescribeRefundHistoriesByDateRequest {
NamespaceName: pointy.String("namespace-0001"),
Year: pointy.Int32(2025),
Month: pointy.Int32(1),
Day: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokengetRefundHistory
Get refund status by specifying a user ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| transactionId | string | ✓ | ~ 1024 chars | Transaction ID |
Result
| Type | Description | |
|---|---|---|
| item | RefundHistory | Subscription status |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetRefundHistory(
&money2.GetRefundHistoryRequest {
NamespaceName: pointy.String("namespace-0001"),
TransactionId: pointy.String("transaction-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeDailyTransactionHistoriesByCurrency
Get a list of daily transaction histories by specifying currency
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| currency | string | ✓ | ~ 8 chars | Currency Code | ||
| year | int | ✓ | 2000 ~ 3000 | Year | ||
| month | int | 1 ~ 12 | Month | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<DailyTransactionHistory> | List of Daily Transaction Histories |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeDailyTransactionHistoriesByCurrency(
&money2.DescribeDailyTransactionHistoriesByCurrencyRequest {
NamespaceName: pointy.String("namespace-0001"),
Currency: pointy.String("JPY"),
Year: pointy.Int32(2024),
Month: pointy.Int32(1),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokendescribeDailyTransactionHistories
Get a list of daily transaction histories
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| year | int | ✓ | 2000 ~ 3000 | Year | ||
| month | int | 1 ~ 12 | Month | |||
| day | int | {month} > 0 | 1 ~ 31 | Day | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<DailyTransactionHistory> | List of Daily Transaction Histories |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeDailyTransactionHistories(
&money2.DescribeDailyTransactionHistoriesRequest {
NamespaceName: pointy.String("namespace-0001"),
Year: pointy.Int32(2024),
Month: pointy.Int32(1),
Day: pointy.Int32(2),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokengetDailyTransactionHistory
Get receipt by specifying transaction ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| year | int | ✓ | 2000 ~ 3000 | Year | ||
| month | int | ✓ | 1 ~ 12 | Month | ||
| day | int | ✓ | 1 ~ 31 | Day | ||
| currency | string | ✓ | ~ 8 chars | Currency Code |
Result
| Type | Description | |
|---|---|---|
| item | DailyTransactionHistory | DailyTransactionHistory |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetDailyTransactionHistory(
&money2.GetDailyTransactionHistoryRequest {
NamespaceName: pointy.String("namespace-0001"),
Year: pointy.Int32(2024),
Month: pointy.Int32(1),
Day: pointy.Int32(2),
Currency: pointy.String("JPY"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeUnusedBalances
Get a list of Unused Balances
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<UnusedBalance> | List of Unused Balances |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeUnusedBalances(
&money2.DescribeUnusedBalancesRequest {
NamespaceName: pointy.String("namespace-0001"),
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokengetUnusedBalance
Get Unused Balance by specifying a transaction ID
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| currency | string | ✓ | ~ 8 chars | Currency Code |
Result
| Type | Description | |
|---|---|---|
| item | UnusedBalance | Unused Balance |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetUnusedBalance(
&money2.GetUnusedBalanceRequest {
NamespaceName: pointy.String("namespace-0001"),
Currency: pointy.String("JPY"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeStoreContentModels
Get a list of Store Content Model
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| items | List<StoreContentModel> | List of Store Content Models |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeStoreContentModels(
&money2.DescribeStoreContentModelsRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
items := result.ItemsgetStoreContentModel
Get Store Content Model
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | StoreContentModel | Store Content Model |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetStoreContentModel(
&money2.GetStoreContentModelRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeStoreSubscriptionContentModels
Get a list of Store Subscription Content Models
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| items | List<StoreSubscriptionContentModel> | List of Store Subscription Content Models |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeStoreSubscriptionContentModels(
&money2.DescribeStoreSubscriptionContentModelsRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
items := result.ItemsgetStoreSubscriptionContentModel
Get Store Subscription Content Model
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | StoreSubscriptionContentModel | Store Subscription Content Model |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetStoreSubscriptionContentModel(
&money2.GetStoreSubscriptionContentModelRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemexportMaster
Export Model Master in a master data format that can be activated
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| item | CurrentModelMaster | Master data that can be activated |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.ExportMaster(
&money2.ExportMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetCurrentModelMaster
Get currently active Models master data
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| item | CurrentModelMaster | Updated master data of the currently active Models |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetCurrentModelMaster(
&money2.GetCurrentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItempreUpdateCurrentModelMaster
Update currently active Models master data (3-phase version)
When uploading master data larger than 1MB, the update is performed in 3 phases.
- Execute this API to obtain a token and URL for uploading.
- Upload the master data to the obtained URL.
- Execute UpdateCurrentModelMaster by passing the token obtained from the the upload to reflect the master data.
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
Result
| Type | Description | |
|---|---|---|
| uploadToken | string | Token used to reflect results after upload |
| uploadUrl | string | URL used to upload |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.PreUpdateCurrentModelMaster(
&money2.PreUpdateCurrentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
}
)
if err != nil {
panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrlupdateCurrentModelMaster
Update currently active Models master data
Request
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| mode | String Enum enum { “direct”, “preUpload” } | “direct” | Update mode
| |||||||||
| settings | string | {mode} == “direct” | ✓* | ~ 5242880 chars | Master Data * Required if mode is “direct” | |||||||
| uploadToken | string | {mode} == “preUpload” | ✓* | ~ 1024 chars | Token obtained by pre-upload Used to apply the uploaded master data. * Required if mode is “preUpload” |
Result
| Type | Description | |
|---|---|---|
| item | CurrentModelMaster | Updated master data of the currently active Models |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.UpdateCurrentModelMaster(
&money2.UpdateCurrentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
Mode: pointy.String("direct"),
Settings: pointy.String("{\"version\": \"2024-06-20\", \"storeContentModels\": [{\"name\": \"content-0001\", \"appleAppStore\": {\"productId\": \"io.gs2.sample.apple.product1\"}, \"googlePlay\": {\"productId\": \"io.gs2.sample.google.product1\"}}, {\"name\": \"content-0002\", \"appleAppStore\": {\"productId\": \"io.gs2.sample.apple.product2\"}, \"googlePlay\": {\"productId\": \"io.gs2.sample.google.product2\"}}, {\"name\": \"apple-only-0001\", \"appleAppStore\": {\"productId\": \"io.gs2.sample.apple.product3\"}}, {\"name\": \"google-only-0001\", \"googlePlay\": {\"productId\": \"io.gs2.sample.google.product3\"}}]}"),
UploadToken: nil,
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemupdateCurrentModelMasterFromGitHub
Update currently active Models master data from GitHub
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| checkoutSetting | GitHubCheckoutSetting | ✓ | Setup to check out master data from GitHub |
Result
| Type | Description | |
|---|---|---|
| item | CurrentModelMaster | Updated master data of the currently active Models |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.UpdateCurrentModelMasterFromGitHub(
&money2.UpdateCurrentModelMasterFromGitHubRequest {
NamespaceName: pointy.String("namespace-0001"),
CheckoutSetting: &money2.GitHubCheckoutSetting{
ApiKeyId: pointy.String("apiKeyId-0001"),
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.ItemdescribeStoreContentModelMasters
Get a list of Store Content Model Masters
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| namePrefix | string | ~ 64 chars | Filter by Store Content name prefix | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<StoreContentModelMaster> | List of Store Content Model Masters |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeStoreContentModelMasters(
&money2.DescribeStoreContentModelMastersRequest {
NamespaceName: pointy.String("namespace-0001"),
NamePrefix: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokencreateStoreContentModelMaster
Create a new store content master
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| name | string | ✓ | ~ 128 chars | Store Content Model name | ||
| description | string | ~ 1024 chars | Description | |||
| metadata | string | ~ 1024 chars | Metadata | |||
| appleAppStore | AppleAppStoreContent | Apple AppStore Content | ||||
| googlePlay | GooglePlayContent | Google Play Content |
Result
| Type | Description | |
|---|---|---|
| item | StoreContentModelMaster | Store Content Master created |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CreateStoreContentModelMaster(
&money2.CreateStoreContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
Name: pointy.String("content-0001"),
Description: nil,
Metadata: nil,
AppleAppStore: &money2.AppleAppStoreContent{
ProductId: pointy.String("io.gs2.sample.apple.product1"),
},
GooglePlay: &money2.GooglePlayContent{
ProductId: pointy.String("io.gs2.sample.google.product1"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetStoreContentModelMaster
Get Store Content Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | StoreContentModelMaster | Store Content Master |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetStoreContentModelMaster(
&money2.GetStoreContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemupdateStoreContentModelMaster
Update Store Content Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Content Model name | ||
| description | string | ~ 1024 chars | Description | |||
| metadata | string | ~ 1024 chars | Metadata | |||
| appleAppStore | AppleAppStoreContent | Apple AppStore Content | ||||
| googlePlay | GooglePlayContent | Google Play Content |
Result
| Type | Description | |
|---|---|---|
| item | StoreContentModelMaster | Store Content Master updated |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.UpdateStoreContentModelMaster(
&money2.UpdateStoreContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
Description: pointy.String("description1"),
Metadata: nil,
AppleAppStore: &money2.AppleAppStoreContent{
ProductId: pointy.String("io.gs2.sample.apple.product2"),
},
GooglePlay: &money2.GooglePlayContent{
ProductId: pointy.String("io.gs2.sample.google.product2"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdeleteStoreContentModelMaster
Delete Store Content Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | StoreContentModelMaster | Store Content Master deleted |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DeleteStoreContentModelMaster(
&money2.DeleteStoreContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdescribeStoreSubscriptionContentModelMasters
Get a list of Store Subscription Content Model Masters
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| namePrefix | string | ~ 64 chars | Filter by store subscription content name prefix | |||
| pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | |||
| limit | int | 30 | 1 ~ 1000 | Number of data items to retrieve |
Result
| Type | Description | |
|---|---|---|
| items | List<StoreSubscriptionContentModelMaster> | List of Store Subscription Content Model Masters |
| nextPageToken | string | Page 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/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DescribeStoreSubscriptionContentModelMasters(
&money2.DescribeStoreSubscriptionContentModelMastersRequest {
NamespaceName: pointy.String("namespace-0001"),
NamePrefix: nil,
PageToken: nil,
Limit: nil,
}
)
if err != nil {
panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageTokencreateStoreSubscriptionContentModelMaster
Create a new Store Subscription Content Model Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| name | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||||||||
| description | string | ~ 1024 chars | Description | |||||||||
| metadata | string | ~ 1024 chars | Metadata | |||||||||
| scheduleNamespaceId | string | ✓ | ~ 1024 chars | Namespace GRN of GS2-Schedule to link the subscription period | ||||||||
| triggerName | string | ✓ | ~ 128 chars | Trigger name to reflect the subscription period | ||||||||
| triggerExtendMode | String Enum enum { “just”, “rollupHour” } | “just” | Mode to reflect the subscription period on the trigger
| |||||||||
| rollupHour | int | {triggerExtendMode} == “rollupHour” | 0 | 0 ~ 23 | Hour of the day to roll up the subscription period (UTC) * Required if triggerExtendMode is “rollupHour” | |||||||
| reallocateSpanDays | int | 30 | 0 ~ 365 | Time span (days) that allows subscription contract information to be assigned to other users | ||||||||
| appleAppStore | AppleAppStoreSubscriptionContent | Apple AppStore Content | ||||||||||
| googlePlay | GooglePlaySubscriptionContent | Google Play Content |
Result
| Type | Description | |
|---|---|---|
| item | StoreSubscriptionContentModelMaster | Store Subscription Content Model Master created |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.CreateStoreSubscriptionContentModelMaster(
&money2.CreateStoreSubscriptionContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
Name: pointy.String("content-0001"),
Description: nil,
Metadata: nil,
ScheduleNamespaceId: pointy.String("grn:ap-northeast-1:YourOwnerId:schedule:namespaceName"),
TriggerName: pointy.String("trigger-0001"),
TriggerExtendMode: nil,
RollupHour: nil,
ReallocateSpanDays: nil,
AppleAppStore: &money2.AppleAppStoreSubscriptionContent{
SubscriptionGroupIdentifier: pointy.String("21642260"),
},
GooglePlay: &money2.GooglePlaySubscriptionContent{
ProductId: pointy.String("io.gs2.sample.google.product1"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemgetStoreSubscriptionContentModelMaster
Get Store Subscription Content Model Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | StoreSubscriptionContentModelMaster | Store Subscription Content Model Master |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.GetStoreSubscriptionContentModelMaster(
&money2.GetStoreSubscriptionContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemupdateStoreSubscriptionContentModelMaster
Update Store Subscription Content Model Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name | ||||||||
| description | string | ~ 1024 chars | Description | |||||||||
| metadata | string | ~ 1024 chars | Metadata | |||||||||
| scheduleNamespaceId | string | ✓ | ~ 1024 chars | Namespace GRN of GS2-Schedule to link the subscription period | ||||||||
| triggerName | string | ✓ | ~ 128 chars | Trigger name to reflect the subscription period | ||||||||
| triggerExtendMode | String Enum enum { “just”, “rollupHour” } | “just” | Mode to reflect the subscription period on the trigger
| |||||||||
| rollupHour | int | {triggerExtendMode} == “rollupHour” | 0 | 0 ~ 23 | Hour of the day to roll up the subscription period (UTC) * Required if triggerExtendMode is “rollupHour” | |||||||
| reallocateSpanDays | int | 30 | 0 ~ 365 | Time span (days) that allows subscription contract information to be assigned to other users | ||||||||
| appleAppStore | AppleAppStoreSubscriptionContent | Apple AppStore Content | ||||||||||
| googlePlay | GooglePlaySubscriptionContent | Google Play Content |
Result
| Type | Description | |
|---|---|---|
| item | StoreSubscriptionContentModelMaster | Store Subscription Content Model Master updated |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.UpdateStoreSubscriptionContentModelMaster(
&money2.UpdateStoreSubscriptionContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
Description: pointy.String("description1"),
Metadata: nil,
ScheduleNamespaceId: pointy.String("grn:ap-northeast-1:YourOwnerId:schedule:namespaceName"),
TriggerName: pointy.String("trigger-0001"),
TriggerExtendMode: nil,
RollupHour: nil,
ReallocateSpanDays: pointy.Int32(45),
AppleAppStore: &money2.AppleAppStoreSubscriptionContent{
SubscriptionGroupIdentifier: pointy.String("21642260"),
},
GooglePlay: &money2.GooglePlaySubscriptionContent{
ProductId: pointy.String("io.gs2.sample.google.product2"),
},
}
)
if err != nil {
panic("error occurred")
}
item := result.ItemdeleteStoreSubscriptionContentModelMaster
Delete Store Subscription Content Model Master
Request
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| namespaceName | string | ✓ | ~ 128 chars | Namespace name Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| contentName | string | ✓ | ~ 128 chars | Store Subscription Content Model name |
Result
| Type | Description | |
|---|---|---|
| item | StoreSubscriptionContentModelMaster | Store Subscription Content Model Master deleted |
Implementation Example
import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/money2"
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 := money2.Gs2Money2RestClient{
Session: &session,
}
result, err := client.DeleteStoreSubscriptionContentModelMaster(
&money2.DeleteStoreSubscriptionContentModelMasterRequest {
NamespaceName: pointy.String("namespace-0001"),
ContentName: pointy.String("content-0001"),
}
)
if err != nil {
panic("error occurred")
}
item := result.Item