gs2 1.4.56 → 1.4.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/money2/model/AppleAppStoreSubscriptionContent.d.ts +13 -0
  2. package/money2/model/AppleAppStoreSubscriptionContent.js +48 -0
  3. package/money2/model/AppleAppStoreSubscriptionContent.js.map +1 -0
  4. package/money2/model/AppleAppStoreSubscriptionContent.ts +48 -0
  5. package/money2/model/GooglePlaySubscriptionContent.d.ts +13 -0
  6. package/money2/model/GooglePlaySubscriptionContent.js +48 -0
  7. package/money2/model/GooglePlaySubscriptionContent.js.map +1 -0
  8. package/money2/model/GooglePlaySubscriptionContent.ts +48 -0
  9. package/money2/model/Namespace.d.ts +20 -0
  10. package/money2/model/Namespace.js +72 -2
  11. package/money2/model/Namespace.js.map +1 -1
  12. package/money2/model/Namespace.ts +71 -0
  13. package/money2/model/NotificationSetting.d.ts +21 -0
  14. package/money2/model/NotificationSetting.js +76 -0
  15. package/money2/model/NotificationSetting.js.map +1 -0
  16. package/money2/model/NotificationSetting.ts +76 -0
  17. package/money2/model/StoreSubscriptionContentModel.d.ts +48 -0
  18. package/money2/model/StoreSubscriptionContentModel.js +216 -0
  19. package/money2/model/StoreSubscriptionContentModel.js.map +1 -0
  20. package/money2/model/StoreSubscriptionContentModel.ts +230 -0
  21. package/money2/model/StoreSubscriptionContentModelMaster.d.ts +64 -0
  22. package/money2/model/StoreSubscriptionContentModelMaster.js +272 -0
  23. package/money2/model/StoreSubscriptionContentModelMaster.js.map +1 -0
  24. package/money2/model/StoreSubscriptionContentModelMaster.ts +286 -0
  25. package/money2/model/SubscribeTransaction.d.ts +10 -5
  26. package/money2/model/SubscribeTransaction.js +50 -16
  27. package/money2/model/SubscribeTransaction.js.map +1 -1
  28. package/money2/model/SubscribeTransaction.ts +52 -15
  29. package/money2/model/SubscriptionStatus.d.ts +32 -0
  30. package/money2/model/SubscriptionStatus.js +119 -0
  31. package/money2/model/SubscriptionStatus.js.map +1 -0
  32. package/money2/model/SubscriptionStatus.ts +123 -0
  33. package/money2/model/index.d.ts +7 -1
  34. package/money2/model/index.js +13 -1
  35. package/money2/model/index.js.map +1 -1
  36. package/money2/model/index.ts +12 -0
  37. package/money2/request/AllocateSubscriptionStatusByUserIdRequest.d.ts +38 -0
  38. package/money2/request/AllocateSubscriptionStatusByUserIdRequest.js +126 -0
  39. package/money2/request/AllocateSubscriptionStatusByUserIdRequest.js.map +1 -0
  40. package/money2/request/AllocateSubscriptionStatusByUserIdRequest.ts +133 -0
  41. package/money2/request/AllocateSubscriptionStatusRequest.d.ts +34 -0
  42. package/money2/request/AllocateSubscriptionStatusRequest.js +112 -0
  43. package/money2/request/AllocateSubscriptionStatusRequest.js.map +1 -0
  44. package/money2/request/AllocateSubscriptionStatusRequest.ts +119 -0
  45. package/money2/request/CreateNamespaceRequest.d.ts +20 -0
  46. package/money2/request/CreateNamespaceRequest.js +72 -2
  47. package/money2/request/CreateNamespaceRequest.js.map +1 -1
  48. package/money2/request/CreateNamespaceRequest.ts +70 -0
  49. package/money2/request/CreateStoreSubscriptionContentModelMasterRequest.d.ts +54 -0
  50. package/money2/request/CreateStoreSubscriptionContentModelMasterRequest.js +184 -0
  51. package/money2/request/CreateStoreSubscriptionContentModelMasterRequest.js.map +1 -0
  52. package/money2/request/CreateStoreSubscriptionContentModelMasterRequest.ts +188 -0
  53. package/money2/request/DeleteStoreSubscriptionContentModelMasterRequest.d.ts +25 -0
  54. package/money2/request/DeleteStoreSubscriptionContentModelMasterRequest.js +83 -0
  55. package/money2/request/DeleteStoreSubscriptionContentModelMasterRequest.js.map +1 -0
  56. package/money2/request/DeleteStoreSubscriptionContentModelMasterRequest.ts +90 -0
  57. package/money2/request/DescribeStoreSubscriptionContentModelMastersRequest.d.ts +29 -0
  58. package/money2/request/DescribeStoreSubscriptionContentModelMastersRequest.js +97 -0
  59. package/money2/request/DescribeStoreSubscriptionContentModelMastersRequest.js.map +1 -0
  60. package/money2/request/DescribeStoreSubscriptionContentModelMastersRequest.ts +104 -0
  61. package/money2/request/DescribeStoreSubscriptionContentModelsRequest.d.ts +21 -0
  62. package/money2/request/DescribeStoreSubscriptionContentModelsRequest.js +69 -0
  63. package/money2/request/DescribeStoreSubscriptionContentModelsRequest.js.map +1 -0
  64. package/money2/request/DescribeStoreSubscriptionContentModelsRequest.ts +76 -0
  65. package/money2/request/DescribeSubscriptionStatusesByUserIdRequest.d.ts +29 -0
  66. package/money2/request/DescribeSubscriptionStatusesByUserIdRequest.js +97 -0
  67. package/money2/request/DescribeSubscriptionStatusesByUserIdRequest.js.map +1 -0
  68. package/money2/request/DescribeSubscriptionStatusesByUserIdRequest.ts +104 -0
  69. package/money2/request/DescribeSubscriptionStatusesRequest.d.ts +25 -0
  70. package/money2/request/DescribeSubscriptionStatusesRequest.js +83 -0
  71. package/money2/request/DescribeSubscriptionStatusesRequest.js.map +1 -0
  72. package/money2/request/DescribeSubscriptionStatusesRequest.ts +90 -0
  73. package/money2/request/GetStoreSubscriptionContentModelMasterRequest.d.ts +25 -0
  74. package/money2/request/GetStoreSubscriptionContentModelMasterRequest.js +83 -0
  75. package/money2/request/GetStoreSubscriptionContentModelMasterRequest.js.map +1 -0
  76. package/money2/request/GetStoreSubscriptionContentModelMasterRequest.ts +90 -0
  77. package/money2/request/GetStoreSubscriptionContentModelRequest.d.ts +25 -0
  78. package/money2/request/GetStoreSubscriptionContentModelRequest.js +83 -0
  79. package/money2/request/GetStoreSubscriptionContentModelRequest.js.map +1 -0
  80. package/money2/request/GetStoreSubscriptionContentModelRequest.ts +90 -0
  81. package/money2/request/GetSubscriptionStatusByUserIdRequest.d.ts +33 -0
  82. package/money2/request/GetSubscriptionStatusByUserIdRequest.js +111 -0
  83. package/money2/request/GetSubscriptionStatusByUserIdRequest.js.map +1 -0
  84. package/money2/request/GetSubscriptionStatusByUserIdRequest.ts +118 -0
  85. package/money2/request/GetSubscriptionStatusRequest.d.ts +29 -0
  86. package/money2/request/GetSubscriptionStatusRequest.js +97 -0
  87. package/money2/request/GetSubscriptionStatusRequest.js.map +1 -0
  88. package/money2/request/GetSubscriptionStatusRequest.ts +104 -0
  89. package/money2/request/TakeoverSubscriptionStatusByUserIdRequest.d.ts +38 -0
  90. package/money2/request/TakeoverSubscriptionStatusByUserIdRequest.js +126 -0
  91. package/money2/request/TakeoverSubscriptionStatusByUserIdRequest.js.map +1 -0
  92. package/money2/request/TakeoverSubscriptionStatusByUserIdRequest.ts +133 -0
  93. package/money2/request/TakeoverSubscriptionStatusRequest.d.ts +34 -0
  94. package/money2/request/TakeoverSubscriptionStatusRequest.js +112 -0
  95. package/money2/request/TakeoverSubscriptionStatusRequest.js.map +1 -0
  96. package/money2/request/TakeoverSubscriptionStatusRequest.ts +119 -0
  97. package/money2/request/UpdateNamespaceRequest.d.ts +20 -0
  98. package/money2/request/UpdateNamespaceRequest.js +72 -2
  99. package/money2/request/UpdateNamespaceRequest.js.map +1 -1
  100. package/money2/request/UpdateNamespaceRequest.ts +70 -0
  101. package/money2/request/UpdateStoreSubscriptionContentModelMasterRequest.d.ts +54 -0
  102. package/money2/request/UpdateStoreSubscriptionContentModelMasterRequest.js +184 -0
  103. package/money2/request/UpdateStoreSubscriptionContentModelMasterRequest.js.map +1 -0
  104. package/money2/request/UpdateStoreSubscriptionContentModelMasterRequest.ts +188 -0
  105. package/money2/request/index.d.ts +16 -1
  106. package/money2/request/index.js +32 -1
  107. package/money2/request/index.js.map +1 -1
  108. package/money2/request/index.ts +30 -0
  109. package/money2/rest.d.ts +15 -0
  110. package/money2/rest.js +435 -4
  111. package/money2/rest.js.map +1 -1
  112. package/money2/rest.ts +491 -0
  113. package/money2/result/AllocateSubscriptionStatusByUserIdResult.d.ts +14 -0
  114. package/money2/result/AllocateSubscriptionStatusByUserIdResult.js +48 -0
  115. package/money2/result/AllocateSubscriptionStatusByUserIdResult.js.map +1 -0
  116. package/money2/result/AllocateSubscriptionStatusByUserIdResult.ts +47 -0
  117. package/money2/result/AllocateSubscriptionStatusResult.d.ts +14 -0
  118. package/money2/result/AllocateSubscriptionStatusResult.js +48 -0
  119. package/money2/result/AllocateSubscriptionStatusResult.js.map +1 -0
  120. package/money2/result/AllocateSubscriptionStatusResult.ts +47 -0
  121. package/money2/result/CreateStoreSubscriptionContentModelMasterResult.d.ts +14 -0
  122. package/money2/result/CreateStoreSubscriptionContentModelMasterResult.js +48 -0
  123. package/money2/result/CreateStoreSubscriptionContentModelMasterResult.js.map +1 -0
  124. package/money2/result/CreateStoreSubscriptionContentModelMasterResult.ts +47 -0
  125. package/money2/result/DeleteStoreSubscriptionContentModelMasterResult.d.ts +14 -0
  126. package/money2/result/DeleteStoreSubscriptionContentModelMasterResult.js +48 -0
  127. package/money2/result/DeleteStoreSubscriptionContentModelMasterResult.js.map +1 -0
  128. package/money2/result/DeleteStoreSubscriptionContentModelMasterResult.ts +47 -0
  129. package/money2/result/DescribeStoreSubscriptionContentModelMastersResult.d.ts +18 -0
  130. package/money2/result/DescribeStoreSubscriptionContentModelMastersResult.js +67 -0
  131. package/money2/result/DescribeStoreSubscriptionContentModelMastersResult.js.map +1 -0
  132. package/money2/result/DescribeStoreSubscriptionContentModelMastersResult.ts +72 -0
  133. package/money2/result/DescribeStoreSubscriptionContentModelsResult.d.ts +14 -0
  134. package/money2/result/DescribeStoreSubscriptionContentModelsResult.js +53 -0
  135. package/money2/result/DescribeStoreSubscriptionContentModelsResult.js.map +1 -0
  136. package/money2/result/DescribeStoreSubscriptionContentModelsResult.ts +55 -0
  137. package/money2/result/DescribeSubscriptionStatusesByUserIdResult.d.ts +14 -0
  138. package/money2/result/DescribeSubscriptionStatusesByUserIdResult.js +53 -0
  139. package/money2/result/DescribeSubscriptionStatusesByUserIdResult.js.map +1 -0
  140. package/money2/result/DescribeSubscriptionStatusesByUserIdResult.ts +55 -0
  141. package/money2/result/DescribeSubscriptionStatusesResult.d.ts +14 -0
  142. package/money2/result/DescribeSubscriptionStatusesResult.js +53 -0
  143. package/money2/result/DescribeSubscriptionStatusesResult.js.map +1 -0
  144. package/money2/result/DescribeSubscriptionStatusesResult.ts +55 -0
  145. package/money2/result/GetStoreSubscriptionContentModelMasterResult.d.ts +14 -0
  146. package/money2/result/GetStoreSubscriptionContentModelMasterResult.js +48 -0
  147. package/money2/result/GetStoreSubscriptionContentModelMasterResult.js.map +1 -0
  148. package/money2/result/GetStoreSubscriptionContentModelMasterResult.ts +47 -0
  149. package/money2/result/GetStoreSubscriptionContentModelResult.d.ts +14 -0
  150. package/money2/result/GetStoreSubscriptionContentModelResult.js +48 -0
  151. package/money2/result/GetStoreSubscriptionContentModelResult.js.map +1 -0
  152. package/money2/result/GetStoreSubscriptionContentModelResult.ts +47 -0
  153. package/money2/result/GetSubscriptionStatusByUserIdResult.d.ts +14 -0
  154. package/money2/result/GetSubscriptionStatusByUserIdResult.js +48 -0
  155. package/money2/result/GetSubscriptionStatusByUserIdResult.js.map +1 -0
  156. package/money2/result/GetSubscriptionStatusByUserIdResult.ts +47 -0
  157. package/money2/result/GetSubscriptionStatusResult.d.ts +14 -0
  158. package/money2/result/GetSubscriptionStatusResult.js +48 -0
  159. package/money2/result/GetSubscriptionStatusResult.js.map +1 -0
  160. package/money2/result/GetSubscriptionStatusResult.ts +47 -0
  161. package/money2/result/TakeoverSubscriptionStatusByUserIdResult.d.ts +14 -0
  162. package/money2/result/TakeoverSubscriptionStatusByUserIdResult.js +48 -0
  163. package/money2/result/TakeoverSubscriptionStatusByUserIdResult.js.map +1 -0
  164. package/money2/result/TakeoverSubscriptionStatusByUserIdResult.ts +47 -0
  165. package/money2/result/TakeoverSubscriptionStatusResult.d.ts +14 -0
  166. package/money2/result/TakeoverSubscriptionStatusResult.js +48 -0
  167. package/money2/result/TakeoverSubscriptionStatusResult.js.map +1 -0
  168. package/money2/result/TakeoverSubscriptionStatusResult.ts +47 -0
  169. package/money2/result/UpdateStoreSubscriptionContentModelMasterResult.d.ts +14 -0
  170. package/money2/result/UpdateStoreSubscriptionContentModelMasterResult.js +48 -0
  171. package/money2/result/UpdateStoreSubscriptionContentModelMasterResult.js.map +1 -0
  172. package/money2/result/UpdateStoreSubscriptionContentModelMasterResult.ts +47 -0
  173. package/money2/result/index.d.ts +16 -1
  174. package/money2/result/index.js +32 -1
  175. package/money2/result/index.js.map +1 -1
  176. package/money2/result/index.ts +30 -0
  177. package/package.json +1 -1
