> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Showcase SDK API Reference

Specification of models and API references for GS2-Showcase SDK for various programming languages



## Models

### 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<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓ |  |  | Transaction Setting<br>Configuration for controlling how transactions are processed when executing showcase operations. |
| buyScript | [ScriptSetting](#scriptsetting) |  |  |  |  | Script setting to be executed when attempting to execute a purchase<br>Script Trigger Reference - [`buy`](../script/#buy) |
| logSetting | [LogSetting](#logsetting) |  |  |  |  | Log Output Setting<br>Specifies the GS2-Log Namespace for outputting API request/response logs related to showcase browsing and product purchases. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeNamespaces - List Namespaces
createNamespace - Create Namespace
getNamespace - Get Namespace
updateNamespace - Update Namespace
deleteNamespace - Delete Namespace



---

### TransactionSetting

Transaction Setting

Transaction Setting controls execution methods, consistency, asynchronous processing, and conflict avoidance mechanisms of transactions.
Combining features like AutoRun, AtomicCommit, asynchronous execution using GS2-Distributor, batch application of script results, and asynchronous processing of 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 transactions atomically<br>* Enabled only if enableAutoRun is true |
| transactionUseDistributor | bool | {enableAtomicCommit} == true |  | false |  | Whether to execute transactions asynchronously<br>* Enabled only if enableAtomicCommit is true |
| commitScriptResultInUseDistributor | bool | {transactionUseDistributor} == true |  | false |  | Whether to execute the commit processing of the script result asynchronously<br>* Enabled only if transactionUseDistributor is true |
| acquireActionUseJobQueue | bool | {enableAtomicCommit} == true |  | false |  | Whether to use GS2-JobQueue to execute the acquire action<br>* Enabled 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 |

**Related methods:**
createNamespace - Create Namespace
updateNamespace - Update Namespace


**Related models:**
Namespace - Namespace



---

### 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.
Because synchronous execution blocks processing until the script finishes executing,
you can use the script result to stop the API execution or control the API response.

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<br>Must be specified in GRN format starting with "grn:gs2:". |
| doneTriggerTargetType | string (enum)<br>enum {<br>"none",<br>"gs2_script",<br>"aws"<br>}<br> |  |  | "none" |  | Asynchronous script execution method<br>Specifies the type of script to use for asynchronous execution.<br>You can choose from "Do not use an asynchronous execution script (none)", "Use GS2-Script (gs2_script)", and "Use Amazon EventBridge (aws)"."none": None / "gs2_script": GS2-Script / "aws": Amazon EventBridge /  |
| doneTriggerScriptId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024 chars | GS2-Script script GRN for asynchronous execution<br>Must be specified in GRN format starting with "grn:gs2:".<br>* Enabled only if doneTriggerTargetType is "gs2_script" |
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024 chars | GS2-JobQueue Namespace GRN used to execute asynchronous scripts<br>If you want to execute asynchronous execution scripts via GS2-JobQueue instead of executing them directly, specify the GS2-JobQueue Namespace GRN.<br>GS2-JobQueue is generally not required unless you have a specific reason to use it.<br>* Enabled only if doneTriggerTargetType is "gs2_script" |

**Related methods:**
createNamespace - Create Namespace
updateNamespace - Update Namespace


**Related models:**
Namespace - Namespace



---

### LogSetting

Log Output Setting

Log Output Setting defines how log data is exported. This type holds the GS2-Log Namespace identifier (Namespace ID), which is 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<br>Must be specified in GRN format starting with "grn:gs2:". |

**Related methods:**
createNamespace - Create Namespace
updateNamespace - Update Namespace


**Related models:**
Namespace - Namespace



---

### GitHubCheckoutSetting

Setting for checking 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)<br>enum {<br>"commit_hash",<br>"branch",<br>"tag"<br>}<br> |  | ✓ |  |  | Source of code"commit_hash": Commit hash / "branch": Branch / "tag": Tag /  |
| commitHash | string | {referenceType} == "commit_hash" | ✓* |  |  ~ 1024 chars | Commit hash<br>* Required if referenceType is "commit_hash" |
| branchName | string | {referenceType} == "branch" | ✓* |  |  ~ 1024 chars | Branch Name<br>* Required if referenceType is "branch" |
| tagName | string | {referenceType} == "tag" | ✓* |  |  ~ 1024 chars | Tag Name<br>* Required if referenceType is "tag" |

**Related methods:**
updateCurrentShowcaseMasterFromGitHub - Update currently active Showcase master data from GitHub



---

### Showcase

Showcase

A `Showcase` can define items for display.
Additionally, the sales period for items on `Showcase` can be set.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| showcaseId | string |  | * |  |  ~ 1024 chars | Showcase GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| salesPeriodEventId | string |  |  |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Showcase<br>Controls the overall sales period of this showcase. When specified, the entire showcase is only available during the associated GS2-Schedule event period. If the event is not active, the showcase returns empty. |
| displayItems | [List&lt;DisplayItem&gt;](#displayitem) |  |  | [] | 1 ~ 1000 items | List of Display Items<br>The list of items displayed on this showcase. Each display item can be either a single sales item or a sales item group. Items with an expired or inactive sales period event are automatically filtered out when the showcase is retrieved. |

**Related methods:**
describeShowcases - List Showcases
describeShowcasesByUserId - List Showcases by User ID
getShowcase - Get Showcase
getShowcaseByUserId - Get Showcase by User ID



---

### DisplayItem

Displayed Item

An item displayed on a showcase. Can reference either a single sales item or a sales item group. Each display item can have its own sales period controlled by a GS2-Schedule event, independently of the showcase-level sales period.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| displayItemId | string |  | ✓ | UUID |  ~ 128 chars | Displayed Item ID<br>Maintains a unique name for displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| type | string (enum)<br>enum {<br>"salesItem",<br>"salesItemGroup"<br>}<br> |  | ✓ |  |  | Type<br>The type of item displayed. A "salesItem" is a single Sales Item with fixed price and rewards. A "salesItemGroup" contains multiple Sales Items evaluated in order, used for step-up pricing or limited purchase discounts."salesItem": Sales Item / "salesItemGroup": Sales Item Group /  |
| salesItem | [SalesItem](#salesitem) | {type} == "salesItem" | ✓* |  |  | Sales Item<br>* Required if type is "salesItem" |
| salesItemGroup | [SalesItemGroup](#salesitemgroup) | {type} == "salesItemGroup" | ✓* |  |  | Sales Item Group<br>* Required if type is "salesItemGroup" |
| salesPeriodEventId | string |  |  |  |  ~ 1024 chars | GS2-Schedule event GRN with sales periods for this display item<br>Controls the sales period of this individual display item. When specified, the item is only shown on the showcase during the associated GS2-Schedule event period. This is independent of the showcase-level sales period. |

**Related models:**
Showcase - Showcase



---

### RandomShowcase

Random Showcase

Random Showcase is a display model featuring randomly selected display items that rotate at specified intervals.

Display items are randomly selected from the registered display item pool according to the specified quantity and the weight set for each display item.
By associating a GS2-Schedule event with the Random Showcase, you can set its sales period.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| randomShowcaseId | string |  | * |  |  ~ 1024 chars | Random Showcase GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| maximumNumberOfChoice | int |  | ✓ |  | 1 ~ 100 | Maximum number of display items to be selected<br>The number of display items randomly drawn from the display item pool each rotation period. Items are drawn without replacement using weighted random selection, so the same item will not appear twice in one rotation. |
| displayItems | [List&lt;RandomDisplayItemModel&gt;](#randomdisplayitemmodel) |  |  | [] | 1 ~ 100 items | List of Display Items subject to selection<br>The pool of candidate display items from which items are randomly drawn. Each item has a weight that determines its relative selection probability and a stock count that limits how many times it can appear across rotations. |
| baseTimestamp | long |  | ✓ |  |  | Base time for re-drawing the display items on display<br>The reference timestamp used to calculate rotation boundaries. display item re-draws occur at regular intervals (resetIntervalHours) starting from this base time. Must be set to a past timestamp. |
| resetIntervalHours | int |  | ✓ |  | 1 ~ 168 | Interval (hours) between re-drawing the display items on display<br>The number of hours between each display item rotation. When the interval elapses (relative to baseTimestamp), the display items are re-drawn with a new random seed. Can be set from 1 to 168 hours (1 week). |
| salesPeriodEventId | string |  |  |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Random Showcase<br>Controls the overall sales period of this random showcase. When specified, the showcase is only available during the associated GS2-Schedule event period. |


---

### RandomDisplayItem

Random Displayed Item on the Random Showcase

Represents a Sales Item that has been drawn and displayed on a random showcase for a specific user. Contains the item's price, rewards, and purchase count tracking for the current rotation period.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| showcaseName | string |  | ✓ |  |  ~ 128 chars | Random Showcase name |
| name | string |  | ✓ | UUID |  ~ 128 chars | Random Displayed Item name<br>Maintains a unique name for randomly displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | List of Verify Actions |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 0 ~ 10 items | List of Consume Actions |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 1 ~ 100 items | List of Acquire Actions |
| currentPurchaseCount | int |  | ✓ |  | 1 ~ 2147483646 | Current purchase count<br>The number of times this item has been purchased in the current rotation period. Incremented each time a purchase is made and reset when the rotation period ends. |
| maximumPurchaseCount | int |  | ✓ |  | 1 ~ 2147483646 | Maximum purchase count<br>The maximum number of times this item can be purchased in the current rotation period. Once currentPurchaseCount reaches this value, the item can no longer be purchased until the next rotation. |

**Related methods:**
describeRandomDisplayItems - List Random Displayed Items
describeRandomDisplayItemsByUserId - List Random Displayed Items on Random Showcase by User ID
getRandomDisplayItem - Get Random Displayed Item on Random Showcase
getRandomDisplayItemByUserId - Get Random Displayed Item on Random Showcase by User ID
randomShowcaseBuy - Purchase Random Displayed Item from Random Showcase
randomShowcaseBuyByUserId - Purchase Random Displayed Item from Random Showcase by User ID



---

### RandomDisplayItemModel

Items that can be displayed in a Random Showcase

You can set the probability of selecting each item with `weight`.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ | UUID |  ~ 128 chars | Random Displayed Item ID<br>Maintains a unique name for randomly displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | List of Verify Actions<br>Precondition checks executed before purchasing this Random Displayed Item. All verify actions must pass before consume and acquire actions are processed. |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 0 ~ 10 items | List of Consume Actions<br>Actions that consume resources as the purchase price for this Random Displayed Item. Executed as consume actions in the transaction. |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 1 ~ 100 items | List of Acquire Actions<br>Actions that grant resources as purchase rewards for this Random Displayed Item. Executed as acquire actions in the transaction. |
| stock | int |  | ✓ |  | 1 ~ 2147483646 | Stock<br>The maximum number of times this item can be drawn across all rotations. Once stock reaches zero, the item is excluded from future draws. Stock is consumed when the item is selected during a rotation draw. |
| weight | int |  | ✓ |  | 1 ~ 2147483646 | Draw Weight<br>The relative probability weight for this item in the random selection. Higher weights increase the chance of being drawn. The actual selection probability is calculated as this item's weight divided by the sum of all eligible items' weights. |

**Related models:**
RandomShowcase - Random Showcase
RandomShowcaseMaster - Random Showcase Master



---

### SalesItem

Sales Item

Defines the price required to purchase a Sales Item and the rewards granted upon purchase.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128 chars | Sales Item name<br>Unique Sales Item name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | List of Verify Actions<br>Precondition checks executed before the purchase. All verify actions must pass before consume and acquire actions are processed. Can be used to check purchase eligibility conditions. |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 0 ~ 10 items | List of Consume Actions<br>Actions that consume resources as the purchase price. Can include GS2-Limit CountUp actions to control purchase limits for sales item groups. |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 1 ~ 100 items | List of Acquire Actions<br>Actions that grant resources as purchase rewards. Executed after all consume actions complete successfully. |

**Related methods:**
buy - Buy Sales Item
buyByUserId - Buy Sales Item by User ID


**Related models:**
DisplayItem - Displayed Item
SalesItemGroup - Sales Item Group



---

### SalesItemGroup

Sales Item Group

A Sales Item Group is an entity for display on a Showcase.
Multiple Sales Items can belong to a Sales Item Group.
Sales Items are evaluated in order, and the first Sales Item determined to be available for purchase is displayed on the Showcase.
This can be used for Sales Items that are discounted only for the first purchase, or for systems where the contents change based on the number of purchases, such as a step-up gacha.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128 chars | Sales Item Group name<br>Unique Sales Item Group name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| salesItems | [List&lt;SalesItem&gt;](#salesitem) |  |  | [] | 2 ~ 10 items | Sales Items included in the Sales Item Group<br>Ordered list of sales items in this group. The system evaluates each item from first to last using GS2-Limit counters to determine purchase availability. The first purchasable item is displayed; if none qualify, the last item in the list is used as a fallback. |

**Related models:**
DisplayItem - Displayed Item



---

### PurchaseCount

Number of Random Displayed Item purchases

Tracks the purchase count for a specific Random Displayed Item within a rotation period. Incremented when a purchase is made and decremented when a purchase is reverted.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128 chars | Number of Random Displayed Item purchases name<br>The name of the Random Displayed Item whose purchase count is being tracked. Corresponds to the Random Displayed Item name in the Random Showcase. |
| count | int |  | ✓ |  | 1 ~ 2147483646 | Purchase count<br>The number of times this item has been purchased in the current rotation period. Used to enforce the per-item maximum purchase limit. |


---

### ConsumeAction

Consume Action


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Consume Action |
| request | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |

**Related models:**
RandomDisplayItem - Random Displayed Item on the Random Showcase
RandomDisplayItemModel - Items that can be displayed in a Random Showcase
SalesItem - Sales Item
SalesItemMaster - Sales Item Master



---

### VerifyAction

Verify Action


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Verify Action |
| request | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |

**Related models:**
RandomDisplayItem - Random Displayed Item on the Random Showcase
RandomDisplayItemModel - Items that can be displayed in a Random Showcase
SalesItem - Sales Item
SalesItemMaster - Sales Item Master



---

### AcquireAction

Acquire Action


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Acquire Action |
| request | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |

**Related models:**
RandomDisplayItem - Random Displayed Item on the Random Showcase
RandomDisplayItemModel - Items that can be displayed in a Random Showcase
SalesItem - Sales Item
SalesItemMaster - Sales Item Master



---

### Config

Configuration

Configuration values applied to transaction variables


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| key | string |  | ✓ |  |  ~ 64 chars | Name<br>The variable name to be substituted in the transaction template. Corresponds to a placeholder in the transaction action parameters. |
| value | string |  |  |  |  ~ 51200 chars | Value<br>The value to substitute for the corresponding variable name in the transaction template. |


---

### VerifyActionResult

Verify Action execution result


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Verify Action |
| verifyRequest | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |
| statusCode | int |  |  |  | 0 ~ 999 | Status code |
| verifyResult | string |  |  |  |  ~ 1048576 chars | Result content |

**Related models:**
TransactionResult - Transaction Execution Result



---

### ConsumeActionResult

Consume Action execution result


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Consume Action |
| consumeRequest | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |
| statusCode | int |  |  |  | 0 ~ 999 | Status code |
| consumeResult | string |  |  |  |  ~ 1048576 chars | Result content |

**Related models:**
TransactionResult - Transaction Execution Result



---

### AcquireActionResult

Acquire Action execution result


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Acquire Action |
| acquireRequest | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |
| statusCode | int |  |  |  | 0 ~ 999 | Status code |
| acquireResult | string |  |  |  |  ~ 1048576 chars | Result content |

**Related models:**
TransactionResult - Transaction Execution Result



---

### TransactionResult

Transaction Execution Result

Result of a transaction executed using the server-side automatic execution feature


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| transactionId | string |  | ✓ |  | 36 ~ 36 chars | Transaction ID |
| verifyResults | [List&lt;VerifyActionResult&gt;](#verifyactionresult) |  |  |  | 0 ~ 10 items | List of verify action execution results |
| consumeResults | [List&lt;ConsumeActionResult&gt;](#consumeactionresult) |  |  | [] | 0 ~ 10 items | List of Consume Action execution results |
| acquireResults | [List&lt;AcquireActionResult&gt;](#acquireactionresult) |  |  | [] | 0 ~ 100 items | List of Acquire Action execution results |
| hasError | bool |  |  | false |  | Whether an error occurred during transaction execution |

**Related methods:**
buy - Buy Sales Item
buyByUserId - Buy Sales Item by User ID
randomShowcaseBuy - Purchase Random Displayed Item from Random Showcase
randomShowcaseBuyByUserId - Purchase Random Displayed Item from Random Showcase by User ID



---

### CurrentShowcaseMaster

Currently active Showcase Model master data

This master data defines the Showcase Models currently active within the Namespace.
GS2 uses JSON format files for managing master data.
By uploading these files, you can apply the master data to 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 [GS2-Showcase Master Data Reference](api_reference/showcase/master_data/) for the JSON file format.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | * |  |  ~ 1024 chars | Namespace GRN<br>* Set automatically by the server |
| settings | string |  | ✓ |  |  ~ 5242880 bytes (5MB) | Master Data |

**Related methods:**
exportMaster - Export Showcase Master in a master data format that can be activated
getCurrentShowcaseMaster - Get currently active Showcase master data
updateCurrentShowcaseMaster - Update currently active Showcase master data
updateCurrentShowcaseMasterFromGitHub - Update currently active Showcase master data from GitHub



---

### SalesItemMaster

Sales Item Master

Sales Item Master is data used to edit and manage Sales Item within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as Sales Item actually referenced by the game.

Set the price required to purchase the Sales Item and the reward you will receive for purchasing the Sales Item.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| salesItemId | string |  | * |  |  ~ 1024 chars | Sales Item Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Sales Item name<br>Unique Sales Item name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  |  | 0 ~ 10 items | List of Verify Actions<br>Precondition checks executed before the purchase. All verify actions must pass before consume and acquire actions are processed. Can be used to check purchase eligibility conditions. |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  |  | 0 ~ 10 items | List of Consume Actions<br>Actions that consume resources as the purchase price. Can include GS2-Limit CountUp actions to control purchase limits for sales item groups. |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  | ✓ |  | 1 ~ 100 items | List of Acquire Actions<br>Actions that grant resources as purchase rewards. Executed after all consume actions complete successfully. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeSalesItemMasters - List Sales Item Masters
createSalesItemMaster - Create Sales Item Master
getSalesItemMaster - Get Sales Item Master
updateSalesItemMaster - Update Sales Item Master
deleteSalesItemMaster - Delete Sales Item Master



---

### SalesItemGroupMaster

Sales Item Group Master

Sales Item Group Master is data used to edit and manage Sales Item Group within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as Sales Item Group actually referenced by the game.

A Sales Item Group is an entity for display on a Showcase.
Multiple Sales Items can belong to a Sales Item Group.
Sales Items are evaluated in order, and the first Sales Item determined to be available for purchase is displayed on the Showcase.
This can be used for Sales Items that are discounted only for the first time, or for a system in which the contents of Sales Items change depending on the number of times they are purchased, such as a step-up gacha.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| salesItemGroupId | string |  | * |  |  ~ 1024 chars | Sales Item Group Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Sales Item Group name<br>Unique Sales Item Group name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| salesItemNames | List&lt;string&gt; |  | ✓ |  | 2 ~ 10 items | List of Sales Items included in the Sales Item Group<br>Ordered list of Sales Item names in this group. The system evaluates each item from first to last using GS2-Limit counters to determine purchase availability. The first purchasable item is displayed; if none qualify, the last item in the list is used as a fallback. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeSalesItemGroupMasters - List Sales Item Group Masters
createSalesItemGroupMaster - Create Sales Item Group Master
getSalesItemGroupMaster - Get Sales Item Group Master
updateSalesItemGroupMaster - Update Sales Item Group Master
deleteSalesItemGroupMaster - Delete Sales Item Group Master



---

### ShowcaseMaster

Showcase Master

Showcase Master is data used to edit and manage `Showcase` within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as `Showcase` actually referenced by the game.

The sales period can be set for `Showcase`.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| showcaseId | string |  | * |  |  ~ 1024 chars | Showcase Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| salesPeriodEventId | string |  |  |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Showcase<br>Controls the overall sales period of this showcase. When specified, the entire showcase is only available during the associated GS2-Schedule event period. If the event is not active, the showcase returns empty. |
| displayItems | [List&lt;DisplayItemMaster&gt;](#displayitemmaster) |  | ✓ |  | 1 ~ 1000 items | List of Display Items<br>The list of items displayed on this showcase. Each display item can be either a single sales item or a sales item group. Items with an expired or inactive sales period event are automatically filtered out when the showcase is retrieved. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeShowcaseMasters - List Showcase Masters
createShowcaseMaster - Create Showcase Master
getShowcaseMaster - Get Showcase Master
updateShowcaseMaster - Update Showcase Master
deleteShowcaseMaster - Delete Showcase Master



---

### DisplayItemMaster

Displayed Item Master Data

Master data for an item displayed on a showcase. Can reference either a single Sales Item or a Sales Item Group by name. Each display item can have its own sales period controlled by a GS2-Schedule event, independently of the showcase-level sales period.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| displayItemId | string |  | ✓ | UUID |  ~ 128 chars | Displayed Item ID<br>Maintains a unique name for displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| type | string (enum)<br>enum {<br>"salesItem",<br>"salesItemGroup"<br>}<br> |  | ✓ |  |  | Type<br>The type of item displayed. A "salesItem" is a single Sales Item with fixed price and rewards. A "salesItemGroup" contains multiple Sales Items evaluated in order, used for step-up pricing or limited purchase discounts."salesItem": Sales Item / "salesItemGroup": Sales Item Group /  |
| salesItemName | string | {type} == "salesItem" | ✓* |  |  ~ 128 chars | Sales Item name<br>The name of the sales item to display. Used when the display item type is "salesItem" to reference a specific Sales Item defined in the sales item master.<br>* Required if type is "salesItem" |
| salesItemGroupName | string | {type} == "salesItemGroup" | ✓* |  |  ~ 128 chars | Sales Item Group name<br>The name of the sales item group to display. Used when the display item type is "salesItemGroup" to reference a Sales Item Group that evaluates multiple items based on purchase count.<br>* Required if type is "salesItemGroup" |
| salesPeriodEventId | string |  |  |  |  ~ 1024 chars | GS2-Schedule event GRN with sales periods for this display item<br>Controls the sales period of this individual display item. When specified, the item is only shown on the showcase during the associated GS2-Schedule event period. This is independent of the showcase-level sales period. |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related models:**
ShowcaseMaster - Showcase Master



---

### RandomShowcaseMaster

Random Showcase Master

Random Showcase Master is data used to edit and manage Random Showcase within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as Random Showcase actually referenced by the game.

Random Showcase is a display model featuring randomly selected display items that rotate at specified intervals.

Display items are randomly selected from the registered display item pool according to the specified quantity and the weight set for each display item.
By associating an event of GS2-Schedule with the Random Showcase, you can set the sales period.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| showcaseId | string |  | * |  |  ~ 1024 chars | Random Showcase Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| maximumNumberOfChoice | int |  | ✓ |  | 1 ~ 100 | Maximum number of display items to be selected<br>The number of display items randomly drawn from the display item pool each rotation period. Items are drawn without replacement using weighted random selection, so the same item will not appear twice in one rotation. |
| displayItems | [List&lt;RandomDisplayItemModel&gt;](#randomdisplayitemmodel) |  | ✓ |  | 1 ~ 100 items | List of Random Displayed Items subject to selection<br>The pool of candidate display items from which items are randomly drawn. Each item has a weight that determines its relative selection probability and a stock count that limits how many times it can appear across rotations. |
| baseTimestamp | long |  | ✓ |  |  | Base time for re-drawing the display items on display<br>The reference timestamp used to calculate rotation boundaries. display item re-draws occur at regular intervals (resetIntervalHours) starting from this base time. Must be set to a past timestamp. |
| resetIntervalHours | int |  | ✓ |  | 1 ~ 168 | Interval (hours) between re-drawing the display items on display<br>The number of hours between each display item rotation. When the interval elapses (relative to baseTimestamp), the display items are re-drawn with a new random seed. Can be set from 1 to 168 hours (1 week). |
| salesPeriodEventId | string |  |  |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Random Showcase<br>Controls the overall sales period of this random showcase. When specified, the showcase is only available during the associated GS2-Schedule event period. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeRandomShowcaseMasters - List Random Showcase Masters
createRandomShowcaseMaster - Create Random Showcase Master
getRandomShowcaseMaster - Get Random Showcase Master
updateRandomShowcaseMaster - Update Random Showcase Master
deleteRandomShowcaseMaster - Delete Random Showcase Master



---
## Methods

### describeNamespaces

List 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&lt;Namespace&gt;](#namespace) | List of Namespaces |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &showcase.DescribeNamespacesRequest {
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeNamespacesRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeNamespacesRequest;
import io.gs2.showcase.result.DescribeNamespacesResult;

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

try {
    DescribeNamespacesResult result = client.describeNamespaces(
        new DescribeNamespacesRequest()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Showcase.Request.DescribeNamespacesRequest()
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeNamespaces(
        new Gs2Showcase.DescribeNamespacesRequest()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_namespaces(
        showcase.DescribeNamespacesRequest()
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

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

```



---

### createNamespace

Create 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<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓|  |  | Transaction Setting<br>Configuration for controlling how transactions are processed when executing showcase operations. |
| buyScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when attempting to execute a purchase<br>Script Trigger Reference - [`buy`](../script/#buy) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | Log Output Setting<br>Specifies the GS2-Log Namespace for outputting API request/response logs related to showcase browsing and product purchases. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Namespace created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &showcase.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: &showcase.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        },
        BuyScript: nil,
        LogSetting: &showcase.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting((new \Gs2\Showcase\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            ->withBuyScript(null)
            ->withLogSetting((new \Gs2\Showcase\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CreateNamespaceRequest;
import io.gs2.showcase.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(new io.gs2.showcase.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withBuyScript(null)
            .withLogSetting(new io.gs2.showcase.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Showcase.Request.CreateNamespaceRequest()
        .WithName("namespace-0001")
        .WithDescription(null)
        .WithTransactionSetting(new Gs2.Gs2Showcase.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
        .WithBuyScript(null)
        .WithLogSetting(new Gs2.Gs2Showcase.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.createNamespace(
        new Gs2Showcase.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(new Gs2Showcase.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withBuyScript(null)
            .withLogSetting(new Gs2Showcase.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.create_namespace(
        showcase.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(
                showcase.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001'))
            .with_buy_script(None)
            .with_log_setting(
                showcase.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result
item = result.item;

```



---

### getNamespaceStatus

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<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| status | string | Namespace Status<br>"ACTIVE": Active / "DELETED": Deleted /  |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &showcase.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetNamespaceStatusRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName("namespace-0001")
    );
    $status = $result->getStatus();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetNamespaceStatusRequest;
import io.gs2.showcase.result.GetNamespaceStatusResult;

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

try {
    GetNamespaceStatusResult result = client.getNamespaceStatus(
        new GetNamespaceStatusRequest()
            .withNamespaceName("namespace-0001")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Showcase.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getNamespaceStatus(
        new Gs2Showcase.GetNamespaceStatusRequest()
            .withNamespaceName("namespace-0001")
    );
    const status = result.getStatus();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_namespace_status(
        showcase.GetNamespaceStatusRequest()
            .with_namespace_name('namespace-0001')
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_namespace_status({
    namespaceName="namespace-0001",
})

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

result = api_result.result
status = result.status;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_namespace_status_async({
    namespaceName="namespace-0001",
})

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

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

result = api_result.result
status = result.status;

```



---

### getNamespace

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<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Namespace |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &showcase.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetNamespaceRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetNamespaceRequest;
import io.gs2.showcase.result.GetNamespaceResult;

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

try {
    GetNamespaceResult result = client.getNamespace(
        new GetNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Showcase.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getNamespace(
        new Gs2Showcase.GetNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_namespace(
        showcase.GetNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_namespace({
    namespaceName="namespace-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_namespace_async({
    namespaceName="namespace-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### updateNamespace

Update Namespace

Update the settings of the specified Namespace.
You can change the description and other settings of the Namespace.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓|  |  | Transaction Setting<br>Configuration for controlling how transactions are processed when executing showcase operations. |
| buyScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when attempting to execute a purchase<br>Script Trigger Reference - [`buy`](../script/#buy) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | Log Output Setting<br>Specifies the GS2-Log Namespace for outputting API request/response logs related to showcase browsing and product purchases. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Namespace updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &showcase.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: &showcase.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
        },
        BuyScript: nil,
        LogSetting: &showcase.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting((new \Gs2\Showcase\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            ->withBuyScript(null)
            ->withLogSetting((new \Gs2\Showcase\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateNamespaceRequest;
import io.gs2.showcase.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new io.gs2.showcase.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            .withBuyScript(null)
            .withLogSetting(new io.gs2.showcase.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Showcase.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(new Gs2.Gs2Showcase.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
        .WithBuyScript(null)
        .WithLogSetting(new Gs2.Gs2Showcase.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateNamespace(
        new Gs2Showcase.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new Gs2Showcase.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            .withBuyScript(null)
            .withLogSetting(new Gs2Showcase.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_namespace(
        showcase.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(
                showcase.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002'))
            .with_buy_script(None)
            .with_log_setting(
                showcase.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result
item = result.item;

```



---

### deleteNamespace

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<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Deleted Namespace |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &showcase.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DeleteNamespaceRequest;
import io.gs2.showcase.result.DeleteNamespaceResult;

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

try {
    DeleteNamespaceResult result = client.deleteNamespace(
        new DeleteNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Showcase.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.deleteNamespace(
        new Gs2Showcase.DeleteNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.delete_namespace(
        showcase.DeleteNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.delete_namespace({
    namespaceName="namespace-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.delete_namespace_async({
    namespaceName="namespace-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### getServiceVersion

Get Microservice Version


#### Request

Request parameters: None

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | string | Version |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &showcase.GetServiceVersionRequest {
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetServiceVersionRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getServiceVersion(
        (new GetServiceVersionRequest())
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetServiceVersionRequest;
import io.gs2.showcase.result.GetServiceVersionResult;

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

try {
    GetServiceVersionResult result = client.getServiceVersion(
        new GetServiceVersionRequest()
    );
    String item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2Showcase.Request.GetServiceVersionRequest(),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getServiceVersion(
        new Gs2Showcase.GetServiceVersionRequest()
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_service_version(
        showcase.GetServiceVersionRequest()
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_service_version({
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_service_version_async({
})

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

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

result = api_result.result
item = result.item;

```



---

### dumpUserDataByUserId

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

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &showcase.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DumpUserDataByUserIdRequest;
import io.gs2.showcase.result.DumpUserDataByUserIdResult;

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

try {
    DumpUserDataByUserIdResult result = client.dumpUserDataByUserId(
        new DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2Showcase.Request.DumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.dumpUserDataByUserId(
        new Gs2Showcase.DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result

```



---

### 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




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &showcase.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.showcase.result.CheckDumpUserDataByUserIdResult;

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

try {
    CheckDumpUserDataByUserIdResult result = client.checkDumpUserDataByUserId(
        new CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2Showcase.Request.CheckDumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result
url = result.url;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result
url = result.url;

```



---

### cleanUserDataByUserId

Clean User Data by User ID

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

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &showcase.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CleanUserDataByUserIdRequest;
import io.gs2.showcase.result.CleanUserDataByUserIdResult;

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

try {
    CleanUserDataByUserIdResult result = client.cleanUserDataByUserId(
        new CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2Showcase.Request.CleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.cleanUserDataByUserId(
        new Gs2Showcase.CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result

```



---

### 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

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &showcase.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.showcase.result.CheckCleanUserDataByUserIdResult;

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

try {
    CheckCleanUserDataByUserIdResult result = client.checkCleanUserDataByUserId(
        new CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2Showcase.Request.CheckCleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.checkCleanUserDataByUserId(
        new Gs2Showcase.CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result

```



---

### prepareImportUserDataByUserId

Prepare User Data Import by 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




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &showcase.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.showcase.result.PrepareImportUserDataByUserIdResult;

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

try {
    PrepareImportUserDataByUserIdResult result = client.prepareImportUserDataByUserId(
        new PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2Showcase.Request.PrepareImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

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

```



---

### importUserDataByUserId

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

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &showcase.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.ImportUserDataByUserIdRequest;
import io.gs2.showcase.result.ImportUserDataByUserIdResult;

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

try {
    ImportUserDataByUserIdResult result = client.importUserDataByUserId(
        new ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2Showcase.Request.ImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result

```



---

### 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




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &showcase.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CheckImportUserDataByUserIdRequest;
import io.gs2.showcase.result.CheckImportUserDataByUserIdResult;

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

try {
    CheckImportUserDataByUserIdResult result = client.checkImportUserDataByUserId(
        new CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2Showcase.Request.CheckImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

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


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result
url = result.url;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result
url = result.url;

```



---

### describeShowcases

List Showcases

Retrieves the list of active showcases available to the current user. Only showcases that are currently active based on the sales period event configuration are returned.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;Showcase&gt;](#showcase) | List of Showcases |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeShowcases(
    &showcase.DescribeShowcasesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeShowcasesRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeShowcases(
        (new DescribeShowcasesRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeShowcasesRequest;
import io.gs2.showcase.result.DescribeShowcasesResult;

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

try {
    DescribeShowcasesResult result = client.describeShowcases(
        new DescribeShowcasesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
    );
    List<Showcase> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeShowcasesResult> asyncResult = null;
yield return client.DescribeShowcases(
    new Gs2.Gs2Showcase.Request.DescribeShowcasesRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeShowcases(
        new Gs2Showcase.DescribeShowcasesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_showcases(
        showcase.DescribeShowcasesRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_showcases({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
})

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

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_showcases_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
})

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

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

result = api_result.result
items = result.items;

```



---

### describeShowcasesByUserId

List Showcases by User ID

Retrieves the list of active showcases available to the specified user. Only showcases that are currently active based on the sales period event configuration are returned.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace 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&lt;Showcase&gt;](#showcase) | List of Showcases |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeShowcasesByUserId(
    &showcase.DescribeShowcasesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeShowcasesByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeShowcasesByUserId(
        (new DescribeShowcasesByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeShowcasesByUserIdRequest;
import io.gs2.showcase.result.DescribeShowcasesByUserIdResult;

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

try {
    DescribeShowcasesByUserIdResult result = client.describeShowcasesByUserId(
        new DescribeShowcasesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    List<Showcase> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeShowcasesByUserIdResult> asyncResult = null;
yield return client.DescribeShowcasesByUserId(
    new Gs2.Gs2Showcase.Request.DescribeShowcasesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeShowcasesByUserId(
        new Gs2Showcase.DescribeShowcasesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_showcases_by_user_id(
        showcase.DescribeShowcasesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result
items = result.items;

```



---

### getShowcase

Get Showcase

Retrieves the specified Showcase with its Sales Items for the current user. The Showcase must be active based on the sales period event configuration.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Showcase](#showcase) | Showcase |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetShowcase(
    &showcase.GetShowcaseRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetShowcaseRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getShowcase(
        (new GetShowcaseRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withAccessToken("accessToken-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetShowcaseRequest;
import io.gs2.showcase.result.GetShowcaseResult;

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

try {
    GetShowcaseResult result = client.getShowcase(
        new GetShowcaseRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withAccessToken("accessToken-0001")
    );
    Showcase item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetShowcaseResult> asyncResult = null;
yield return client.GetShowcase(
    new Gs2.Gs2Showcase.Request.GetShowcaseRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getShowcase(
        new Gs2Showcase.GetShowcaseRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_showcase(
        showcase.GetShowcaseRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_showcase({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    accessToken="accessToken-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_showcase_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    accessToken="accessToken-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### getShowcaseByUserId

Get Showcase by User ID

Retrieves the specified Showcase with its Sales Items for the specified user. The Showcase must be active based on the sales period event configuration.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase 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 |
| --- | --- | --- |
| item | [Showcase](#showcase) | Showcase |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetShowcaseByUserId(
    &showcase.GetShowcaseByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetShowcaseByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getShowcaseByUserId(
        (new GetShowcaseByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetShowcaseByUserIdRequest;
import io.gs2.showcase.result.GetShowcaseByUserIdResult;

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

try {
    GetShowcaseByUserIdResult result = client.getShowcaseByUserId(
        new GetShowcaseByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Showcase item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetShowcaseByUserIdResult> asyncResult = null;
yield return client.GetShowcaseByUserId(
    new Gs2.Gs2Showcase.Request.GetShowcaseByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getShowcaseByUserId(
        new Gs2Showcase.GetShowcaseByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_showcase_by_user_id(
        showcase.GetShowcaseByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_showcase_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_showcase_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;

```



---

### buy

Buy Sales Item

Purchases a Sales Item from the specified Showcase. Generates a transaction that processes the configured verify, consume, and acquire actions defined in the sales item. Configuration values can be passed to override transaction variables.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| displayItemId | string |  | ✓| UUID |  ~ 128 chars | Displayed Item ID<br>Maintains a unique name for displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| quantity | int |  | | 1 | 1 ~ 1000 | Purchase quantity |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | Configuration values applied to transaction variables |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItem](#salesitem) | Sales Item |
| transactionId | string | Issued transaction ID |
| stampSheet | string | Stamp sheet used to execute the purchase process |
| stampSheetEncryptionKeyId | string | Cryptographic key GRN used for stamp sheet signature calculations |
| autoRunStampSheet | bool? | Whether automatic transaction execution is enabled |
| atomicCommit | bool? | Whether to commit the transaction atomically |
| transaction | string | Issued transaction |
| transactionResult | [TransactionResult](#transactionresult) | Transaction Execution Result |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.Buy(
    &showcase.BuyRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemId: pointy.String("display-item-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Quantity: nil,
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\BuyRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->buy(
        (new BuyRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemId("display-item-0001")
            ->withAccessToken("accessToken-0001")
            ->withQuantity(null)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.BuyRequest;
import io.gs2.showcase.result.BuyResult;

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

try {
    BuyResult result = client.buy(
        new BuyRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemId("display-item-0001")
            .withAccessToken("accessToken-0001")
            .withQuantity(null)
            .withConfig(null)
    );
    SalesItem item = result.getItem();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.BuyResult> asyncResult = null;
yield return client.Buy(
    new Gs2.Gs2Showcase.Request.BuyRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemId("display-item-0001")
        .WithAccessToken("accessToken-0001")
        .WithQuantity(null)
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.buy(
        new Gs2Showcase.BuyRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemId("display-item-0001")
            .withAccessToken("accessToken-0001")
            .withQuantity(null)
            .withConfig(null)
    );
    const item = result.getItem();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.buy(
        showcase.BuyRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_id('display-item-0001')
            .with_access_token('accessToken-0001')
            .with_quantity(None)
            .with_config(None)
    )
    item = result.item
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.buy({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemId="display-item-0001",
    accessToken="accessToken-0001",
    quantity=nil,
    config=nil,
})

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.buy_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemId="display-item-0001",
    accessToken="accessToken-0001",
    quantity=nil,
    config=nil,
})

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

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### buyByUserId

Buy Sales Item by User ID

Purchases a display item from the specified showcase for the specified user. Generates a transaction that processes the configured verify, consume, and acquire actions defined in the sales item.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| displayItemId | string |  | ✓| UUID |  ~ 128 chars | Displayed Item ID<br>Maintains a unique name for displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| quantity | int |  | | 1 | 1 ~ 1000 | Purchase quantity |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | Configuration values applied to transaction variables |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItem](#salesitem) | Sales Item |
| transactionId | string | Issued transaction ID |
| stampSheet | string | Stamp sheet used to execute the purchase process |
| stampSheetEncryptionKeyId | string | Cryptographic key GRN used for stamp sheet signature calculations |
| autoRunStampSheet | bool? | Whether automatic transaction execution is enabled |
| atomicCommit | bool? | Whether to commit the transaction atomically |
| transaction | string | Issued transaction |
| transactionResult | [TransactionResult](#transactionresult) | Transaction Execution Result |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.BuyByUserId(
    &showcase.BuyByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemId: pointy.String("display-item-0001"),
        UserId: pointy.String("user-0001"),
        Quantity: nil,
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\BuyByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->buyByUserId(
        (new BuyByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemId("display-item-0001")
            ->withUserId("user-0001")
            ->withQuantity(null)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.BuyByUserIdRequest;
import io.gs2.showcase.result.BuyByUserIdResult;

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

try {
    BuyByUserIdResult result = client.buyByUserId(
        new BuyByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemId("display-item-0001")
            .withUserId("user-0001")
            .withQuantity(null)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    SalesItem item = result.getItem();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.BuyByUserIdResult> asyncResult = null;
yield return client.BuyByUserId(
    new Gs2.Gs2Showcase.Request.BuyByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemId("display-item-0001")
        .WithUserId("user-0001")
        .WithQuantity(null)
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.buyByUserId(
        new Gs2Showcase.BuyByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemId("display-item-0001")
            .withUserId("user-0001")
            .withQuantity(null)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.buy_by_user_id(
        showcase.BuyByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_id('display-item-0001')
            .with_user_id('user-0001')
            .with_quantity(None)
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.buy_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemId="display-item-0001",
    userId="user-0001",
    quantity=nil,
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.buy_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemId="display-item-0001",
    userId="user-0001",
    quantity=nil,
    config=nil,
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### incrementPurchaseCount

Increment the number of times a Random Displayed Item has been purchased

Increments the purchase count for a specific Random Displayed Item in the Random Showcase. Used for tracking purchase limits per rotation period.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase Name |
| displayItemName | string |  | ✓|  |  ~ 128 chars | Number of Random Displayed Item purchases name<br>The name of the Random Displayed Item whose purchase count is being tracked. Corresponds to the Random Displayed Item name in the Random Showcase. |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| count | int |  | ✓|  | 0 ~ 100 | Number of purchase times to add |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Randomly displayed items after purchase counts are added |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.IncrementPurchaseCount(
    &showcase.IncrementPurchaseCountRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("item-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Count: pointy.Int32(1),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\IncrementPurchaseCountRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->incrementPurchaseCount(
        (new IncrementPurchaseCountRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("item-0001")
            ->withAccessToken("accessToken-0001")
            ->withCount(1)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.IncrementPurchaseCountRequest;
import io.gs2.showcase.result.IncrementPurchaseCountResult;

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

try {
    IncrementPurchaseCountResult result = client.incrementPurchaseCount(
        new IncrementPurchaseCountRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("item-0001")
            .withAccessToken("accessToken-0001")
            .withCount(1)
    );
    RandomDisplayItem item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.IncrementPurchaseCountResult> asyncResult = null;
yield return client.IncrementPurchaseCount(
    new Gs2.Gs2Showcase.Request.IncrementPurchaseCountRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("item-0001")
        .WithAccessToken("accessToken-0001")
        .WithCount(1),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.incrementPurchaseCount(
        new Gs2Showcase.IncrementPurchaseCountRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("item-0001")
            .withAccessToken("accessToken-0001")
            .withCount(1)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.increment_purchase_count(
        showcase.IncrementPurchaseCountRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('item-0001')
            .with_access_token('accessToken-0001')
            .with_count(1)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.increment_purchase_count({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="item-0001",
    accessToken="accessToken-0001",
    count=1,
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.increment_purchase_count_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="item-0001",
    accessToken="accessToken-0001",
    count=1,
})

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

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

result = api_result.result
item = result.item;

```



---

### incrementPurchaseCountByUserId

Increment the number of times a Random Displayed Item has been purchased by specifying the user ID

Increments the purchase count for a specific Random Displayed Item in the Random Showcase for the specified user. Used for tracking purchase limits per rotation period.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase Name |
| displayItemName | string |  | ✓|  |  ~ 128 chars | Number of Random Displayed Item purchases name<br>The name of the Random Displayed Item whose purchase count is being tracked. Corresponds to the Random Displayed Item name in the Random Showcase. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| count | int |  | ✓|  | 0 ~ 100 | Number of purchase times to add |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Randomly displayed items after purchase counts are added |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.IncrementPurchaseCountByUserId(
    &showcase.IncrementPurchaseCountByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("item-0001"),
        UserId: pointy.String("user-0001"),
        Count: pointy.Int32(1),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\IncrementPurchaseCountByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->incrementPurchaseCountByUserId(
        (new IncrementPurchaseCountByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("item-0001")
            ->withUserId("user-0001")
            ->withCount(1)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.IncrementPurchaseCountByUserIdRequest;
import io.gs2.showcase.result.IncrementPurchaseCountByUserIdResult;

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

try {
    IncrementPurchaseCountByUserIdResult result = client.incrementPurchaseCountByUserId(
        new IncrementPurchaseCountByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("item-0001")
            .withUserId("user-0001")
            .withCount(1)
            .withTimeOffsetToken(null)
    );
    RandomDisplayItem item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.IncrementPurchaseCountByUserIdResult> asyncResult = null;
yield return client.IncrementPurchaseCountByUserId(
    new Gs2.Gs2Showcase.Request.IncrementPurchaseCountByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("item-0001")
        .WithUserId("user-0001")
        .WithCount(1)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.incrementPurchaseCountByUserId(
        new Gs2Showcase.IncrementPurchaseCountByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("item-0001")
            .withUserId("user-0001")
            .withCount(1)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.increment_purchase_count_by_user_id(
        showcase.IncrementPurchaseCountByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('item-0001')
            .with_user_id('user-0001')
            .with_count(1)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.increment_purchase_count_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="item-0001",
    userId="user-0001",
    count=1,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.increment_purchase_count_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="item-0001",
    userId="user-0001",
    count=1,
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;

```



---

### decrementPurchaseCountByUserId

Decrement the number of times a Random Displayed Item has been purchased by specifying the user ID

Decrements the purchase count for a specific Random Displayed Item in the Random Showcase. Used to reverse purchases or adjust purchase counters.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase Name |
| displayItemName | string |  | ✓|  |  ~ 128 chars | Number of Random Displayed Item purchases name<br>The name of the Random Displayed Item whose purchase count is being tracked. Corresponds to the Random Displayed Item name in the Random Showcase. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| count | int |  | ✓|  | 0 ~ 100 | Number of purchase times to subtract |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Random Displayed Item after purchase counts are subtracted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DecrementPurchaseCountByUserId(
    &showcase.DecrementPurchaseCountByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("item-0001"),
        UserId: pointy.String("user-0001"),
        Count: pointy.Int32(1),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DecrementPurchaseCountByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->decrementPurchaseCountByUserId(
        (new DecrementPurchaseCountByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("item-0001")
            ->withUserId("user-0001")
            ->withCount(1)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DecrementPurchaseCountByUserIdRequest;
import io.gs2.showcase.result.DecrementPurchaseCountByUserIdResult;

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

try {
    DecrementPurchaseCountByUserIdResult result = client.decrementPurchaseCountByUserId(
        new DecrementPurchaseCountByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("item-0001")
            .withUserId("user-0001")
            .withCount(1)
            .withTimeOffsetToken(null)
    );
    RandomDisplayItem item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DecrementPurchaseCountByUserIdResult> asyncResult = null;
yield return client.DecrementPurchaseCountByUserId(
    new Gs2.Gs2Showcase.Request.DecrementPurchaseCountByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("item-0001")
        .WithUserId("user-0001")
        .WithCount(1)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.decrementPurchaseCountByUserId(
        new Gs2Showcase.DecrementPurchaseCountByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("item-0001")
            .withUserId("user-0001")
            .withCount(1)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.decrement_purchase_count_by_user_id(
        showcase.DecrementPurchaseCountByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('item-0001')
            .with_user_id('user-0001')
            .with_count(1)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.decrement_purchase_count_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="item-0001",
    userId="user-0001",
    count=1,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.decrement_purchase_count_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="item-0001",
    userId="user-0001",
    count=1,
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;

```



---

### forceReDrawByUserId

Re-draw the contents of the Random Showcase by User ID

Forces a redraw of the random showcase items for the specified user, resetting the current selection and triggering a new random item selection from the configured pool.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase Name |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;RandomDisplayItem&gt;](#randomdisplayitem) | List of Random Displayed Items |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.ForceReDrawByUserId(
    &showcase.ForceReDrawByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\ForceReDrawByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->forceReDrawByUserId(
        (new ForceReDrawByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.ForceReDrawByUserIdRequest;
import io.gs2.showcase.result.ForceReDrawByUserIdResult;

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

try {
    ForceReDrawByUserIdResult result = client.forceReDrawByUserId(
        new ForceReDrawByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    List<RandomDisplayItem> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.ForceReDrawByUserIdResult> asyncResult = null;
yield return client.ForceReDrawByUserId(
    new Gs2.Gs2Showcase.Request.ForceReDrawByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.forceReDrawByUserId(
        new Gs2Showcase.ForceReDrawByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.force_re_draw_by_user_id(
        showcase.ForceReDrawByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.force_re_draw_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.force_re_draw_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
items = result.items;

```



---

### describeRandomDisplayItems

List Random Displayed Items

Retrieves the list of Random Displayed Items currently shown on the Random Showcase for the current user. The items are randomly selected from the configured pool and rotate based on the reset interval.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;RandomDisplayItem&gt;](#randomdisplayitem) | List of Displayed Items on Random Showcase |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeRandomDisplayItems(
    &showcase.DescribeRandomDisplayItemsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeRandomDisplayItemsRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeRandomDisplayItems(
        (new DescribeRandomDisplayItemsRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withAccessToken("accessToken-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeRandomDisplayItemsRequest;
import io.gs2.showcase.result.DescribeRandomDisplayItemsResult;

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

try {
    DescribeRandomDisplayItemsResult result = client.describeRandomDisplayItems(
        new DescribeRandomDisplayItemsRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withAccessToken("accessToken-0001")
    );
    List<RandomDisplayItem> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeRandomDisplayItemsResult> asyncResult = null;
yield return client.DescribeRandomDisplayItems(
    new Gs2.Gs2Showcase.Request.DescribeRandomDisplayItemsRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeRandomDisplayItems(
        new Gs2Showcase.DescribeRandomDisplayItemsRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withAccessToken("accessToken-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_random_display_items(
        showcase.DescribeRandomDisplayItemsRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_access_token('accessToken-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_random_display_items({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    accessToken="accessToken-0001",
})

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

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_random_display_items_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    accessToken="accessToken-0001",
})

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

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

result = api_result.result
items = result.items;

```



---

### describeRandomDisplayItemsByUserId

List Random Displayed Items on Random Showcase by User ID

Retrieves the list of Random Displayed Items currently shown on the Random Showcase for the specified user. The items are randomly selected from the configured pool and rotate based on the reset interval.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase 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&lt;RandomDisplayItem&gt;](#randomdisplayitem) | List of Displayed Items on Random Showcase |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeRandomDisplayItemsByUserId(
    &showcase.DescribeRandomDisplayItemsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeRandomDisplayItemsByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeRandomDisplayItemsByUserId(
        (new DescribeRandomDisplayItemsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeRandomDisplayItemsByUserIdRequest;
import io.gs2.showcase.result.DescribeRandomDisplayItemsByUserIdResult;

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

try {
    DescribeRandomDisplayItemsByUserIdResult result = client.describeRandomDisplayItemsByUserId(
        new DescribeRandomDisplayItemsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    List<RandomDisplayItem> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeRandomDisplayItemsByUserIdResult> asyncResult = null;
yield return client.DescribeRandomDisplayItemsByUserId(
    new Gs2.Gs2Showcase.Request.DescribeRandomDisplayItemsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeRandomDisplayItemsByUserId(
        new Gs2Showcase.DescribeRandomDisplayItemsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_random_display_items_by_user_id(
        showcase.DescribeRandomDisplayItemsByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_random_display_items_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_random_display_items_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
items = result.items;

```



---

### getRandomDisplayItem

Get Random Displayed Item on Random Showcase

Retrieves the specified Random Displayed Item from the Random Showcase for the current user. The Random Showcase must be available based on the sales period event.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| displayItemName | string |  | ✓| UUID |  ~ 128 chars | Random Displayed Item name<br>Maintains a unique name for randomly displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Displayed item |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetRandomDisplayItem(
    &showcase.GetRandomDisplayItemRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("display-item-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetRandomDisplayItemRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getRandomDisplayItem(
        (new GetRandomDisplayItemRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("display-item-0001")
            ->withAccessToken("accessToken-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetRandomDisplayItemRequest;
import io.gs2.showcase.result.GetRandomDisplayItemResult;

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

try {
    GetRandomDisplayItemResult result = client.getRandomDisplayItem(
        new GetRandomDisplayItemRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withAccessToken("accessToken-0001")
    );
    RandomDisplayItem item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetRandomDisplayItemResult> asyncResult = null;
yield return client.GetRandomDisplayItem(
    new Gs2.Gs2Showcase.Request.GetRandomDisplayItemRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("display-item-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getRandomDisplayItem(
        new Gs2Showcase.GetRandomDisplayItemRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_random_display_item(
        showcase.GetRandomDisplayItemRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('display-item-0001')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_random_display_item({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    accessToken="accessToken-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_random_display_item_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    accessToken="accessToken-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### getRandomDisplayItemByUserId

Get Random Displayed Item on Random Showcase by User ID

Retrieves the specified Random Displayed Item from the Random Showcase for the specified user. The Random Showcase must be available based on the sales period event.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| displayItemName | string |  | ✓| UUID |  ~ 128 chars | Random Displayed Item name<br>Maintains a unique name for randomly displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Displayed item |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetRandomDisplayItemByUserId(
    &showcase.GetRandomDisplayItemByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("display-item-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetRandomDisplayItemByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getRandomDisplayItemByUserId(
        (new GetRandomDisplayItemByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("display-item-0001")
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetRandomDisplayItemByUserIdRequest;
import io.gs2.showcase.result.GetRandomDisplayItemByUserIdResult;

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

try {
    GetRandomDisplayItemByUserIdResult result = client.getRandomDisplayItemByUserId(
        new GetRandomDisplayItemByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    RandomDisplayItem item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetRandomDisplayItemByUserIdResult> asyncResult = null;
yield return client.GetRandomDisplayItemByUserId(
    new Gs2.Gs2Showcase.Request.GetRandomDisplayItemByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("display-item-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getRandomDisplayItemByUserId(
        new Gs2Showcase.GetRandomDisplayItemByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_random_display_item_by_user_id(
        showcase.GetRandomDisplayItemByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('display-item-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_random_display_item_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_random_display_item_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    userId="user-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;

```



---

### randomShowcaseBuy

Purchase Random Displayed Item from Random Showcase

Purchases a Random Displayed Item from the Random Showcase. Generates a transaction that processes the configured verify, consume, and acquire actions. Configuration values can be passed to override transaction variables.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| displayItemName | string |  | ✓| UUID |  ~ 128 chars | Random Displayed Item name<br>Maintains a unique name for randomly displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| quantity | int |  | | 1 | 1 ~ 1000 | Purchase quantity |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | Configuration values applied to transaction variables |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Displayed item |
| transactionId | string | Issued transaction ID |
| stampSheet | string | Stamp sheet used to execute the purchase process |
| stampSheetEncryptionKeyId | string | Cryptographic key GRN used for stamp sheet signature calculations |
| autoRunStampSheet | bool? | Whether automatic transaction execution is enabled |
| atomicCommit | bool? | Whether to commit the transaction atomically |
| transaction | string | Issued transaction |
| transactionResult | [TransactionResult](#transactionresult) | Transaction Execution Result |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.RandomShowcaseBuy(
    &showcase.RandomShowcaseBuyRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("display-item-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Quantity: pointy.Int32(1),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\RandomShowcaseBuyRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->randomShowcaseBuy(
        (new RandomShowcaseBuyRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("display-item-0001")
            ->withAccessToken("accessToken-0001")
            ->withQuantity(1)
            ->withConfig(null)
    );
    $item = $result->getItem();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.RandomShowcaseBuyRequest;
import io.gs2.showcase.result.RandomShowcaseBuyResult;

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

try {
    RandomShowcaseBuyResult result = client.randomShowcaseBuy(
        new RandomShowcaseBuyRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withAccessToken("accessToken-0001")
            .withQuantity(1)
            .withConfig(null)
    );
    RandomDisplayItem item = result.getItem();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.RandomShowcaseBuyResult> asyncResult = null;
yield return client.RandomShowcaseBuy(
    new Gs2.Gs2Showcase.Request.RandomShowcaseBuyRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("display-item-0001")
        .WithAccessToken("accessToken-0001")
        .WithQuantity(1)
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.randomShowcaseBuy(
        new Gs2Showcase.RandomShowcaseBuyRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withAccessToken("accessToken-0001")
            .withQuantity(1)
            .withConfig(null)
    );
    const item = result.getItem();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.random_showcase_buy(
        showcase.RandomShowcaseBuyRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('display-item-0001')
            .with_access_token('accessToken-0001')
            .with_quantity(1)
            .with_config(None)
    )
    item = result.item
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.random_showcase_buy({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    accessToken="accessToken-0001",
    quantity=1,
    config=nil,
})

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.random_showcase_buy_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    accessToken="accessToken-0001",
    quantity=1,
    config=nil,
})

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

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### randomShowcaseBuyByUserId

Purchase Random Displayed Item from Random Showcase by User ID

Purchases a Random Displayed Item from the Random Showcase for the specified user. Generates a transaction that processes the configured verify, consume, and acquire actions.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| displayItemName | string |  | ✓| UUID |  ~ 128 chars | Random Displayed Item name<br>Maintains a unique name for randomly displayed Sales Items.<br>If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format. |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| quantity | int |  | | 1 | 1 ~ 1000 | Purchase quantity |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | Configuration values applied to transaction variables |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomDisplayItem](#randomdisplayitem) | Displayed item |
| transactionId | string | Issued transaction ID |
| stampSheet | string | Stamp sheet used to execute the purchase process |
| stampSheetEncryptionKeyId | string | Cryptographic key GRN used for stamp sheet signature calculations |
| autoRunStampSheet | bool? | Whether automatic transaction execution is enabled |
| atomicCommit | bool? | Whether to commit the transaction atomically |
| transaction | string | Issued transaction |
| transactionResult | [TransactionResult](#transactionresult) | Transaction Execution Result |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.RandomShowcaseBuyByUserId(
    &showcase.RandomShowcaseBuyByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        DisplayItemName: pointy.String("display-item-0001"),
        UserId: pointy.String("user-0001"),
        Quantity: pointy.Int32(1),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\RandomShowcaseBuyByUserIdRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->randomShowcaseBuyByUserId(
        (new RandomShowcaseBuyByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDisplayItemName("display-item-0001")
            ->withUserId("user-0001")
            ->withQuantity(1)
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.RandomShowcaseBuyByUserIdRequest;
import io.gs2.showcase.result.RandomShowcaseBuyByUserIdResult;

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

try {
    RandomShowcaseBuyByUserIdResult result = client.randomShowcaseBuyByUserId(
        new RandomShowcaseBuyByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withUserId("user-0001")
            .withQuantity(1)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    RandomDisplayItem item = result.getItem();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.RandomShowcaseBuyByUserIdResult> asyncResult = null;
yield return client.RandomShowcaseBuyByUserId(
    new Gs2.Gs2Showcase.Request.RandomShowcaseBuyByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDisplayItemName("display-item-0001")
        .WithUserId("user-0001")
        .WithQuantity(1)
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.randomShowcaseBuyByUserId(
        new Gs2Showcase.RandomShowcaseBuyByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDisplayItemName("display-item-0001")
            .withUserId("user-0001")
            .withQuantity(1)
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.random_showcase_buy_by_user_id(
        showcase.RandomShowcaseBuyByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_display_item_name('display-item-0001')
            .with_user_id('user-0001')
            .with_quantity(1)
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.random_showcase_buy_by_user_id({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    userId="user-0001",
    quantity=1,
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.random_showcase_buy_by_user_id_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    displayItemName="display-item-0001",
    userId="user-0001",
    quantity=1,
    config=nil,
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### exportMaster

Export Showcase Master in a master data format that can be activated

Exports the currently registered showcase masters in an activatable master data format. The exported data contains all showcase, sales item, sales item group, and random showcase definitions.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentShowcaseMaster](#currentshowcasemaster) | Showcase master data that can be activated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &showcase.ExportMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\ExportMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.ExportMasterRequest;
import io.gs2.showcase.result.ExportMasterResult;

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

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Showcase.Request.ExportMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.exportMaster(
        new Gs2Showcase.ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.export_master(
        showcase.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.export_master({
    namespaceName="namespace-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.export_master_async({
    namespaceName="namespace-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### getCurrentShowcaseMaster

Get currently active Showcase master data

Retrieves the currently active showcase master data including all showcase, sales item, sales item group, and random showcase definitions that are being used.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentShowcaseMaster](#currentshowcasemaster) | Currently active Showcase master data |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetCurrentShowcaseMaster(
    &showcase.GetCurrentShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetCurrentShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getCurrentShowcaseMaster(
        (new GetCurrentShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetCurrentShowcaseMasterRequest;
import io.gs2.showcase.result.GetCurrentShowcaseMasterResult;

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

try {
    GetCurrentShowcaseMasterResult result = client.getCurrentShowcaseMaster(
        new GetCurrentShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetCurrentShowcaseMasterResult> asyncResult = null;
yield return client.GetCurrentShowcaseMaster(
    new Gs2.Gs2Showcase.Request.GetCurrentShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getCurrentShowcaseMaster(
        new Gs2Showcase.GetCurrentShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_current_showcase_master(
        showcase.GetCurrentShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_current_showcase_master({
    namespaceName="namespace-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_current_showcase_master_async({
    namespaceName="namespace-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### preUpdateCurrentShowcaseMaster

Update currently active Showcase master data (3-phase version)

When uploading master data larger than 1MB, the update is performed in 3 phases.
1. Execute this API to obtain a token and URL for uploading.
2. Upload the master data to the obtained URL.
3. Execute UpdateCurrentShowcaseMaster by passing the token obtained from the upload to reflect the master data.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace 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




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentShowcaseMaster(
    &showcase.PreUpdateCurrentShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\PreUpdateCurrentShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentShowcaseMaster(
        (new PreUpdateCurrentShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.PreUpdateCurrentShowcaseMasterRequest;
import io.gs2.showcase.result.PreUpdateCurrentShowcaseMasterResult;

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

try {
    PreUpdateCurrentShowcaseMasterResult result = client.preUpdateCurrentShowcaseMaster(
        new PreUpdateCurrentShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.PreUpdateCurrentShowcaseMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentShowcaseMaster(
    new Gs2.Gs2Showcase.Request.PreUpdateCurrentShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.preUpdateCurrentShowcaseMaster(
        new Gs2Showcase.PreUpdateCurrentShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.pre_update_current_showcase_master(
        showcase.PreUpdateCurrentShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.pre_update_current_showcase_master({
    namespaceName="namespace-0001",
})

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.pre_update_current_showcase_master_async({
    namespaceName="namespace-0001",
})

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

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

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

```



---

### updateCurrentShowcaseMaster

Update currently active Showcase master data

Updates the currently active showcase master data. Supports both direct update mode and pre-upload mode for handling large master data. In pre-upload mode, the settings are read using the upload token obtained from the PreUpdate API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| mode | string (enum)<br>enum {<br>"direct",<br>"preUpload"<br>}<br> |  | | "direct" |  | Update mode"direct": Directly update master data / "preUpload": Upload master data and then update /  |
| settings | string | {mode} == "direct" | ✓*|  |  ~ 5242880 bytes (5MB) | Master Data<br>* Required if mode is "direct" |
| uploadToken | string | {mode} == "preUpload" | ✓*|  |  ~ 1024 chars | Token obtained by pre-upload<br>Used to apply the uploaded master data.<br>* Required if mode is "preUpload" |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentShowcaseMaster](#currentshowcasemaster) | Updated master data of the currently active Showcase |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentShowcaseMaster(
    &showcase.UpdateCurrentShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }"),
        UploadToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateCurrentShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateCurrentShowcaseMaster(
        (new UpdateCurrentShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }")
            ->withUploadToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateCurrentShowcaseMasterRequest;
import io.gs2.showcase.result.UpdateCurrentShowcaseMasterResult;

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

try {
    UpdateCurrentShowcaseMasterResult result = client.updateCurrentShowcaseMaster(
        new UpdateCurrentShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }")
            .withUploadToken(null)
    );
    CurrentShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateCurrentShowcaseMasterResult> asyncResult = null;
yield return client.UpdateCurrentShowcaseMaster(
    new Gs2.Gs2Showcase.Request.UpdateCurrentShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }")
        .WithUploadToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateCurrentShowcaseMaster(
        new Gs2Showcase.UpdateCurrentShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_current_showcase_master(
        showcase.UpdateCurrentShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{\n      "version": "2019-04-04",\n      "showcases": [\n        {\n          "name": "gem",\n          "metadata": "GEM",\n          "displayItems": [\n            {\n              "type": "salesItem",\n              "salesItem": {\n                "name": "gem_3000",\n                "metadata": "GEM_3000",\n                "consumeActions": [\n                  {\n                    "action": "Gs2Money:RecordReceipt",\n                    "request": "Gs2Money:RecordReceipt:request"\n                  }\n                ],\n                "acquireActions": [\n                  {\n                    "action": "Gs2Money:DepositByUserId",\n                    "request": "Gs2Money:DepositByUserId:request"\n                  }\n                ]\n              }\n            },\n            {\n              "type": "salesItemGroup",\n              "salesPeriodEventId": "grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",\n              "salesItemGroup": {\n                "name": "step_gem",\n                "metadata": "STEP_GEM",\n                "salesItems": [\n                  {\n                    "name": "step1_gem_1000",\n                    "metadata": "STEP1_GEM_1000",\n                    "consumeActions": [\n                      {\n                        "action": "Gs2Money:RecordReceipt",\n                        "request": "Gs2Money:RecordReceipt:request"\n                      },\n                      {\n                        "action": "Gs2Limit:CountUpByUserId",\n                        "request": "Gs2Limit:CountUpByUserId:request"\n                      }\n                    ],\n                    "acquireActions": [\n                      {\n                        "action": "Gs2Money:DepositByUserId",\n                        "request": "Gs2Money:DepositByUserId:request"\n                      }\n                    ]\n                  },\n                  {\n                    "name": "step2_gem_2000",\n                    "metadata": "STEP1_GEM_2000",\n                    "consumeActions": [\n                      {\n                        "action": "Gs2Money:RecordReceipt",\n                        "request": "Gs2Money:RecordReceipt:request"\n                      },\n                      {\n                        "action": "Gs2Limit:CountUpByUserId",\n                        "request": "Gs2Limit:CountUpByUserId:request"\n                      }\n                    ],\n                    "acquireActions": [\n                      {\n                        "action": "Gs2Money:DepositByUserId",\n                        "request": "Gs2Money:DepositByUserId:request"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          "name": "gacha",\n          "metadata": "GACHA",\n          "displayItems": [\n            {\n              "type": "salesItem",\n              "salesItem": {\n                "name": "single",\n                "metadata": "SINGLE",\n                "consumeActions": [\n                  {\n                    "action": "Gs2Money:WithdrawByUserId",\n                    "request": "{\\"moneyName\\": \\"money-0001\\", \\"userId\\": \\"{userId}\\", \\"slot\\": \\"{slot}\\", \\"count\\": 100, \\"paidOnly\\": false}"\n                  }\n                ],\n                "acquireActions": [\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "{\\"categoryName\\": \\"category-0001\\", \\"inventoryModelName\\": \\"character\\", \\"itemModelName\\": \\"ssr-0001\\", \\"userId\\": \\"{userId}\\", \\"acquireCount\\": 1}"\n                  }\n                ]\n              }\n            },\n            {\n              "type": "salesItem",\n              "salesItem": {\n                "name": "10times",\n                "metadata": "10TIMES",\n                "consumeActions": [\n                  {\n                    "action": "Gs2Money:WithdrawByUserId",\n                    "request": "Gs2Money:WithdrawByUserId:request"\n                  }\n                ],\n                "acquireActions": [\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  },\n                  {\n                    "action": "Gs2Inventory:AcquireItemSetByUserId",\n                    "request": "Gs2Inventory:AcquireItemSetByUserId:request"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.update_current_showcase_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }",
    uploadToken=nil,
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.update_current_showcase_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n      \"version\": \"2019-04-04\",\n      \"showcases\": [\n        {\n          \"name\": \"gem\",\n          \"metadata\": \"GEM\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"gem_3000\",\n                \"metadata\": \"GEM_3000\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:RecordReceipt\",\n                    \"request\": \"Gs2Money:RecordReceipt:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Money:DepositByUserId\",\n                    \"request\": \"Gs2Money:DepositByUserId:request\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItemGroup\",\n              \"salesPeriodEventId\": \"grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001\",\n              \"salesItemGroup\": {\n                \"name\": \"step_gem\",\n                \"metadata\": \"STEP_GEM\",\n                \"salesItems\": [\n                  {\n                    \"name\": \"step1_gem_1000\",\n                    \"metadata\": \"STEP1_GEM_1000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  },\n                  {\n                    \"name\": \"step2_gem_2000\",\n                    \"metadata\": \"STEP1_GEM_2000\",\n                    \"consumeActions\": [\n                      {\n                        \"action\": \"Gs2Money:RecordReceipt\",\n                        \"request\": \"Gs2Money:RecordReceipt:request\"\n                      },\n                      {\n                        \"action\": \"Gs2Limit:CountUpByUserId\",\n                        \"request\": \"Gs2Limit:CountUpByUserId:request\"\n                      }\n                    ],\n                    \"acquireActions\": [\n                      {\n                        \"action\": \"Gs2Money:DepositByUserId\",\n                        \"request\": \"Gs2Money:DepositByUserId:request\"\n                      }\n                    ]\n                  }\n                ]\n              }\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"displayItems\": [\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"single\",\n                \"metadata\": \"SINGLE\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"{\\\"moneyName\\\": \\\"money-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"slot\\\": \\\"{slot}\\\", \\\"count\\\": 100, \\\"paidOnly\\\": false}\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"{\\\"categoryName\\\": \\\"category-0001\\\", \\\"inventoryModelName\\\": \\\"character\\\", \\\"itemModelName\\\": \\\"ssr-0001\\\", \\\"userId\\\": \\\"{userId}\\\", \\\"acquireCount\\\": 1}\"\n                  }\n                ]\n              }\n            },\n            {\n              \"type\": \"salesItem\",\n              \"salesItem\": {\n                \"name\": \"10times\",\n                \"metadata\": \"10TIMES\",\n                \"consumeActions\": [\n                  {\n                    \"action\": \"Gs2Money:WithdrawByUserId\",\n                    \"request\": \"Gs2Money:WithdrawByUserId:request\"\n                  }\n                ],\n                \"acquireActions\": [\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  },\n                  {\n                    \"action\": \"Gs2Inventory:AcquireItemSetByUserId\",\n                    \"request\": \"Gs2Inventory:AcquireItemSetByUserId:request\"\n                  }\n                ]\n              }\n            }\n          ]\n        }\n      ]\n    }",
    uploadToken=nil,
})

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

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

result = api_result.result
item = result.item;

```



---

### updateCurrentShowcaseMasterFromGitHub

Update currently active Showcase master data from GitHub

Updates the currently active showcase master data by checking out master data from a GitHub repository using the specified checkout settings. The API key is decrypted via the key service to authenticate with GitHub.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| checkoutSetting | [GitHubCheckoutSetting](#githubcheckoutsetting) |  | ✓|  |  | Setting for checking out master data from GitHub |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentShowcaseMaster](#currentshowcasemaster) | Updated master data of the currently active Showcase |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentShowcaseMasterFromGitHub(
    &showcase.UpdateCurrentShowcaseMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &showcase.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.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateCurrentShowcaseMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateCurrentShowcaseMasterFromGitHub(
        (new UpdateCurrentShowcaseMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId("apiKeyId-0001")
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateCurrentShowcaseMasterFromGitHubRequest;
import io.gs2.showcase.result.UpdateCurrentShowcaseMasterFromGitHubResult;

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

try {
    UpdateCurrentShowcaseMasterFromGitHubResult result = client.updateCurrentShowcaseMasterFromGitHub(
        new UpdateCurrentShowcaseMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateCurrentShowcaseMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentShowcaseMasterFromGitHub(
    new Gs2.Gs2Showcase.Request.UpdateCurrentShowcaseMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Showcase.Model.GitHubCheckoutSetting()
            .WithApiKeyId("apiKeyId-0001")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateCurrentShowcaseMasterFromGitHub(
        new Gs2Showcase.UpdateCurrentShowcaseMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Showcase.model.GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_current_showcase_master_from_git_hub(
        showcase.UpdateCurrentShowcaseMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(showcase.GitHubCheckoutSetting()
                .with_api_key_id('apiKeyId-0001')
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

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

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

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

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

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

result = api_result.result
item = result.item;

```



---

### describeSalesItemMasters

List Sales Item Masters

Retrieves a paginated list of sales item masters. Can filter by name prefix. Sales item masters define the verify, consume, and acquire actions that are executed when a product is purchased.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by product 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&lt;SalesItemMaster&gt;](#salesitemmaster) | List of Sales Item Masters |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeSalesItemMasters(
    &showcase.DescribeSalesItemMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeSalesItemMastersRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeSalesItemMasters(
        (new DescribeSalesItemMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeSalesItemMastersRequest;
import io.gs2.showcase.result.DescribeSalesItemMastersResult;

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

try {
    DescribeSalesItemMastersResult result = client.describeSalesItemMasters(
        new DescribeSalesItemMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SalesItemMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeSalesItemMastersResult> asyncResult = null;
yield return client.DescribeSalesItemMasters(
    new Gs2.Gs2Showcase.Request.DescribeSalesItemMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeSalesItemMasters(
        new Gs2Showcase.DescribeSalesItemMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_sales_item_masters(
        showcase.DescribeSalesItemMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_sales_item_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_sales_item_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

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

```



---

### createSalesItemMaster

Create Sales Item Master

Creates a new sales item master with verify actions (pre-purchase validation), consume actions (resources to deduct), and acquire actions (resources to grant) that define the complete purchase transaction.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Sales Item name<br>Unique Sales Item name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  | |  | 0 ~ 10 items | List of Verify Actions<br>Precondition checks executed before the purchase. All verify actions must pass before consume and acquire actions are processed. Can be used to check purchase eligibility conditions. |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  | |  | 0 ~ 10 items | List of Consume Actions<br>Actions that consume resources as the purchase price. Can include GS2-Limit CountUp actions to control purchase limits for sales item groups. |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  | ✓|  | 1 ~ 100 items | List of Acquire Actions<br>Actions that grant resources as purchase rewards. Executed after all consume actions complete successfully. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemMaster](#salesitemmaster) | Sales Item Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CreateSalesItemMaster(
    &showcase.CreateSalesItemMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("sales-item-0001"),
        Description: nil,
        Metadata: nil,
        VerifyActions: nil,
        ConsumeActions: []showcase.ConsumeAction{
            showcase.ConsumeAction{
                Action: pointy.String("Gs2Money:WithdrawByUserId"),
                Request: pointy.String("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
            },
        },
        AcquireActions: []showcase.AcquireAction{
            showcase.AcquireAction{
                Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                Request: pointy.String("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CreateSalesItemMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->createSalesItemMaster(
        (new CreateSalesItemMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("sales-item-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withVerifyActions(null)
            ->withConsumeActions([
                (new \Gs2\Showcase\Model\ConsumeAction())
                    ->withAction("Gs2Money:WithdrawByUserId")
                    ->withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
            ])
            ->withAcquireActions([
                (new \Gs2\Showcase\Model\AcquireAction())
                    ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                    ->withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CreateSalesItemMasterRequest;
import io.gs2.showcase.result.CreateSalesItemMasterResult;

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

try {
    CreateSalesItemMasterResult result = client.createSalesItemMaster(
        new CreateSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("sales-item-0001")
            .withDescription(null)
            .withMetadata(null)
            .withVerifyActions(null)
            .withConsumeActions(Arrays.asList(
                new io.gs2.showcase.model.ConsumeAction()
                    .withAction("Gs2Money:WithdrawByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
            ))
            .withAcquireActions(Arrays.asList(
                new io.gs2.showcase.model.AcquireAction()
                    .withAction("Gs2Stamina:RecoverStaminaByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}")
            ))
    );
    SalesItemMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CreateSalesItemMasterResult> asyncResult = null;
yield return client.CreateSalesItemMaster(
    new Gs2.Gs2Showcase.Request.CreateSalesItemMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("sales-item-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithVerifyActions(null)
        .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
            new Gs2.Core.Model.ConsumeAction()
                .WithAction("Gs2Money:WithdrawByUserId")
                .WithRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
        })
        .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
            new Gs2.Core.Model.AcquireAction()
                .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                .WithRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.createSalesItemMaster(
        new Gs2Showcase.CreateSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("sales-item-0001")
            .withDescription(null)
            .withMetadata(null)
            .withVerifyActions(null)
            .withConsumeActions([
                new Gs2Showcase.model.ConsumeAction()
                    .withAction("Gs2Money:WithdrawByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
            ])
            .withAcquireActions([
                new Gs2Showcase.model.AcquireAction()
                    .withAction("Gs2Stamina:RecoverStaminaByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.create_sales_item_master(
        showcase.CreateSalesItemMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('sales-item-0001')
            .with_description(None)
            .with_metadata(None)
            .with_verify_actions(None)
            .with_consume_actions([
                showcase.ConsumeAction()
                    .with_action('Gs2Money:WithdrawByUserId')
                    .with_request('{"moneyName": "money-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
            ])
            .with_acquire_actions([
                showcase.AcquireAction()
                    .with_action('Gs2Stamina:RecoverStaminaByUserId')
                    .with_request('{"moneyName": "money-0001", "userId": "user-0001", "slot": 0, "count": 100, "paidOnly": false}'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.create_sales_item_master({
    namespaceName="namespace-0001",
    name="sales-item-0001",
    description=nil,
    metadata=nil,
    verifyActions=nil,
    consumeActions={
        {
            action="Gs2Money:WithdrawByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
        }
    },
    acquireActions={
        {
            action="Gs2Stamina:RecoverStaminaByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
        }
    },
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.create_sales_item_master_async({
    namespaceName="namespace-0001",
    name="sales-item-0001",
    description=nil,
    metadata=nil,
    verifyActions=nil,
    consumeActions={
        {
            action="Gs2Money:WithdrawByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
        }
    },
    acquireActions={
        {
            action="Gs2Stamina:RecoverStaminaByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 100, \"paidOnly\": false}",
        }
    },
})

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

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

result = api_result.result
item = result.item;

```



---

### getSalesItemMaster

Get Sales Item Master

Retrieves the specified sales item master including its verify, consume, and acquire actions configuration.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| salesItemName | string |  | ✓|  |  ~ 128 chars | Sales Item name<br>Unique Sales Item name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemMaster](#salesitemmaster) | Sales Item Master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetSalesItemMaster(
    &showcase.GetSalesItemMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SalesItemName: pointy.String("sales-item-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetSalesItemMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getSalesItemMaster(
        (new GetSalesItemMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSalesItemName("sales-item-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetSalesItemMasterRequest;
import io.gs2.showcase.result.GetSalesItemMasterResult;

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

try {
    GetSalesItemMasterResult result = client.getSalesItemMaster(
        new GetSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemName("sales-item-0001")
    );
    SalesItemMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetSalesItemMasterResult> asyncResult = null;
yield return client.GetSalesItemMaster(
    new Gs2.Gs2Showcase.Request.GetSalesItemMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSalesItemName("sales-item-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getSalesItemMaster(
        new Gs2Showcase.GetSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemName("sales-item-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_sales_item_master(
        showcase.GetSalesItemMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_sales_item_name('sales-item-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_sales_item_master({
    namespaceName="namespace-0001",
    salesItemName="sales-item-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_sales_item_master_async({
    namespaceName="namespace-0001",
    salesItemName="sales-item-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### updateSalesItemMaster

Update Sales Item Master

Updates the specified sales item master's description, metadata, verify actions, consume actions, and acquire actions.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| salesItemName | string |  | ✓|  |  ~ 128 chars | Sales Item name<br>Unique Sales Item name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  | |  | 0 ~ 10 items | List of Verify Actions<br>Precondition checks executed before the purchase. All verify actions must pass before consume and acquire actions are processed. Can be used to check purchase eligibility conditions. |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  | |  | 0 ~ 10 items | List of Consume Actions<br>Actions that consume resources as the purchase price. Can include GS2-Limit CountUp actions to control purchase limits for sales item groups. |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  | ✓|  | 1 ~ 100 items | List of Acquire Actions<br>Actions that grant resources as purchase rewards. Executed after all consume actions complete successfully. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemMaster](#salesitemmaster) | Sales Item Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateSalesItemMaster(
    &showcase.UpdateSalesItemMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SalesItemName: pointy.String("sales-item-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("SALES_ITEM_0001"),
        VerifyActions: nil,
        ConsumeActions: []showcase.ConsumeAction{
            showcase.ConsumeAction{
                Action: pointy.String("Gs2Money:WithdrawByUserId"),
                Request: pointy.String("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            },
        },
        AcquireActions: []showcase.AcquireAction{
            showcase.AcquireAction{
                Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                Request: pointy.String("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateSalesItemMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateSalesItemMaster(
        (new UpdateSalesItemMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSalesItemName("sales-item-0001")
            ->withDescription("description1")
            ->withMetadata("SALES_ITEM_0001")
            ->withVerifyActions(null)
            ->withConsumeActions([
                (new \Gs2\Showcase\Model\ConsumeAction())
                    ->withAction("Gs2Money:WithdrawByUserId")
                    ->withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            ])
            ->withAcquireActions([
                (new \Gs2\Showcase\Model\AcquireAction())
                    ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                    ->withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateSalesItemMasterRequest;
import io.gs2.showcase.result.UpdateSalesItemMasterResult;

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

try {
    UpdateSalesItemMasterResult result = client.updateSalesItemMaster(
        new UpdateSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemName("sales-item-0001")
            .withDescription("description1")
            .withMetadata("SALES_ITEM_0001")
            .withVerifyActions(null)
            .withConsumeActions(Arrays.asList(
                new io.gs2.showcase.model.ConsumeAction()
                    .withAction("Gs2Money:WithdrawByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}")
            ))
            .withAcquireActions(Arrays.asList(
                new io.gs2.showcase.model.AcquireAction()
                    .withAction("Gs2Stamina:RecoverStaminaByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}")
            ))
    );
    SalesItemMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateSalesItemMasterResult> asyncResult = null;
yield return client.UpdateSalesItemMaster(
    new Gs2.Gs2Showcase.Request.UpdateSalesItemMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSalesItemName("sales-item-0001")
        .WithDescription("description1")
        .WithMetadata("SALES_ITEM_0001")
        .WithVerifyActions(null)
        .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
            new Gs2.Core.Model.ConsumeAction()
                .WithAction("Gs2Money:WithdrawByUserId")
                .WithRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
        })
        .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
            new Gs2.Core.Model.AcquireAction()
                .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                .WithRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateSalesItemMaster(
        new Gs2Showcase.UpdateSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemName("sales-item-0001")
            .withDescription("description1")
            .withMetadata("SALES_ITEM_0001")
            .withVerifyActions(null)
            .withConsumeActions([
                new Gs2Showcase.model.ConsumeAction()
                    .withAction("Gs2Money:WithdrawByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            ])
            .withAcquireActions([
                new Gs2Showcase.model.AcquireAction()
                    .withAction("Gs2Stamina:RecoverStaminaByUserId")
                    .withRequest("{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_sales_item_master(
        showcase.UpdateSalesItemMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_sales_item_name('sales-item-0001')
            .with_description('description1')
            .with_metadata('SALES_ITEM_0001')
            .with_verify_actions(None)
            .with_consume_actions([
                showcase.ConsumeAction()
                    .with_action('Gs2Money:WithdrawByUserId')
                    .with_request('{"moneyName": "money-0001", "userId": "user-0001", "slot": 0, "count": 200, "paidOnly": false}'),
            ])
            .with_acquire_actions([
                showcase.AcquireAction()
                    .with_action('Gs2Stamina:RecoverStaminaByUserId')
                    .with_request('{"moneyName": "money-0001", "userId": "user-0001", "slot": 0, "count": 200, "paidOnly": false}'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.update_sales_item_master({
    namespaceName="namespace-0001",
    salesItemName="sales-item-0001",
    description="description1",
    metadata="SALES_ITEM_0001",
    verifyActions=nil,
    consumeActions={
        {
            action="Gs2Money:WithdrawByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}",
        }
    },
    acquireActions={
        {
            action="Gs2Stamina:RecoverStaminaByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}",
        }
    },
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.update_sales_item_master_async({
    namespaceName="namespace-0001",
    salesItemName="sales-item-0001",
    description="description1",
    metadata="SALES_ITEM_0001",
    verifyActions=nil,
    consumeActions={
        {
            action="Gs2Money:WithdrawByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}",
        }
    },
    acquireActions={
        {
            action="Gs2Stamina:RecoverStaminaByUserId",
            request="{\"moneyName\": \"money-0001\", \"userId\": \"user-0001\", \"slot\": 0, \"count\": 200, \"paidOnly\": false}",
        }
    },
})

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

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

result = api_result.result
item = result.item;

```



---

### deleteSalesItemMaster

Delete Sales Item Master

Deletes the specified sales item master. This only removes the master definition and does not affect the currently active showcase.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| salesItemName | string |  | ✓|  |  ~ 128 chars | Sales Item name<br>Unique Sales Item name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemMaster](#salesitemmaster) | Sales Item Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DeleteSalesItemMaster(
    &showcase.DeleteSalesItemMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SalesItemName: pointy.String("sales-item-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DeleteSalesItemMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->deleteSalesItemMaster(
        (new DeleteSalesItemMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSalesItemName("sales-item-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DeleteSalesItemMasterRequest;
import io.gs2.showcase.result.DeleteSalesItemMasterResult;

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

try {
    DeleteSalesItemMasterResult result = client.deleteSalesItemMaster(
        new DeleteSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemName("sales-item-0001")
    );
    SalesItemMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DeleteSalesItemMasterResult> asyncResult = null;
yield return client.DeleteSalesItemMaster(
    new Gs2.Gs2Showcase.Request.DeleteSalesItemMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSalesItemName("sales-item-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.deleteSalesItemMaster(
        new Gs2Showcase.DeleteSalesItemMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemName("sales-item-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.delete_sales_item_master(
        showcase.DeleteSalesItemMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_sales_item_name('sales-item-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.delete_sales_item_master({
    namespaceName="namespace-0001",
    salesItemName="sales-item-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.delete_sales_item_master_async({
    namespaceName="namespace-0001",
    salesItemName="sales-item-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### describeSalesItemGroupMasters

List Sales Item Group Masters

Retrieves a paginated list of Sales Item Group masters. Can filter by name prefix. Sales Item Group masters bundle multiple sales items together for display in a showcase.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by Sales Item Group 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&lt;SalesItemGroupMaster&gt;](#salesitemgroupmaster) | List of Sales Item Group Masters |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeSalesItemGroupMasters(
    &showcase.DescribeSalesItemGroupMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeSalesItemGroupMastersRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeSalesItemGroupMasters(
        (new DescribeSalesItemGroupMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeSalesItemGroupMastersRequest;
import io.gs2.showcase.result.DescribeSalesItemGroupMastersResult;

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

try {
    DescribeSalesItemGroupMastersResult result = client.describeSalesItemGroupMasters(
        new DescribeSalesItemGroupMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<SalesItemGroupMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeSalesItemGroupMastersResult> asyncResult = null;
yield return client.DescribeSalesItemGroupMasters(
    new Gs2.Gs2Showcase.Request.DescribeSalesItemGroupMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeSalesItemGroupMasters(
        new Gs2Showcase.DescribeSalesItemGroupMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_sales_item_group_masters(
        showcase.DescribeSalesItemGroupMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_sales_item_group_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_sales_item_group_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

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

```



---

### createSalesItemGroupMaster

Create Sales Item Group Master

Creates a new Sales Item Group master with a name, metadata, and a list of Sales Item names that belong to the group.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Sales Item Group name<br>Unique Sales Item Group name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| salesItemNames | List&lt;string&gt; |  | ✓|  | 2 ~ 10 items | List of Sales Items included in the Sales Item Group<br>Ordered list of Sales Item names in this group. The system evaluates each item from first to last using GS2-Limit counters to determine purchase availability. The first purchasable item is displayed; if none qualify, the last item in the list is used as a fallback. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemGroupMaster](#salesitemgroupmaster) | Sales Item Group Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CreateSalesItemGroupMaster(
    &showcase.CreateSalesItemGroupMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("sales-item-group-0001"),
        Description: nil,
        Metadata: nil,
        SalesItemNames: []*string{
            pointy.String("salesItem-0001"),
            pointy.String("salesItem-0002"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CreateSalesItemGroupMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->createSalesItemGroupMaster(
        (new CreateSalesItemGroupMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("sales-item-group-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withSalesItemNames([
                "salesItem-0001",
                "salesItem-0002",
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CreateSalesItemGroupMasterRequest;
import io.gs2.showcase.result.CreateSalesItemGroupMasterResult;

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

try {
    CreateSalesItemGroupMasterResult result = client.createSalesItemGroupMaster(
        new CreateSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("sales-item-group-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSalesItemNames(Arrays.asList(
                "salesItem-0001",
                "salesItem-0002"
            ))
    );
    SalesItemGroupMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CreateSalesItemGroupMasterResult> asyncResult = null;
yield return client.CreateSalesItemGroupMaster(
    new Gs2.Gs2Showcase.Request.CreateSalesItemGroupMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("sales-item-group-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithSalesItemNames(new string[] {
            "salesItem-0001",
            "salesItem-0002",
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.createSalesItemGroupMaster(
        new Gs2Showcase.CreateSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("sales-item-group-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSalesItemNames([
                "salesItem-0001",
                "salesItem-0002",
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.create_sales_item_group_master(
        showcase.CreateSalesItemGroupMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('sales-item-group-0001')
            .with_description(None)
            .with_metadata(None)
            .with_sales_item_names([
                'salesItem-0001',
                'salesItem-0002',
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.create_sales_item_group_master({
    namespaceName="namespace-0001",
    name="sales-item-group-0001",
    description=nil,
    metadata=nil,
    salesItemNames={
        "salesItem-0001",
        "salesItem-0002"
    },
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.create_sales_item_group_master_async({
    namespaceName="namespace-0001",
    name="sales-item-group-0001",
    description=nil,
    metadata=nil,
    salesItemNames={
        "salesItem-0001",
        "salesItem-0002"
    },
})

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

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

result = api_result.result
item = result.item;

```



---

### getSalesItemGroupMaster

Get Sales Item Group Master

Retrieves the specified Sales Item Group master including its member Sales Item names list.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| salesItemGroupName | string |  | ✓|  |  ~ 128 chars | Sales Item Group name<br>Unique Sales Item Group name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemGroupMaster](#salesitemgroupmaster) | Sales Item Group Master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetSalesItemGroupMaster(
    &showcase.GetSalesItemGroupMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SalesItemGroupName: pointy.String("sales-item-group-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetSalesItemGroupMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getSalesItemGroupMaster(
        (new GetSalesItemGroupMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSalesItemGroupName("sales-item-group-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetSalesItemGroupMasterRequest;
import io.gs2.showcase.result.GetSalesItemGroupMasterResult;

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

try {
    GetSalesItemGroupMasterResult result = client.getSalesItemGroupMaster(
        new GetSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemGroupName("sales-item-group-0001")
    );
    SalesItemGroupMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetSalesItemGroupMasterResult> asyncResult = null;
yield return client.GetSalesItemGroupMaster(
    new Gs2.Gs2Showcase.Request.GetSalesItemGroupMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSalesItemGroupName("sales-item-group-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getSalesItemGroupMaster(
        new Gs2Showcase.GetSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemGroupName("sales-item-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_sales_item_group_master(
        showcase.GetSalesItemGroupMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_sales_item_group_name('sales-item-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_sales_item_group_master({
    namespaceName="namespace-0001",
    salesItemGroupName="sales-item-group-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_sales_item_group_master_async({
    namespaceName="namespace-0001",
    salesItemGroupName="sales-item-group-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### updateSalesItemGroupMaster

Update Sales Item Group Master

Updates the specified sales item group master's description, metadata, and list of member sales item names.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| salesItemGroupName | string |  | ✓|  |  ~ 128 chars | Sales Item Group name<br>Unique Sales Item Group name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| salesItemNames | List&lt;string&gt; |  | ✓|  | 2 ~ 10 items | List of Sales Items included in the Sales Item Group<br>Ordered list of Sales Item names in this group. The system evaluates each item from first to last using GS2-Limit counters to determine purchase availability. The first purchasable item is displayed; if none qualify, the last item in the list is used as a fallback. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemGroupMaster](#salesitemgroupmaster) | Sales Item Group Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateSalesItemGroupMaster(
    &showcase.UpdateSalesItemGroupMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SalesItemGroupName: pointy.String("sales-item-group-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("SALES_ITEM_GROUP_0001"),
        SalesItemNames: []*string{
            pointy.String("salesItem-0001"),
            pointy.String("salesItem-0002"),
            pointy.String("salesItem-0003"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateSalesItemGroupMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateSalesItemGroupMaster(
        (new UpdateSalesItemGroupMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSalesItemGroupName("sales-item-group-0001")
            ->withDescription("description1")
            ->withMetadata("SALES_ITEM_GROUP_0001")
            ->withSalesItemNames([
                "salesItem-0001",
                "salesItem-0002",
                "salesItem-0003",
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateSalesItemGroupMasterRequest;
import io.gs2.showcase.result.UpdateSalesItemGroupMasterResult;

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

try {
    UpdateSalesItemGroupMasterResult result = client.updateSalesItemGroupMaster(
        new UpdateSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemGroupName("sales-item-group-0001")
            .withDescription("description1")
            .withMetadata("SALES_ITEM_GROUP_0001")
            .withSalesItemNames(Arrays.asList(
                "salesItem-0001",
                "salesItem-0002",
                "salesItem-0003"
            ))
    );
    SalesItemGroupMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateSalesItemGroupMasterResult> asyncResult = null;
yield return client.UpdateSalesItemGroupMaster(
    new Gs2.Gs2Showcase.Request.UpdateSalesItemGroupMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSalesItemGroupName("sales-item-group-0001")
        .WithDescription("description1")
        .WithMetadata("SALES_ITEM_GROUP_0001")
        .WithSalesItemNames(new string[] {
            "salesItem-0001",
            "salesItem-0002",
            "salesItem-0003",
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateSalesItemGroupMaster(
        new Gs2Showcase.UpdateSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemGroupName("sales-item-group-0001")
            .withDescription("description1")
            .withMetadata("SALES_ITEM_GROUP_0001")
            .withSalesItemNames([
                "salesItem-0001",
                "salesItem-0002",
                "salesItem-0003",
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_sales_item_group_master(
        showcase.UpdateSalesItemGroupMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_sales_item_group_name('sales-item-group-0001')
            .with_description('description1')
            .with_metadata('SALES_ITEM_GROUP_0001')
            .with_sales_item_names([
                'salesItem-0001',
                'salesItem-0002',
                'salesItem-0003',
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.update_sales_item_group_master({
    namespaceName="namespace-0001",
    salesItemGroupName="sales-item-group-0001",
    description="description1",
    metadata="SALES_ITEM_GROUP_0001",
    salesItemNames={
        "salesItem-0001",
        "salesItem-0002",
        "salesItem-0003"
    },
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.update_sales_item_group_master_async({
    namespaceName="namespace-0001",
    salesItemGroupName="sales-item-group-0001",
    description="description1",
    metadata="SALES_ITEM_GROUP_0001",
    salesItemNames={
        "salesItem-0001",
        "salesItem-0002",
        "salesItem-0003"
    },
})

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

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

result = api_result.result
item = result.item;

```



---

### deleteSalesItemGroupMaster

Delete Sales Item Group Master

Deletes the specified sales item group master. This only removes the master definition and does not affect the currently active showcase.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| salesItemGroupName | string |  | ✓|  |  ~ 128 chars | Sales Item Group name<br>Unique Sales Item Group name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [SalesItemGroupMaster](#salesitemgroupmaster) | Sales Item Group Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DeleteSalesItemGroupMaster(
    &showcase.DeleteSalesItemGroupMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        SalesItemGroupName: pointy.String("sales-item-group-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DeleteSalesItemGroupMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->deleteSalesItemGroupMaster(
        (new DeleteSalesItemGroupMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withSalesItemGroupName("sales-item-group-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DeleteSalesItemGroupMasterRequest;
import io.gs2.showcase.result.DeleteSalesItemGroupMasterResult;

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

try {
    DeleteSalesItemGroupMasterResult result = client.deleteSalesItemGroupMaster(
        new DeleteSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemGroupName("sales-item-group-0001")
    );
    SalesItemGroupMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DeleteSalesItemGroupMasterResult> asyncResult = null;
yield return client.DeleteSalesItemGroupMaster(
    new Gs2.Gs2Showcase.Request.DeleteSalesItemGroupMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithSalesItemGroupName("sales-item-group-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.deleteSalesItemGroupMaster(
        new Gs2Showcase.DeleteSalesItemGroupMasterRequest()
            .withNamespaceName("namespace-0001")
            .withSalesItemGroupName("sales-item-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.delete_sales_item_group_master(
        showcase.DeleteSalesItemGroupMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_sales_item_group_name('sales-item-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.delete_sales_item_group_master({
    namespaceName="namespace-0001",
    salesItemGroupName="sales-item-group-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.delete_sales_item_group_master_async({
    namespaceName="namespace-0001",
    salesItemGroupName="sales-item-group-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### describeShowcaseMasters

List Showcase Masters

Retrieves a paginated list of showcase masters. Can filter by name prefix. Showcase masters define the display items and sales period event for each showcase.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by showcase 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&lt;ShowcaseMaster&gt;](#showcasemaster) | List of Showcase Masters |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeShowcaseMasters(
    &showcase.DescribeShowcaseMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeShowcaseMastersRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeShowcaseMasters(
        (new DescribeShowcaseMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeShowcaseMastersRequest;
import io.gs2.showcase.result.DescribeShowcaseMastersResult;

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

try {
    DescribeShowcaseMastersResult result = client.describeShowcaseMasters(
        new DescribeShowcaseMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<ShowcaseMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeShowcaseMastersResult> asyncResult = null;
yield return client.DescribeShowcaseMasters(
    new Gs2.Gs2Showcase.Request.DescribeShowcaseMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeShowcaseMasters(
        new Gs2Showcase.DescribeShowcaseMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_showcase_masters(
        showcase.DescribeShowcaseMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_showcase_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_showcase_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

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

```



---

### createShowcaseMaster

Create Showcase Master

Creates a new showcase master with a name, display items, metadata, and an optional sales period event ID to control when the showcase is available to users.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| displayItems | [List&lt;DisplayItemMaster&gt;](#displayitemmaster) |  | ✓|  | 1 ~ 1000 items | List of Display Items<br>The list of items displayed on this showcase. Each display item can be either a single sales item or a sales item group. Items with an expired or inactive sales period event are automatically filtered out when the showcase is retrieved. |
| salesPeriodEventId | string |  | |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Showcase<br>Controls the overall sales period of this showcase. When specified, the entire showcase is only available during the associated GS2-Schedule event period. If the event is not active, the showcase returns empty. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [ShowcaseMaster](#showcasemaster) | Showcase Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CreateShowcaseMaster(
    &showcase.CreateShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("showcase-0001"),
        Description: nil,
        Metadata: nil,
        DisplayItems: []showcase.DisplayItemMaster{
            showcase.DisplayItemMaster{
                Type: pointy.String("salesItem"),
                SalesItemName: pointy.String("salesItem-0001"),
            },
            showcase.DisplayItemMaster{
                Type: pointy.String("salesItemGroup"),
                SalesItemGroupName: pointy.String("salesItemGroup-0001"),
                SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
            },
        },
        SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CreateShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->createShowcaseMaster(
        (new CreateShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("showcase-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withDisplayItems([
                (new \Gs2\Showcase\Model\DisplayItemMaster())
                    ->withType("salesItem")
                    ->withSalesItemName("salesItem-0001"),
                (new \Gs2\Showcase\Model\DisplayItemMaster())
                    ->withType("salesItemGroup")
                    ->withSalesItemGroupName("salesItemGroup-0001")
                    ->withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
            ])
            ->withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CreateShowcaseMasterRequest;
import io.gs2.showcase.result.CreateShowcaseMasterResult;

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

try {
    CreateShowcaseMasterResult result = client.createShowcaseMaster(
        new CreateShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("showcase-0001")
            .withDescription(null)
            .withMetadata(null)
            .withDisplayItems(Arrays.asList(
                new io.gs2.showcase.model.DisplayItemMaster()
                    .withType("salesItem")
                    .withSalesItemName("salesItem-0001"),
                new io.gs2.showcase.model.DisplayItemMaster()
                    .withType("salesItemGroup")
                    .withSalesItemGroupName("salesItemGroup-0001")
                    .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
            ))
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
    );
    ShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CreateShowcaseMasterResult> asyncResult = null;
yield return client.CreateShowcaseMaster(
    new Gs2.Gs2Showcase.Request.CreateShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("showcase-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithDisplayItems(new Gs2.Gs2Showcase.Model.DisplayItemMaster[] {
            new Gs2.Gs2Showcase.Model.DisplayItemMaster()
                .WithType("salesItem")
                .WithSalesItemName("salesItem-0001"),
            new Gs2.Gs2Showcase.Model.DisplayItemMaster()
                .WithType("salesItemGroup")
                .WithSalesItemGroupName("salesItemGroup-0001")
                .WithSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
        })
        .WithSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.createShowcaseMaster(
        new Gs2Showcase.CreateShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("showcase-0001")
            .withDescription(null)
            .withMetadata(null)
            .withDisplayItems([
                new Gs2Showcase.model.DisplayItemMaster()
                    .withType("salesItem")
                    .withSalesItemName("salesItem-0001"),
                new Gs2Showcase.model.DisplayItemMaster()
                    .withType("salesItemGroup")
                    .withSalesItemGroupName("salesItemGroup-0001")
                    .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
            ])
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.create_showcase_master(
        showcase.CreateShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('showcase-0001')
            .with_description(None)
            .with_metadata(None)
            .with_display_items([
                showcase.DisplayItemMaster()
                    .with_type('salesItem')
                    .with_sales_item_name('salesItem-0001'),
                showcase.DisplayItemMaster()
                    .with_type('salesItemGroup')
                    .with_sales_item_group_name('salesItemGroup-0001')
                    .with_sales_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001'),
            ])
            .with_sales_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.create_showcase_master({
    namespaceName="namespace-0001",
    name="showcase-0001",
    description=nil,
    metadata=nil,
    displayItems={
        {
            type="salesItem",
            salesItemName="salesItem-0001",
        },
        {
            type="salesItemGroup",
            salesItemGroupName="salesItemGroup-0001",
            salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
        }
    },
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.create_showcase_master_async({
    namespaceName="namespace-0001",
    name="showcase-0001",
    description=nil,
    metadata=nil,
    displayItems={
        {
            type="salesItem",
            salesItemName="salesItem-0001",
        },
        {
            type="salesItemGroup",
            salesItemGroupName="salesItemGroup-0001",
            salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
        }
    },
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### getShowcaseMaster

Get Showcase Master

Retrieves the specified showcase master including its display items, metadata, and sales period event configuration.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [ShowcaseMaster](#showcasemaster) | Showcase master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetShowcaseMaster(
    &showcase.GetShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getShowcaseMaster(
        (new GetShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetShowcaseMasterRequest;
import io.gs2.showcase.result.GetShowcaseMasterResult;

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

try {
    GetShowcaseMasterResult result = client.getShowcaseMaster(
        new GetShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    ShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetShowcaseMasterResult> asyncResult = null;
yield return client.GetShowcaseMaster(
    new Gs2.Gs2Showcase.Request.GetShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getShowcaseMaster(
        new Gs2Showcase.GetShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_showcase_master(
        showcase.GetShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_showcase_master({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_showcase_master_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### updateShowcaseMaster

Update Showcase Master

Updates the specified showcase master's description, metadata, display items, and sales period event configuration.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| displayItems | [List&lt;DisplayItemMaster&gt;](#displayitemmaster) |  | ✓|  | 1 ~ 1000 items | List of Display Items<br>The list of items displayed on this showcase. Each display item can be either a single sales item or a sales item group. Items with an expired or inactive sales period event are automatically filtered out when the showcase is retrieved. |
| salesPeriodEventId | string |  | |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Showcase<br>Controls the overall sales period of this showcase. When specified, the entire showcase is only available during the associated GS2-Schedule event period. If the event is not active, the showcase returns empty. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [ShowcaseMaster](#showcasemaster) | Showcase Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateShowcaseMaster(
    &showcase.UpdateShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("SHOWCASE_0001"),
        DisplayItems: []showcase.DisplayItemMaster{
            showcase.DisplayItemMaster{
                Type: pointy.String("salesItem"),
                SalesItemName: pointy.String("salesItem-0003"),
            },
            showcase.DisplayItemMaster{
                Type: pointy.String("salesItemGroup"),
                SalesItemGroupName: pointy.String("salesItemGroup-0001"),
                SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
            },
        },
        SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateShowcaseMaster(
        (new UpdateShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDescription("description1")
            ->withMetadata("SHOWCASE_0001")
            ->withDisplayItems([
                (new \Gs2\Showcase\Model\DisplayItemMaster())
                    ->withType("salesItem")
                    ->withSalesItemName("salesItem-0003"),
                (new \Gs2\Showcase\Model\DisplayItemMaster())
                    ->withType("salesItemGroup")
                    ->withSalesItemGroupName("salesItemGroup-0001")
                    ->withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
            ])
            ->withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateShowcaseMasterRequest;
import io.gs2.showcase.result.UpdateShowcaseMasterResult;

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

try {
    UpdateShowcaseMasterResult result = client.updateShowcaseMaster(
        new UpdateShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDescription("description1")
            .withMetadata("SHOWCASE_0001")
            .withDisplayItems(Arrays.asList(
                new io.gs2.showcase.model.DisplayItemMaster()
                    .withType("salesItem")
                    .withSalesItemName("salesItem-0003"),
                new io.gs2.showcase.model.DisplayItemMaster()
                    .withType("salesItemGroup")
                    .withSalesItemGroupName("salesItemGroup-0001")
                    .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
            ))
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    ShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateShowcaseMasterResult> asyncResult = null;
yield return client.UpdateShowcaseMaster(
    new Gs2.Gs2Showcase.Request.UpdateShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDescription("description1")
        .WithMetadata("SHOWCASE_0001")
        .WithDisplayItems(new Gs2.Gs2Showcase.Model.DisplayItemMaster[] {
            new Gs2.Gs2Showcase.Model.DisplayItemMaster()
                .WithType("salesItem")
                .WithSalesItemName("salesItem-0003"),
            new Gs2.Gs2Showcase.Model.DisplayItemMaster()
                .WithType("salesItemGroup")
                .WithSalesItemGroupName("salesItemGroup-0001")
                .WithSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
        })
        .WithSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateShowcaseMaster(
        new Gs2Showcase.UpdateShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDescription("description1")
            .withMetadata("SHOWCASE_0001")
            .withDisplayItems([
                new Gs2Showcase.model.DisplayItemMaster()
                    .withType("salesItem")
                    .withSalesItemName("salesItem-0003"),
                new Gs2Showcase.model.DisplayItemMaster()
                    .withType("salesItemGroup")
                    .withSalesItemGroupName("salesItemGroup-0001")
                    .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
            ])
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_showcase_master(
        showcase.UpdateShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_description('description1')
            .with_metadata('SHOWCASE_0001')
            .with_display_items([
                showcase.DisplayItemMaster()
                    .with_type('salesItem')
                    .with_sales_item_name('salesItem-0003'),
                showcase.DisplayItemMaster()
                    .with_type('salesItemGroup')
                    .with_sales_item_group_name('salesItemGroup-0001')
                    .with_sales_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001'),
            ])
            .with_sales_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.update_showcase_master({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    description="description1",
    metadata="SHOWCASE_0001",
    displayItems={
        {
            type="salesItem",
            salesItemName="salesItem-0003",
        },
        {
            type="salesItemGroup",
            salesItemGroupName="salesItemGroup-0001",
            salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
        }
    },
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.update_showcase_master_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    description="description1",
    metadata="SHOWCASE_0001",
    displayItems={
        {
            type="salesItem",
            salesItemName="salesItem-0003",
        },
        {
            type="salesItemGroup",
            salesItemGroupName="salesItemGroup-0001",
            salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
        }
    },
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002",
})

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

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

result = api_result.result
item = result.item;

```



---

### deleteShowcaseMaster

Delete Showcase Master

Deletes the specified showcase master. This only removes the master definition and does not affect the currently active showcase.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Showcase name<br>Unique Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [ShowcaseMaster](#showcasemaster) | Showcase Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DeleteShowcaseMaster(
    &showcase.DeleteShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DeleteShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->deleteShowcaseMaster(
        (new DeleteShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DeleteShowcaseMasterRequest;
import io.gs2.showcase.result.DeleteShowcaseMasterResult;

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

try {
    DeleteShowcaseMasterResult result = client.deleteShowcaseMaster(
        new DeleteShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    ShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DeleteShowcaseMasterResult> asyncResult = null;
yield return client.DeleteShowcaseMaster(
    new Gs2.Gs2Showcase.Request.DeleteShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.deleteShowcaseMaster(
        new Gs2Showcase.DeleteShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.delete_showcase_master(
        showcase.DeleteShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.delete_showcase_master({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.delete_showcase_master_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### describeRandomShowcaseMasters

List Random Showcase Masters

Retrieves a paginated list of random showcase masters. Can filter by name prefix. Random showcase masters define item pools, maximum display count, rotation timing, and sales period events.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by Random Showcase 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&lt;RandomShowcaseMaster&gt;](#randomshowcasemaster) | List of Random Showcase Masters |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DescribeRandomShowcaseMasters(
    &showcase.DescribeRandomShowcaseMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DescribeRandomShowcaseMastersRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->describeRandomShowcaseMasters(
        (new DescribeRandomShowcaseMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DescribeRandomShowcaseMastersRequest;
import io.gs2.showcase.result.DescribeRandomShowcaseMastersResult;

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

try {
    DescribeRandomShowcaseMastersResult result = client.describeRandomShowcaseMasters(
        new DescribeRandomShowcaseMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<RandomShowcaseMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DescribeRandomShowcaseMastersResult> asyncResult = null;
yield return client.DescribeRandomShowcaseMasters(
    new Gs2.Gs2Showcase.Request.DescribeRandomShowcaseMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.describeRandomShowcaseMasters(
        new Gs2Showcase.DescribeRandomShowcaseMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.describe_random_showcase_masters(
        showcase.DescribeRandomShowcaseMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.describe_random_showcase_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.describe_random_showcase_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

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

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

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

```



---

### createRandomShowcaseMaster

Create Random Showcase Master

Creates a new Random Showcase Master with the maximum number of items to display, a pool of Random Displayed Items, a base timestamp, reset interval in hours for item rotation, and an optional sales period event ID.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| maximumNumberOfChoice | int |  | ✓|  | 1 ~ 100 | Maximum number of display items to be selected<br>The number of display items randomly drawn from the display item pool each rotation period. Items are drawn without replacement using weighted random selection, so the same item will not appear twice in one rotation. |
| displayItems | [List&lt;RandomDisplayItemModel&gt;](#randomdisplayitemmodel) |  | ✓|  | 1 ~ 100 items | List of Random Displayed Items subject to selection<br>The pool of candidate display items from which items are randomly drawn. Each item has a weight that determines its relative selection probability and a stock count that limits how many times it can appear across rotations. |
| baseTimestamp | long |  | ✓|  |  | Base time for re-drawing the display items on display<br>The reference timestamp used to calculate rotation boundaries. display item re-draws occur at regular intervals (resetIntervalHours) starting from this base time. Must be set to a past timestamp. |
| resetIntervalHours | int |  | ✓|  | 1 ~ 168 | Interval (hours) between re-drawing the display items on display<br>The number of hours between each display item rotation. When the interval elapses (relative to baseTimestamp), the display items are re-drawn with a new random seed. Can be set from 1 to 168 hours (1 week). |
| salesPeriodEventId | string |  | |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Random Showcase<br>Controls the overall sales period of this random showcase. When specified, the showcase is only available during the associated GS2-Schedule event period. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomShowcaseMaster](#randomshowcasemaster) | Random Showcase Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.CreateRandomShowcaseMaster(
    &showcase.CreateRandomShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("showcase-0001"),
        Description: nil,
        Metadata: nil,
        MaximumNumberOfChoice: pointy.Int32(2),
        DisplayItems: []showcase.RandomDisplayItemModel{
            showcase.RandomDisplayItemModel{
                Name: pointy.String("display-item-0001"),
                ConsumeActions: []showcase.ConsumeAction{
                    showcase.ConsumeAction{
                        Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    },
                },
                AcquireActions: []showcase.AcquireAction{
                    showcase.AcquireAction{
                        Action: pointy.String("Gs2Inventory:AcquireItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    },
                },
                Stock: pointy.Int32(1),
                Weight: pointy.Int32(1),
            },
            showcase.RandomDisplayItemModel{
                Name: pointy.String("display-item-0002"),
                ConsumeActions: []showcase.ConsumeAction{
                    showcase.ConsumeAction{
                        Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    },
                },
                AcquireActions: []showcase.AcquireAction{
                    showcase.AcquireAction{
                        Action: pointy.String("Gs2Inventory:AcquireItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    },
                },
                Stock: pointy.Int32(2),
                Weight: pointy.Int32(2),
            },
            showcase.RandomDisplayItemModel{
                Name: pointy.String("display-item-0003"),
                ConsumeActions: []showcase.ConsumeAction{
                    showcase.ConsumeAction{
                        Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    },
                },
                AcquireActions: []showcase.AcquireAction{
                    showcase.AcquireAction{
                        Action: pointy.String("Gs2Inventory:AcquireItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    },
                },
                Stock: pointy.Int32(3),
                Weight: pointy.Int32(3),
            },
        },
        BaseTimestamp: pointy.Int64(1000),
        ResetIntervalHours: pointy.Int32(6),
        SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\CreateRandomShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->createRandomShowcaseMaster(
        (new CreateRandomShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("showcase-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withMaximumNumberOfChoice(2)
            ->withDisplayItems([
                (new \Gs2\Showcase\Model\RandomDisplayItemModel())
                    ->withName("display-item-0001")
                    ->withConsumeActions([
                        (new \Gs2\Showcase\Model\ConsumeAction())
                            ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    ->withAcquireActions([
                        (new \Gs2\Showcase\Model\AcquireAction())
                            ->withAction("Gs2Inventory:AcquireItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    ->withStock(1)
                    ->withWeight(1),
                (new \Gs2\Showcase\Model\RandomDisplayItemModel())
                    ->withName("display-item-0002")
                    ->withConsumeActions([
                        (new \Gs2\Showcase\Model\ConsumeAction())
                            ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    ->withAcquireActions([
                        (new \Gs2\Showcase\Model\AcquireAction())
                            ->withAction("Gs2Inventory:AcquireItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    ->withStock(2)
                    ->withWeight(2),
                (new \Gs2\Showcase\Model\RandomDisplayItemModel())
                    ->withName("display-item-0003")
                    ->withConsumeActions([
                        (new \Gs2\Showcase\Model\ConsumeAction())
                            ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    ->withAcquireActions([
                        (new \Gs2\Showcase\Model\AcquireAction())
                            ->withAction("Gs2Inventory:AcquireItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    ->withStock(3)
                    ->withWeight(3),
            ])
            ->withBaseTimestamp(1000)
            ->withResetIntervalHours(6)
            ->withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.CreateRandomShowcaseMasterRequest;
import io.gs2.showcase.result.CreateRandomShowcaseMasterResult;

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

try {
    CreateRandomShowcaseMasterResult result = client.createRandomShowcaseMaster(
        new CreateRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("showcase-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMaximumNumberOfChoice(2)
            .withDisplayItems(Arrays.asList(
                new io.gs2.showcase.model.RandomDisplayItemModel()
                    .withName("display-item-0001")
                    .withConsumeActions(Arrays.asList(
                        new io.gs2.showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
                    ))
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}")
                    ))
                    .withStock(1)
                    .withWeight(1),
                new io.gs2.showcase.model.RandomDisplayItemModel()
                    .withName("display-item-0002")
                    .withConsumeActions(Arrays.asList(
                        new io.gs2.showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
                    ))
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}")
                    ))
                    .withStock(2)
                    .withWeight(2),
                new io.gs2.showcase.model.RandomDisplayItemModel()
                    .withName("display-item-0003")
                    .withConsumeActions(Arrays.asList(
                        new io.gs2.showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
                    ))
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}")
                    ))
                    .withStock(3)
                    .withWeight(3)
            ))
            .withBaseTimestamp(1000L)
            .withResetIntervalHours(6)
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
    );
    RandomShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.CreateRandomShowcaseMasterResult> asyncResult = null;
yield return client.CreateRandomShowcaseMaster(
    new Gs2.Gs2Showcase.Request.CreateRandomShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("showcase-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithMaximumNumberOfChoice(2)
        .WithDisplayItems(new Gs2.Gs2Showcase.Model.RandomDisplayItemModel[] {
            new Gs2.Gs2Showcase.Model.RandomDisplayItemModel()
                .WithName("display-item-0001")
                .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
                    new Gs2.Core.Model.ConsumeAction()
                        .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                })
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Inventory:AcquireItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                })
                .WithStock(1)
                .WithWeight(1),
            new Gs2.Gs2Showcase.Model.RandomDisplayItemModel()
                .WithName("display-item-0002")
                .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
                    new Gs2.Core.Model.ConsumeAction()
                        .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                })
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Inventory:AcquireItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                })
                .WithStock(2)
                .WithWeight(2),
            new Gs2.Gs2Showcase.Model.RandomDisplayItemModel()
                .WithName("display-item-0003")
                .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
                    new Gs2.Core.Model.ConsumeAction()
                        .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                })
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Inventory:AcquireItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                })
                .WithStock(3)
                .WithWeight(3),
        })
        .WithBaseTimestamp(1000L)
        .WithResetIntervalHours(6)
        .WithSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.createRandomShowcaseMaster(
        new Gs2Showcase.CreateRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("showcase-0001")
            .withDescription(null)
            .withMetadata(null)
            .withMaximumNumberOfChoice(2)
            .withDisplayItems([
                new Gs2Showcase.model.RandomDisplayItemModel()
                    .withName("display-item-0001")
                    .withConsumeActions([
                        new Gs2Showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    .withAcquireActions([
                        new Gs2Showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    .withStock(1)
                    .withWeight(1),
                new Gs2Showcase.model.RandomDisplayItemModel()
                    .withName("display-item-0002")
                    .withConsumeActions([
                        new Gs2Showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    .withAcquireActions([
                        new Gs2Showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    .withStock(2)
                    .withWeight(2),
                new Gs2Showcase.model.RandomDisplayItemModel()
                    .withName("display-item-0003")
                    .withConsumeActions([
                        new Gs2Showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    .withAcquireActions([
                        new Gs2Showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    .withStock(3)
                    .withWeight(3),
            ])
            .withBaseTimestamp(1000)
            .withResetIntervalHours(6)
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.create_random_showcase_master(
        showcase.CreateRandomShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('showcase-0001')
            .with_description(None)
            .with_metadata(None)
            .with_maximum_number_of_choice(2)
            .with_display_items([
                showcase.RandomDisplayItemModel()
                    .with_name('display-item-0001')
                    .with_consume_actions([
                        showcase.ConsumeAction()
                            .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0001", "userId": "#{userId}", "consumeCount": 10}'),
                    ])
                    .with_acquire_actions([
                        showcase.AcquireAction()
                            .with_action('Gs2Inventory:AcquireItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0002", "userId": "#{userId}", "acquireCount": 1}'),
                    ])
                    .with_stock(1)
                    .with_weight(1),
                showcase.RandomDisplayItemModel()
                    .with_name('display-item-0002')
                    .with_consume_actions([
                        showcase.ConsumeAction()
                            .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0001", "userId": "#{userId}", "consumeCount": 10}'),
                    ])
                    .with_acquire_actions([
                        showcase.AcquireAction()
                            .with_action('Gs2Inventory:AcquireItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0002", "userId": "#{userId}", "acquireCount": 1}'),
                    ])
                    .with_stock(2)
                    .with_weight(2),
                showcase.RandomDisplayItemModel()
                    .with_name('display-item-0003')
                    .with_consume_actions([
                        showcase.ConsumeAction()
                            .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0001", "userId": "#{userId}", "consumeCount": 10}'),
                    ])
                    .with_acquire_actions([
                        showcase.AcquireAction()
                            .with_action('Gs2Inventory:AcquireItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0002", "userId": "#{userId}", "acquireCount": 1}'),
                    ])
                    .with_stock(3)
                    .with_weight(3),
            ])
            .with_base_timestamp(1000)
            .with_reset_interval_hours(6)
            .with_sales_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.create_random_showcase_master({
    namespaceName="namespace-0001",
    name="showcase-0001",
    description=nil,
    metadata=nil,
    maximumNumberOfChoice=2,
    displayItems={
        {
            name="display-item-0001",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=1,
            weight=1,
        },
        {
            name="display-item-0002",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=2,
            weight=2,
        },
        {
            name="display-item-0003",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=3,
            weight=3,
        }
    },
    baseTimestamp=1000,
    resetIntervalHours=6,
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.create_random_showcase_master_async({
    namespaceName="namespace-0001",
    name="showcase-0001",
    description=nil,
    metadata=nil,
    maximumNumberOfChoice=2,
    displayItems={
        {
            name="display-item-0001",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=1,
            weight=1,
        },
        {
            name="display-item-0002",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=2,
            weight=2,
        },
        {
            name="display-item-0003",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=3,
            weight=3,
        }
    },
    baseTimestamp=1000,
    resetIntervalHours=6,
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### getRandomShowcaseMaster

Get Random Showcase Master

Retrieves the specified random showcase master including its display item pool, maximum display count, rotation timing settings, and sales period event configuration.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomShowcaseMaster](#randomshowcasemaster) | Random Showcase Master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.GetRandomShowcaseMaster(
    &showcase.GetRandomShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\GetRandomShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->getRandomShowcaseMaster(
        (new GetRandomShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.GetRandomShowcaseMasterRequest;
import io.gs2.showcase.result.GetRandomShowcaseMasterResult;

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

try {
    GetRandomShowcaseMasterResult result = client.getRandomShowcaseMaster(
        new GetRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    RandomShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.GetRandomShowcaseMasterResult> asyncResult = null;
yield return client.GetRandomShowcaseMaster(
    new Gs2.Gs2Showcase.Request.GetRandomShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.getRandomShowcaseMaster(
        new Gs2Showcase.GetRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.get_random_showcase_master(
        showcase.GetRandomShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.get_random_showcase_master({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.get_random_showcase_master_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

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

result = api_result.result
item = result.item;

```



---

### updateRandomShowcaseMaster

Update Random Showcase Master

Updates the specified Random Showcase Master's description, metadata, Random Displayed Item pool, maximum display count, rotation timing, and sales period event.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| maximumNumberOfChoice | int |  | ✓|  | 1 ~ 100 | Maximum number of display items to be selected<br>The number of display items randomly drawn from the display item pool each rotation period. Items are drawn without replacement using weighted random selection, so the same item will not appear twice in one rotation. |
| displayItems | [List&lt;RandomDisplayItemModel&gt;](#randomdisplayitemmodel) |  | ✓|  | 1 ~ 100 items | List of Random Displayed Items subject to selection<br>The pool of candidate display items from which items are randomly drawn. Each item has a weight that determines its relative selection probability and a stock count that limits how many times it can appear across rotations. |
| baseTimestamp | long |  | ✓|  |  | Base time for re-drawing the display items on display<br>The reference timestamp used to calculate rotation boundaries. display item re-draws occur at regular intervals (resetIntervalHours) starting from this base time. Must be set to a past timestamp. |
| resetIntervalHours | int |  | ✓|  | 1 ~ 168 | Interval (hours) between re-drawing the display items on display<br>The number of hours between each display item rotation. When the interval elapses (relative to baseTimestamp), the display items are re-drawn with a new random seed. Can be set from 1 to 168 hours (1 week). |
| salesPeriodEventId | string |  | |  |  ~ 1024 chars | GRN of the GS2-Schedule event that defines the sales period for the Random Showcase<br>Controls the overall sales period of this random showcase. When specified, the showcase is only available during the associated GS2-Schedule event period. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomShowcaseMaster](#randomshowcasemaster) | Random Showcase Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.UpdateRandomShowcaseMaster(
    &showcase.UpdateRandomShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("SHOWCASE_0001"),
        MaximumNumberOfChoice: pointy.Int32(1),
        DisplayItems: []showcase.RandomDisplayItemModel{
            showcase.RandomDisplayItemModel{
                Name: pointy.String("display-item-1001"),
                ConsumeActions: []showcase.ConsumeAction{
                    showcase.ConsumeAction{
                        Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    },
                },
                AcquireActions: []showcase.AcquireAction{
                    showcase.AcquireAction{
                        Action: pointy.String("Gs2Inventory:AcquireItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    },
                },
                Stock: pointy.Int32(5),
                Weight: pointy.Int32(10),
            },
            showcase.RandomDisplayItemModel{
                Name: pointy.String("display-item-1002"),
                ConsumeActions: []showcase.ConsumeAction{
                    showcase.ConsumeAction{
                        Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    },
                },
                AcquireActions: []showcase.AcquireAction{
                    showcase.AcquireAction{
                        Action: pointy.String("Gs2Inventory:AcquireItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    },
                },
                Stock: pointy.Int32(10),
                Weight: pointy.Int32(20),
            },
            showcase.RandomDisplayItemModel{
                Name: pointy.String("display-item-1003"),
                ConsumeActions: []showcase.ConsumeAction{
                    showcase.ConsumeAction{
                        Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    },
                },
                AcquireActions: []showcase.AcquireAction{
                    showcase.AcquireAction{
                        Action: pointy.String("Gs2Inventory:AcquireItemSetByUserId"),
                        Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    },
                },
                Stock: pointy.Int32(15),
                Weight: pointy.Int32(30),
            },
        },
        BaseTimestamp: pointy.Int64(2000),
        ResetIntervalHours: pointy.Int32(12),
        SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\UpdateRandomShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->updateRandomShowcaseMaster(
        (new UpdateRandomShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
            ->withDescription("description1")
            ->withMetadata("SHOWCASE_0001")
            ->withMaximumNumberOfChoice(1)
            ->withDisplayItems([
                (new \Gs2\Showcase\Model\RandomDisplayItemModel())
                    ->withName("display-item-1001")
                    ->withConsumeActions([
                        (new \Gs2\Showcase\Model\ConsumeAction())
                            ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    ->withAcquireActions([
                        (new \Gs2\Showcase\Model\AcquireAction())
                            ->withAction("Gs2Inventory:AcquireItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    ->withStock(5)
                    ->withWeight(10),
                (new \Gs2\Showcase\Model\RandomDisplayItemModel())
                    ->withName("display-item-1002")
                    ->withConsumeActions([
                        (new \Gs2\Showcase\Model\ConsumeAction())
                            ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    ->withAcquireActions([
                        (new \Gs2\Showcase\Model\AcquireAction())
                            ->withAction("Gs2Inventory:AcquireItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    ->withStock(10)
                    ->withWeight(20),
                (new \Gs2\Showcase\Model\RandomDisplayItemModel())
                    ->withName("display-item-1003")
                    ->withConsumeActions([
                        (new \Gs2\Showcase\Model\ConsumeAction())
                            ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    ->withAcquireActions([
                        (new \Gs2\Showcase\Model\AcquireAction())
                            ->withAction("Gs2Inventory:AcquireItemSetByUserId")
                            ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    ->withStock(15)
                    ->withWeight(30),
            ])
            ->withBaseTimestamp(2000)
            ->withResetIntervalHours(12)
            ->withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.UpdateRandomShowcaseMasterRequest;
import io.gs2.showcase.result.UpdateRandomShowcaseMasterResult;

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

try {
    UpdateRandomShowcaseMasterResult result = client.updateRandomShowcaseMaster(
        new UpdateRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDescription("description1")
            .withMetadata("SHOWCASE_0001")
            .withMaximumNumberOfChoice(1)
            .withDisplayItems(Arrays.asList(
                new io.gs2.showcase.model.RandomDisplayItemModel()
                    .withName("display-item-1001")
                    .withConsumeActions(Arrays.asList(
                        new io.gs2.showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
                    ))
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}")
                    ))
                    .withStock(5)
                    .withWeight(10),
                new io.gs2.showcase.model.RandomDisplayItemModel()
                    .withName("display-item-1002")
                    .withConsumeActions(Arrays.asList(
                        new io.gs2.showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
                    ))
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}")
                    ))
                    .withStock(10)
                    .withWeight(20),
                new io.gs2.showcase.model.RandomDisplayItemModel()
                    .withName("display-item-1003")
                    .withConsumeActions(Arrays.asList(
                        new io.gs2.showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
                    ))
                    .withAcquireActions(Arrays.asList(
                        new io.gs2.showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}")
                    ))
                    .withStock(15)
                    .withWeight(30)
            ))
            .withBaseTimestamp(2000L)
            .withResetIntervalHours(12)
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    RandomShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.UpdateRandomShowcaseMasterResult> asyncResult = null;
yield return client.UpdateRandomShowcaseMaster(
    new Gs2.Gs2Showcase.Request.UpdateRandomShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001")
        .WithDescription("description1")
        .WithMetadata("SHOWCASE_0001")
        .WithMaximumNumberOfChoice(1)
        .WithDisplayItems(new Gs2.Gs2Showcase.Model.RandomDisplayItemModel[] {
            new Gs2.Gs2Showcase.Model.RandomDisplayItemModel()
                .WithName("display-item-1001")
                .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
                    new Gs2.Core.Model.ConsumeAction()
                        .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                })
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Inventory:AcquireItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                })
                .WithStock(5)
                .WithWeight(10),
            new Gs2.Gs2Showcase.Model.RandomDisplayItemModel()
                .WithName("display-item-1002")
                .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
                    new Gs2.Core.Model.ConsumeAction()
                        .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                })
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Inventory:AcquireItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                })
                .WithStock(10)
                .WithWeight(20),
            new Gs2.Gs2Showcase.Model.RandomDisplayItemModel()
                .WithName("display-item-1003")
                .WithConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
                    new Gs2.Core.Model.ConsumeAction()
                        .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                })
                .WithAcquireActions(new Gs2.Core.Model.AcquireAction[] {
                    new Gs2.Core.Model.AcquireAction()
                        .WithAction("Gs2Inventory:AcquireItemSetByUserId")
                        .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                })
                .WithStock(15)
                .WithWeight(30),
        })
        .WithBaseTimestamp(2000L)
        .WithResetIntervalHours(12)
        .WithSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.updateRandomShowcaseMaster(
        new Gs2Showcase.UpdateRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
            .withDescription("description1")
            .withMetadata("SHOWCASE_0001")
            .withMaximumNumberOfChoice(1)
            .withDisplayItems([
                new Gs2Showcase.model.RandomDisplayItemModel()
                    .withName("display-item-1001")
                    .withConsumeActions([
                        new Gs2Showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    .withAcquireActions([
                        new Gs2Showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    .withStock(5)
                    .withWeight(10),
                new Gs2Showcase.model.RandomDisplayItemModel()
                    .withName("display-item-1002")
                    .withConsumeActions([
                        new Gs2Showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    .withAcquireActions([
                        new Gs2Showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    .withStock(10)
                    .withWeight(20),
                new Gs2Showcase.model.RandomDisplayItemModel()
                    .withName("display-item-1003")
                    .withConsumeActions([
                        new Gs2Showcase.model.ConsumeAction()
                            .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
                    ])
                    .withAcquireActions([
                        new Gs2Showcase.model.AcquireAction()
                            .withAction("Gs2Inventory:AcquireItemSetByUserId")
                            .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}"),
                    ])
                    .withStock(15)
                    .withWeight(30),
            ])
            .withBaseTimestamp(2000)
            .withResetIntervalHours(12)
            .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.update_random_showcase_master(
        showcase.UpdateRandomShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
            .with_description('description1')
            .with_metadata('SHOWCASE_0001')
            .with_maximum_number_of_choice(1)
            .with_display_items([
                showcase.RandomDisplayItemModel()
                    .with_name('display-item-1001')
                    .with_consume_actions([
                        showcase.ConsumeAction()
                            .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0001", "userId": "#{userId}", "consumeCount": 10}'),
                    ])
                    .with_acquire_actions([
                        showcase.AcquireAction()
                            .with_action('Gs2Inventory:AcquireItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0002", "userId": "#{userId}", "acquireCount": 1}'),
                    ])
                    .with_stock(5)
                    .with_weight(10),
                showcase.RandomDisplayItemModel()
                    .with_name('display-item-1002')
                    .with_consume_actions([
                        showcase.ConsumeAction()
                            .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0001", "userId": "#{userId}", "consumeCount": 10}'),
                    ])
                    .with_acquire_actions([
                        showcase.AcquireAction()
                            .with_action('Gs2Inventory:AcquireItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0002", "userId": "#{userId}", "acquireCount": 1}'),
                    ])
                    .with_stock(10)
                    .with_weight(20),
                showcase.RandomDisplayItemModel()
                    .with_name('display-item-1003')
                    .with_consume_actions([
                        showcase.ConsumeAction()
                            .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0001", "userId": "#{userId}", "consumeCount": 10}'),
                    ])
                    .with_acquire_actions([
                        showcase.AcquireAction()
                            .with_action('Gs2Inventory:AcquireItemSetByUserId')
                            .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "item-0002", "userId": "#{userId}", "acquireCount": 1}'),
                    ])
                    .with_stock(15)
                    .with_weight(30),
            ])
            .with_base_timestamp(2000)
            .with_reset_interval_hours(12)
            .with_sales_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.update_random_showcase_master({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    description="description1",
    metadata="SHOWCASE_0001",
    maximumNumberOfChoice=1,
    displayItems={
        {
            name="display-item-1001",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=5,
            weight=10,
        },
        {
            name="display-item-1002",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=10,
            weight=20,
        },
        {
            name="display-item-1003",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=15,
            weight=30,
        }
    },
    baseTimestamp=2000,
    resetIntervalHours=12,
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.update_random_showcase_master_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
    description="description1",
    metadata="SHOWCASE_0001",
    maximumNumberOfChoice=1,
    displayItems={
        {
            name="display-item-1001",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=5,
            weight=10,
        },
        {
            name="display-item-1002",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=10,
            weight=20,
        },
        {
            name="display-item-1003",
            consumeActions={
                {
                    action="Gs2Inventory:ConsumeItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0001\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
                }
            },
            acquireActions={
                {
                    action="Gs2Inventory:AcquireItemSetByUserId",
                    request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"item-0002\", \"userId\": \"#{userId}\", \"acquireCount\": 1}",
                }
            },
            stock=15,
            weight=30,
        }
    },
    baseTimestamp=2000,
    resetIntervalHours=12,
    salesPeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0002",
})

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

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

result = api_result.result
item = result.item;

```



---

### deleteRandomShowcaseMaster

Delete Random Showcase Master

Deletes the specified Random Showcase Master. This only removes the master definition and does not affect the currently active Random Showcase.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| showcaseName | string |  | ✓|  |  ~ 128 chars | Random Showcase name<br>Unique Random Showcase name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [RandomShowcaseMaster](#randomshowcasemaster) | Random Showcase Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/showcase"
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 := showcase.Gs2ShowcaseRestClient{
    Session: &session,
}
result, err := client.DeleteRandomShowcaseMaster(
    &showcase.DeleteRandomShowcaseMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        ShowcaseName: pointy.String("showcase-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Showcase\Gs2ShowcaseRestClient;
use Gs2\Showcase\Request\DeleteRandomShowcaseMasterRequest;

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

$session->open();

$client = new Gs2ShowcaseRestClient(
    $session
);

try {
    $result = $client->deleteRandomShowcaseMaster(
        (new DeleteRandomShowcaseMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withShowcaseName("showcase-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.showcase.rest.Gs2ShowcaseRestClient;
import io.gs2.showcase.request.DeleteRandomShowcaseMasterRequest;
import io.gs2.showcase.result.DeleteRandomShowcaseMasterResult;

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

try {
    DeleteRandomShowcaseMasterResult result = client.deleteRandomShowcaseMaster(
        new DeleteRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    RandomShowcaseMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2ShowcaseRestClient(session);

AsyncResult<Gs2.Gs2Showcase.Result.DeleteRandomShowcaseMasterResult> asyncResult = null;
yield return client.DeleteRandomShowcaseMaster(
    new Gs2.Gs2Showcase.Request.DeleteRandomShowcaseMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithShowcaseName("showcase-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Showcase from '@/gs2/showcase';

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

try {
    const result = await client.deleteRandomShowcaseMaster(
        new Gs2Showcase.DeleteRandomShowcaseMasterRequest()
            .withNamespaceName("namespace-0001")
            .withShowcaseName("showcase-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import showcase

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

try:
    result = client.delete_random_showcase_master(
        showcase.DeleteRandomShowcaseMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_showcase_name('showcase-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('showcase')

api_result = client.delete_random_showcase_master({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('showcase')

api_result_handler = client.delete_random_showcase_master_async({
    namespaceName="namespace-0001",
    showcaseName="showcase-0001",
})

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

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

result = api_result.result
item = result.item;

```



---



