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

# GS2-Money2 マスターデータリファレンス

マスターデータのフォーマットと インポートする各種モデルのリファレンス




## マスターデータのフォーマット


**JSON**
```json
{
  "version": "2024-06-20",
  "storeContentModels": [
    {
      "name": "[string]ストアコンテンツモデル名",
      "metadata": "[string?]メタデータ",
      "appleAppStore": {
        "productId": "[string?]プロダクトID"
      },
      "googlePlay": {
        "productId": "[string?]プロダクトID"
      }
    }
  ],
  "storeSubscriptionContentModels": [
    {
      "name": "[string]ストア定期課金コンテンツモデル名",
      "metadata": "[string?]メタデータ",
      "scheduleNamespaceId": "[string]サブスクリプション期間を連動させる GS2-Schedule のネームスペースGRN",
      "triggerName": "[string]サブスクリプション期間を反映するトリガー名",
      "triggerExtendMode": "[string (enum)]サブスクリプション期間をトリガーに反映する時のモード",
      "rollupHour": "[int]日跨ぎの時刻 (UTC)",
      "reallocateSpanDays": "[int]サブスクリプションの契約情報を他のユーザーに割り当て可能となる期間（日）",
      "appleAppStore": {
        "subscriptionGroupIdentifier": "[string?]サブスクリプショングループID"
      },
      "googlePlay": {
        "productId": "[string?]プロダクトID"
      }
    }
  ]
}
```


|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| version | string | | ✓ | 2024-06-20 | | マスターデータのフォーマットバージョン |
| storeContentModels | [List&lt;StoreContentModel&gt;](#storecontentmodel) |  |  |  |  ~ 1000 items | ストアコンテンツモデル<br>各種ストアプラットフォームのコンテンツを格納するモデルです。 |
| storeSubscriptionContentModels | [List&lt;StoreSubscriptionContentModel&gt;](#storesubscriptioncontentmodel) |  |  |  |  ~ 1000 items | ストア定期課金コンテンツモデル<br>各種ストアプラットフォームの定期課金コンテンツを格納するモデルです。 |

## モデル

### StoreContentModel

ストアコンテンツモデル<br>

各種ストアプラットフォームのコンテンツを格納するモデルです。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| storeContentModelId | string |  | ※ |  |  ~ 1024文字 | ストアコンテンツモデルGRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | ストアコンテンツモデル名 |
| metadata | string |  |  |  |  ~ 1024文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| appleAppStore | [AppleAppStoreContent](#appleappstorecontent) |  |  |  |  | Apple App Store のコンテンツ<br>このストアコンテンツの Apple App Store 商品情報（プロダクトID）です。レシート検証時に購入された商品との照合に使用されます。 |
| googlePlay | [GooglePlayContent](#googleplaycontent) |  |  |  |  | Google Play のコンテンツ<br>このストアコンテンツの Google Play 商品情報（プロダクトID）です。レシート検証時に購入された商品との照合に使用されます。 |

---

### AppleAppStoreContent

Apple App Store のコンテンツ<br>

アプリ内課金商品に対応する Apple App Store のプロダクトIDを含みます。レシート検証時の照合に使用されます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| productId | string |  |  |  |  ~ 1024文字 | プロダクトID<br>このアプリ内課金アイテムについて App Store Connect に登録されている Apple App Store のプロダクト識別子です。 |

---

### GooglePlayContent

Google Play のコンテンツ<br>

アプリ内課金商品に対応する Google Play のプロダクトIDを含みます。レシート検証時の照合に使用されます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| productId | string |  |  |  |  ~ 1024文字 | プロダクトID<br>このアプリ内課金アイテムについて Google Play Console に登録されている Google Play のプロダクト識別子です。 |

---

### StoreSubscriptionContentModel

ストア定期課金コンテンツモデル<br>

各種ストアプラットフォームの定期課金コンテンツを格納するモデルです。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| storeSubscriptionContentModelId | string |  | ※ |  |  ~ 1024文字 | 期間課金コンテンツモデルGRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | ストア定期課金コンテンツモデル名 |
| metadata | string |  |  |  |  ~ 1024文字 | メタデータ |
| scheduleNamespaceId | string |  | ✓ |  |  ~ 1024文字 | サブスクリプション期間を連動させる GS2-Schedule のネームスペースGRN |
| triggerName | string |  | ✓ |  |  ~ 128文字 | サブスクリプション期間を反映するトリガー名<br>サブスクリプションの有効期間を反映するために起動される GS2-Schedule のトリガー名です。トリガーの持続時間はサブスクリプションの有効期限に設定されます。 |
| triggerExtendMode | 文字列列挙型<br>enum {<br>&nbsp;&nbsp;"just",<br>&nbsp;&nbsp;"rollupHour"<br>}<br> |  |  | "just" |  | サブスクリプション期間をトリガーに反映する時のモード<br>サブスクリプションの有効期限をトリガーの持続時間にどのようにマッピングするかを制御します。"just" はサブスクリプション期間をそのまま使用します。"rollupHour" は指定した時刻（UTC）まで延長し、日中の期限切れを回避します。"just": そのままサブスクリプション期間を反映 / "rollupHour": 次の日跨ぎ時刻まで延長してサブスクリプション期間を反映 /  |
| rollupHour | int | {triggerExtendMode} == "rollupHour" |  | 0 | 0 ~ 23 | 日跨ぎの時刻 (UTC)<br>triggerExtendMode が "rollupHour" の場合、サブスクリプション期間は有効期限日のこの時刻（0〜23、UTC）まで延長されます。ユーザーのプレイセッション中にサブスクリプションが期限切れになるのを防ぎます。<br>※ triggerExtendMode が "rollupHour" であれば 有効 |
| reallocateSpanDays | int |  |  | 30 | 0 ~ 365 | サブスクリプションの契約情報を他のユーザーに割り当て可能となる期間（日）<br>最後の割り当てから、サブスクリプション契約を別のユーザーに再割り当てできるようになるまでの日数です。ユーザーがアカウントを変更する際の不正利用を防止するため、サブスクリプションの移行に待機期間を設けます。 |
| appleAppStore | [AppleAppStoreSubscriptionContent](#appleappstoresubscriptioncontent) |  |  |  |  | Apple App Store のコンテンツ<br>このサブスクリプションコンテンツの Apple App Store のサブスクリプション情報（サブスクリプショングループID）です。 |
| googlePlay | [GooglePlaySubscriptionContent](#googleplaysubscriptioncontent) |  |  |  |  | Google Play のコンテンツ<br>このサブスクリプションコンテンツの Google Play のサブスクリプション情報（プロダクトID）です。 |

---

### AppleAppStoreSubscriptionContent

Apple App Store の期間課金コンテンツ<br>

サブスクリプションベースの商品の Apple App Store サブスクリプショングループ識別子を含みます。自動更新サブスクリプションの管理と検証に使用されます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| subscriptionGroupIdentifier | string |  |  |  |  ~ 64文字 | サブスクリプショングループID<br>App Store Connect に登録されたサブスクリプショングループ識別子です。同じグループ内のサブスクリプションは相互排他的で、ユーザーは同時に1つしか契約できません。 |

---

### GooglePlaySubscriptionContent

Google Play の期間課金コンテンツ<br>

サブスクリプションベースの商品の Google Play プロダクトIDを含みます。Google Play での自動更新サブスクリプションの管理と検証に使用されます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| productId | string |  |  |  |  ~ 1024文字 | プロダクトID |

---