@@ -0,0 +1,272 @@
1
+ "use strict";
2
+ /*
3
+ Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
4
+ Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License").
7
+ You may not use this file except in compliance with the License.
8
+ A copy of the License is located at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ or in the "license" file accompanying this file. This file is distributed
13
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
+ express or implied. See the License for the specific language governing
15
+ permissions and limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ var tslib_1 = require("tslib");
19
+ var Gs2Money2 = tslib_1.__importStar(require("../../money2/model"));
20
+ var grnFormat = "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:master:subscription:content:{contentName}";
21
+ var StoreSubscriptionContentModelMaster = /** @class */ (function () {
22
+ function StoreSubscriptionContentModelMaster() {
23
+ this.storeSubscriptionContentModelId = null;
24
+ this.name = null;
25
+ this.description = null;
26
+ this.metadata = null;
27
+ this.scheduleNamespaceId = null;
28
+ this.triggerName = null;
29
+ this.reallocateSpanDays = null;
30
+ this.appleAppStore = null;
31
+ this.googlePlay = null;
32
+ this.createdAt = null;
33
+ this.updatedAt = null;
34
+ this.revision = null;
35
+ }
36
+ StoreSubscriptionContentModelMaster.getRegion = function (grn) {
37
+ var match = grn.match(grnFormat
38
+ .replace('{region}', '(.*)')
39
+ .replace('{ownerId}', '.*')
40
+ .replace('{namespaceName}', '.*')
41
+ .replace('{contentName}', '.*'));
42
+ if (match) {
43
+ return match[1];
44
+ }
45
+ return null;
46
+ };
47
+ StoreSubscriptionContentModelMaster.getOwnerId = function (grn) {
48
+ var match = grn.match(grnFormat
49
+ .replace('{region}', '.*')
50
+ .replace('{ownerId}', '(.*)')
51
+ .replace('{namespaceName}', '.*')
52
+ .replace('{contentName}', '.*'));
53
+ if (match) {
54
+ return match[1];
55
+ }
56
+ return null;
57
+ };
58
+ StoreSubscriptionContentModelMaster.getNamespaceName = function (grn) {
59
+ var match = grn.match(grnFormat
60
+ .replace('{region}', '.*')
61
+ .replace('{ownerId}', '.*')
62
+ .replace('{namespaceName}', '(.*)')
63
+ .replace('{contentName}', '.*'));
64
+ if (match) {
65
+ return match[1];
66
+ }
67
+ return null;
68
+ };
69
+ StoreSubscriptionContentModelMaster.getContentName = function (grn) {
70
+ var match = grn.match(grnFormat
71
+ .replace('{region}', '.*')
72
+ .replace('{ownerId}', '.*')
73
+ .replace('{namespaceName}', '.*')
74
+ .replace('{contentName}', '(.*)'));
75
+ if (match) {
76
+ return match[1];
77
+ }
78
+ return null;
79
+ };
80
+ StoreSubscriptionContentModelMaster.isValid = function (grn) {
81
+ if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
82
+ return false;
83
+ }
84
+ if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
85
+ return false;
86
+ }
87
+ if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
88
+ return false;
89
+ }
90
+ if (this.getContentName(grn) == null || this.getContentName(grn) === '') {
91
+ return false;
92
+ }
93
+ return true;
94
+ };
95
+ StoreSubscriptionContentModelMaster.createGrn = function (region, ownerId, namespaceName, contentName) {
96
+ return grnFormat
97
+ .replace('{region}', region !== null && region !== void 0 ? region : '')
98
+ .replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
99
+ .replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
100
+ .replace('{contentName}', contentName !== null && contentName !== void 0 ? contentName : '');
101
+ };
102
+ StoreSubscriptionContentModelMaster.prototype.getStoreSubscriptionContentModelId = function () {
103
+ return this.storeSubscriptionContentModelId;
104
+ };
105
+ StoreSubscriptionContentModelMaster.prototype.setStoreSubscriptionContentModelId = function (storeSubscriptionContentModelId) {
106
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
107
+ return this;
108
+ };
109
+ StoreSubscriptionContentModelMaster.prototype.withStoreSubscriptionContentModelId = function (storeSubscriptionContentModelId) {
110
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
111
+ return this;
112
+ };
113
+ StoreSubscriptionContentModelMaster.prototype.getName = function () {
114
+ return this.name;
115
+ };
116
+ StoreSubscriptionContentModelMaster.prototype.setName = function (name) {
117
+ this.name = name;
118
+ return this;
119
+ };
120
+ StoreSubscriptionContentModelMaster.prototype.withName = function (name) {
121
+ this.name = name;
122
+ return this;
123
+ };
124
+ StoreSubscriptionContentModelMaster.prototype.getDescription = function () {
125
+ return this.description;
126
+ };
127
+ StoreSubscriptionContentModelMaster.prototype.setDescription = function (description) {
128
+ this.description = description;
129
+ return this;
130
+ };
131
+ StoreSubscriptionContentModelMaster.prototype.withDescription = function (description) {
132
+ this.description = description;
133
+ return this;
134
+ };
135
+ StoreSubscriptionContentModelMaster.prototype.getMetadata = function () {
136
+ return this.metadata;
137
+ };
138
+ StoreSubscriptionContentModelMaster.prototype.setMetadata = function (metadata) {
139
+ this.metadata = metadata;
140
+ return this;
141
+ };
142
+ StoreSubscriptionContentModelMaster.prototype.withMetadata = function (metadata) {
143
+ this.metadata = metadata;
144
+ return this;
145
+ };
146
+ StoreSubscriptionContentModelMaster.prototype.getScheduleNamespaceId = function () {
147
+ return this.scheduleNamespaceId;
148
+ };
149
+ StoreSubscriptionContentModelMaster.prototype.setScheduleNamespaceId = function (scheduleNamespaceId) {
150
+ this.scheduleNamespaceId = scheduleNamespaceId;
151
+ return this;
152
+ };
153
+ StoreSubscriptionContentModelMaster.prototype.withScheduleNamespaceId = function (scheduleNamespaceId) {
154
+ this.scheduleNamespaceId = scheduleNamespaceId;
155
+ return this;
156
+ };
157
+ StoreSubscriptionContentModelMaster.prototype.getTriggerName = function () {
158
+ return this.triggerName;
159
+ };
160
+ StoreSubscriptionContentModelMaster.prototype.setTriggerName = function (triggerName) {
161
+ this.triggerName = triggerName;
162
+ return this;
163
+ };
164
+ StoreSubscriptionContentModelMaster.prototype.withTriggerName = function (triggerName) {
165
+ this.triggerName = triggerName;
166
+ return this;
167
+ };
168
+ StoreSubscriptionContentModelMaster.prototype.getReallocateSpanDays = function () {
169
+ return this.reallocateSpanDays;
170
+ };
171
+ StoreSubscriptionContentModelMaster.prototype.setReallocateSpanDays = function (reallocateSpanDays) {
172
+ this.reallocateSpanDays = reallocateSpanDays;
173
+ return this;
174
+ };
175
+ StoreSubscriptionContentModelMaster.prototype.withReallocateSpanDays = function (reallocateSpanDays) {
176
+ this.reallocateSpanDays = reallocateSpanDays;
177
+ return this;
178
+ };
179
+ StoreSubscriptionContentModelMaster.prototype.getAppleAppStore = function () {
180
+ return this.appleAppStore;
181
+ };
182
+ StoreSubscriptionContentModelMaster.prototype.setAppleAppStore = function (appleAppStore) {
183
+ this.appleAppStore = appleAppStore;
184
+ return this;
185
+ };
186
+ StoreSubscriptionContentModelMaster.prototype.withAppleAppStore = function (appleAppStore) {
187
+ this.appleAppStore = appleAppStore;
188
+ return this;
189
+ };
190
+ StoreSubscriptionContentModelMaster.prototype.getGooglePlay = function () {
191
+ return this.googlePlay;
192
+ };
193
+ StoreSubscriptionContentModelMaster.prototype.setGooglePlay = function (googlePlay) {
194
+ this.googlePlay = googlePlay;
195
+ return this;
196
+ };
197
+ StoreSubscriptionContentModelMaster.prototype.withGooglePlay = function (googlePlay) {
198
+ this.googlePlay = googlePlay;
199
+ return this;
200
+ };
201
+ StoreSubscriptionContentModelMaster.prototype.getCreatedAt = function () {
202
+ return this.createdAt;
203
+ };
204
+ StoreSubscriptionContentModelMaster.prototype.setCreatedAt = function (createdAt) {
205
+ this.createdAt = createdAt;
206
+ return this;
207
+ };
208
+ StoreSubscriptionContentModelMaster.prototype.withCreatedAt = function (createdAt) {
209
+ this.createdAt = createdAt;
210
+ return this;
211
+ };
212
+ StoreSubscriptionContentModelMaster.prototype.getUpdatedAt = function () {
213
+ return this.updatedAt;
214
+ };
215
+ StoreSubscriptionContentModelMaster.prototype.setUpdatedAt = function (updatedAt) {
216
+ this.updatedAt = updatedAt;
217
+ return this;
218
+ };
219
+ StoreSubscriptionContentModelMaster.prototype.withUpdatedAt = function (updatedAt) {
220
+ this.updatedAt = updatedAt;
221
+ return this;
222
+ };
223
+ StoreSubscriptionContentModelMaster.prototype.getRevision = function () {
224
+ return this.revision;
225
+ };
226
+ StoreSubscriptionContentModelMaster.prototype.setRevision = function (revision) {
227
+ this.revision = revision;
228
+ return this;
229
+ };
230
+ StoreSubscriptionContentModelMaster.prototype.withRevision = function (revision) {
231
+ this.revision = revision;
232
+ return this;
233
+ };
234
+ StoreSubscriptionContentModelMaster.fromDict = function (data) {
235
+ if (data == undefined || data == null) {
236
+ return null;
237
+ }
238
+ return new StoreSubscriptionContentModelMaster()
239
+ .withStoreSubscriptionContentModelId(data["storeSubscriptionContentModelId"])
240
+ .withName(data["name"])
241
+ .withDescription(data["description"])
242
+ .withMetadata(data["metadata"])
243
+ .withScheduleNamespaceId(data["scheduleNamespaceId"])
244
+ .withTriggerName(data["triggerName"])
245
+ .withReallocateSpanDays(data["reallocateSpanDays"])
246
+ .withAppleAppStore(Gs2Money2.AppleAppStoreSubscriptionContent.fromDict(data["appleAppStore"]))
247
+ .withGooglePlay(Gs2Money2.GooglePlaySubscriptionContent.fromDict(data["googlePlay"]))
248
+ .withCreatedAt(data["createdAt"])
249
+ .withUpdatedAt(data["updatedAt"])
250
+ .withRevision(data["revision"]);
251
+ };
252
+ StoreSubscriptionContentModelMaster.prototype.toDict = function () {
253
+ var _a, _b;
254
+ return {
255
+ "storeSubscriptionContentModelId": this.getStoreSubscriptionContentModelId(),
256
+ "name": this.getName(),
257
+ "description": this.getDescription(),
258
+ "metadata": this.getMetadata(),
259
+ "scheduleNamespaceId": this.getScheduleNamespaceId(),
260
+ "triggerName": this.getTriggerName(),
261
+ "reallocateSpanDays": this.getReallocateSpanDays(),
262
+ "appleAppStore": (_a = this.getAppleAppStore()) === null || _a === void 0 ? void 0 : _a.toDict(),
263
+ "googlePlay": (_b = this.getGooglePlay()) === null || _b === void 0 ? void 0 : _b.toDict(),
264
+ "createdAt": this.getCreatedAt(),
265
+ "updatedAt": this.getUpdatedAt(),
266
+ "revision": this.getRevision(),
267
+ };
268
+ };
269
+ return StoreSubscriptionContentModelMaster;
270
+ }());
271
+ exports.default = StoreSubscriptionContentModelMaster;
272
+ //# sourceMappingURL=StoreSubscriptionContentModelMaster.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreSubscriptionContentModelMaster.js","sourceRoot":"","sources":["StoreSubscriptionContentModelMaster.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,oEAA+C;AAG/C,IAAM,SAAS,GAAW,6FAA6F,CAAC;AAExH;IAAA;QACY,oCAA+B,GAAgB,IAAI,CAAC;QACpD,SAAI,GAAgB,IAAI,CAAC;QACzB,gBAAW,GAAgB,IAAI,CAAC;QAChC,aAAQ,GAAgB,IAAI,CAAC;QAC7B,wBAAmB,GAAgB,IAAI,CAAC;QACxC,gBAAW,GAAgB,IAAI,CAAC;QAChC,uBAAkB,GAAgB,IAAI,CAAC;QACvC,kBAAa,GAAoD,IAAI,CAAC;QACtE,eAAU,GAAiD,IAAI,CAAC;QAChE,cAAS,GAAgB,IAAI,CAAC;QAC9B,cAAS,GAAgB,IAAI,CAAC;QAC9B,aAAQ,GAAgB,IAAI,CAAC;IA0PzC,CAAC;IAxPiB,6CAAS,GAAvB,UAAwB,GAAW;QAC/B,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC;aAC3B,OAAO,CAAC,WAAW,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AAI,CAAC,YAAY,EAAE;YAChC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;YAChC,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;SACjC,CAAC;IACN,CAAC;IACL,0CAAC;AAAD,CAAC,AAtQD,IAsQC"}
@@ -0,0 +1,286 @@
1
+ /*
2
+ Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights
3
+ Reserved.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License").
6
+ You may not use this file except in compliance with the License.
7
+ A copy of the License is located at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ or in the "license" file accompanying this file. This file is distributed
12
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13
+ express or implied. See the License for the specific language governing
14
+ permissions and limitations under the License.
15
+ */
16
+
17
+ import IModel from '../../core/interface/IModel';
18
+
19
+ import * as Gs2Money2 from '../../money2/model'
20
+ import AppleAppStoreSubscriptionContent from './AppleAppStoreSubscriptionContent';
21
+ import GooglePlaySubscriptionContent from './GooglePlaySubscriptionContent';
22
+ const grnFormat: string = "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:master:subscription:content:{contentName}";
23
+
24
+ export default class StoreSubscriptionContentModelMaster implements IModel {
25
+ private storeSubscriptionContentModelId: string|null = null;
26
+ private name: string|null = null;
27
+ private description: string|null = null;
28
+ private metadata: string|null = null;
29
+ private scheduleNamespaceId: string|null = null;
30
+ private triggerName: string|null = null;
31
+ private reallocateSpanDays: number|null = null;
32
+ private appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent|null = null;
33
+ private googlePlay: Gs2Money2.GooglePlaySubscriptionContent|null = null;
34
+ private createdAt: number|null = null;
35
+ private updatedAt: number|null = null;
36
+ private revision: number|null = null;
37
+
38
+ public static getRegion(grn: string): string|null {
39
+ const match = grn.match(grnFormat
40
+ .replace('{region}', '(.*)')
41
+ .replace('{ownerId}', '.*')
42
+ .replace('{namespaceName}', '.*')
43
+ .replace('{contentName}', '.*')
44
+ );
45
+ if (match) {
46
+ return match[1];
47
+ }
48
+ return null;
49
+ }
50
+
51
+ public static getOwnerId(grn: string): string|null {
52
+ const match = grn.match(grnFormat
53
+ .replace('{region}', '.*')
54
+ .replace('{ownerId}', '(.*)')
55
+ .replace('{namespaceName}', '.*')
56
+ .replace('{contentName}', '.*')
57
+ );
58
+ if (match) {
59
+ return match[1];
60
+ }
61
+ return null;
62
+ }
63
+
64
+ public static getNamespaceName(grn: string): string|null {
65
+ const match = grn.match(grnFormat
66
+ .replace('{region}', '.*')
67
+ .replace('{ownerId}', '.*')
68
+ .replace('{namespaceName}', '(.*)')
69
+ .replace('{contentName}', '.*')
70
+ );
71
+ if (match) {
72
+ return match[1];
73
+ }
74
+ return null;
75
+ }
76
+
77
+ public static getContentName(grn: string): string|null {
78
+ const match = grn.match(grnFormat
79
+ .replace('{region}', '.*')
80
+ .replace('{ownerId}', '.*')
81
+ .replace('{namespaceName}', '.*')
82
+ .replace('{contentName}', '(.*)')
83
+ );
84
+ if (match) {
85
+ return match[1];
86
+ }
87
+ return null;
88
+ }
89
+
90
+ public static isValid(grn: string): boolean {
91
+ if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
92
+ return false;
93
+ }
94
+ if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
95
+ return false;
96
+ }
97
+ if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
98
+ return false;
99
+ }
100
+ if (this.getContentName(grn) == null || this.getContentName(grn) === '') {
101
+ return false;
102
+ }
103
+ return true;
104
+ }
105
+
106
+ public static createGrn(
107
+ region: string|null,
108
+ ownerId: string|null,
109
+ namespaceName: string|null,
110
+ contentName: string|null,
111
+ ): string|null {
112
+ return grnFormat
113
+ .replace('{region}', region ?? '')
114
+ .replace('{ownerId}', ownerId ?? '')
115
+ .replace('{namespaceName}', namespaceName ?? '')
116
+ .replace('{contentName}', contentName ?? '');
117
+ }
118
+ public getStoreSubscriptionContentModelId(): string|null {
119
+ return this.storeSubscriptionContentModelId;
120
+ }
121
+ public setStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string|null) {
122
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
123
+ return this;
124
+ }
125
+ public withStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string|null): this {
126
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
127
+ return this;
128
+ }
129
+ public getName(): string|null {
130
+ return this.name;
131
+ }
132
+ public setName(name: string|null) {
133
+ this.name = name;
134
+ return this;
135
+ }
136
+ public withName(name: string|null): this {
137
+ this.name = name;
138
+ return this;
139
+ }
140
+ public getDescription(): string|null {
141
+ return this.description;
142
+ }
143
+ public setDescription(description: string|null) {
144
+ this.description = description;
145
+ return this;
146
+ }
147
+ public withDescription(description: string|null): this {
148
+ this.description = description;
149
+ return this;
150
+ }
151
+ public getMetadata(): string|null {
152
+ return this.metadata;
153
+ }
154
+ public setMetadata(metadata: string|null) {
155
+ this.metadata = metadata;
156
+ return this;
157
+ }
158
+ public withMetadata(metadata: string|null): this {
159
+ this.metadata = metadata;
160
+ return this;
161
+ }
162
+ public getScheduleNamespaceId(): string|null {
163
+ return this.scheduleNamespaceId;
164
+ }
165
+ public setScheduleNamespaceId(scheduleNamespaceId: string|null) {
166
+ this.scheduleNamespaceId = scheduleNamespaceId;
167
+ return this;
168
+ }
169
+ public withScheduleNamespaceId(scheduleNamespaceId: string|null): this {
170
+ this.scheduleNamespaceId = scheduleNamespaceId;
171
+ return this;
172
+ }
173
+ public getTriggerName(): string|null {
174
+ return this.triggerName;
175
+ }
176
+ public setTriggerName(triggerName: string|null) {
177
+ this.triggerName = triggerName;
178
+ return this;
179
+ }
180
+ public withTriggerName(triggerName: string|null): this {
181
+ this.triggerName = triggerName;
182
+ return this;
183
+ }
184
+ public getReallocateSpanDays(): number|null {
185
+ return this.reallocateSpanDays;
186
+ }
187
+ public setReallocateSpanDays(reallocateSpanDays: number|null) {
188
+ this.reallocateSpanDays = reallocateSpanDays;
189
+ return this;
190
+ }
191
+ public withReallocateSpanDays(reallocateSpanDays: number|null): this {
192
+ this.reallocateSpanDays = reallocateSpanDays;
193
+ return this;
194
+ }
195
+ public getAppleAppStore(): Gs2Money2.AppleAppStoreSubscriptionContent|null {
196
+ return this.appleAppStore;
197
+ }
198
+ public setAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent|null) {
199
+ this.appleAppStore = appleAppStore;
200
+ return this;
201
+ }
202
+ public withAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent|null): this {
203
+ this.appleAppStore = appleAppStore;
204
+ return this;
205
+ }
206
+ public getGooglePlay(): Gs2Money2.GooglePlaySubscriptionContent|null {
207
+ return this.googlePlay;
208
+ }
209
+ public setGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent|null) {
210
+ this.googlePlay = googlePlay;
211
+ return this;
212
+ }
213
+ public withGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent|null): this {
214
+ this.googlePlay = googlePlay;
215
+ return this;
216
+ }
217
+ public getCreatedAt(): number|null {
218
+ return this.createdAt;
219
+ }
220
+ public setCreatedAt(createdAt: number|null) {
221
+ this.createdAt = createdAt;
222
+ return this;
223
+ }
224
+ public withCreatedAt(createdAt: number|null): this {
225
+ this.createdAt = createdAt;
226
+ return this;
227
+ }
228
+ public getUpdatedAt(): number|null {
229
+ return this.updatedAt;
230
+ }
231
+ public setUpdatedAt(updatedAt: number|null) {
232
+ this.updatedAt = updatedAt;
233
+ return this;
234
+ }
235
+ public withUpdatedAt(updatedAt: number|null): this {
236
+ this.updatedAt = updatedAt;
237
+ return this;
238
+ }
239
+ public getRevision(): number|null {
240
+ return this.revision;
241
+ }
242
+ public setRevision(revision: number|null) {
243
+ this.revision = revision;
244
+ return this;
245
+ }
246
+ public withRevision(revision: number|null): this {
247
+ this.revision = revision;
248
+ return this;
249
+ }
250
+
251
+ public static fromDict(data: {[key: string]: any}): StoreSubscriptionContentModelMaster|null {
252
+ if (data == undefined || data == null) {
253
+ return null;
254
+ }
255
+ return new StoreSubscriptionContentModelMaster()
256
+ .withStoreSubscriptionContentModelId(data["storeSubscriptionContentModelId"])
257
+ .withName(data["name"])
258
+ .withDescription(data["description"])
259
+ .withMetadata(data["metadata"])
260
+ .withScheduleNamespaceId(data["scheduleNamespaceId"])
261
+ .withTriggerName(data["triggerName"])
262
+ .withReallocateSpanDays(data["reallocateSpanDays"])
263
+ .withAppleAppStore(Gs2Money2.AppleAppStoreSubscriptionContent.fromDict(data["appleAppStore"]))
264
+ .withGooglePlay(Gs2Money2.GooglePlaySubscriptionContent.fromDict(data["googlePlay"]))
265
+ .withCreatedAt(data["createdAt"])
266
+ .withUpdatedAt(data["updatedAt"])
267
+ .withRevision(data["revision"]);
268
+ }
269
+
270
+ public toDict(): {[key: string]: any} {
271
+ return {
272
+ "storeSubscriptionContentModelId": this.getStoreSubscriptionContentModelId(),
273
+ "name": this.getName(),
274
+ "description": this.getDescription(),
275
+ "metadata": this.getMetadata(),
276
+ "scheduleNamespaceId": this.getScheduleNamespaceId(),
277
+ "triggerName": this.getTriggerName(),
278
+ "reallocateSpanDays": this.getReallocateSpanDays(),
279
+ "appleAppStore": this.getAppleAppStore()?.toDict(),
280
+ "googlePlay": this.getGooglePlay()?.toDict(),
281
+ "createdAt": this.getCreatedAt(),
282
+ "updatedAt": this.getUpdatedAt(),
283
+ "revision": this.getRevision(),
284
+ };
285
+ }
286
+ }
@@ -1,24 +1,29 @@
1
1
  import IModel from '../../core/interface/IModel';
2
2
  export default class SubscribeTransaction implements IModel {
3
3
  private subscribeTransactionId;
4
+ private contentName;
4
5
  private transactionId;
5
6
  private store;
6
7
  private userId;
7
- private status;
8
8
  private statusDetail;
9
9
  private expiresAt;
10
+ private lastAllocatedAt;
10
11
  private createdAt;
11
12
  private updatedAt;
12
13
  private revision;
13
14
  static getRegion(grn: string): string | null;
14
15
  static getOwnerId(grn: string): string | null;
15
16
  static getNamespaceName(grn: string): string | null;
17
+ static getContentName(grn: string): string | null;
16
18
  static getTransactionId(grn: string): string | null;
17
19
  static isValid(grn: string): boolean;
18
- static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, transactionId: string | null): string | null;
20
+ static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, contentName: string | null, transactionId: string | null): string | null;
19
21
  getSubscribeTransactionId(): string | null;
20
22
  setSubscribeTransactionId(subscribeTransactionId: string | null): this;
21
23
  withSubscribeTransactionId(subscribeTransactionId: string | null): this;
24
+ getContentName(): string | null;
25
+ setContentName(contentName: string | null): this;
26
+ withContentName(contentName: string | null): this;
22
27
  getTransactionId(): string | null;
23
28
  setTransactionId(transactionId: string | null): this;
24
29
  withTransactionId(transactionId: string | null): this;
@@ -28,15 +33,15 @@ export default class SubscribeTransaction implements IModel {
28
33
  getUserId(): string | null;
29
34
  setUserId(userId: string | null): this;
30
35
  withUserId(userId: string | null): this;
31
- getStatus(): string | null;
32
- setStatus(status: string | null): this;
33
- withStatus(status: string | null): this;
34
36
  getStatusDetail(): string | null;
35
37
  setStatusDetail(statusDetail: string | null): this;
36
38
  withStatusDetail(statusDetail: string | null): this;
37
39
  getExpiresAt(): number | null;
38
40
  setExpiresAt(expiresAt: number | null): this;
39
41
  withExpiresAt(expiresAt: number | null): this;
42
+ getLastAllocatedAt(): number | null;
43
+ setLastAllocatedAt(lastAllocatedAt: number | null): this;
44
+ withLastAllocatedAt(lastAllocatedAt: number | null): this;
40
45
  getCreatedAt(): number | null;
41
46
  setCreatedAt(createdAt: number | null): this;
42
47
  withCreatedAt(createdAt: number | null): this;