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,76 @@
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
+
21
+ export default class NotificationSetting implements IModel {
22
+ private gatewayNamespaceId: string|null = null;
23
+ private enableTransferMobileNotification: boolean|null = null;
24
+ private sound: string|null = null;
25
+ public getGatewayNamespaceId(): string|null {
26
+ return this.gatewayNamespaceId;
27
+ }
28
+ public setGatewayNamespaceId(gatewayNamespaceId: string|null) {
29
+ this.gatewayNamespaceId = gatewayNamespaceId;
30
+ return this;
31
+ }
32
+ public withGatewayNamespaceId(gatewayNamespaceId: string|null): this {
33
+ this.gatewayNamespaceId = gatewayNamespaceId;
34
+ return this;
35
+ }
36
+ public getEnableTransferMobileNotification(): boolean|null {
37
+ return this.enableTransferMobileNotification;
38
+ }
39
+ public setEnableTransferMobileNotification(enableTransferMobileNotification: boolean|null) {
40
+ this.enableTransferMobileNotification = enableTransferMobileNotification;
41
+ return this;
42
+ }
43
+ public withEnableTransferMobileNotification(enableTransferMobileNotification: boolean|null): this {
44
+ this.enableTransferMobileNotification = enableTransferMobileNotification;
45
+ return this;
46
+ }
47
+ public getSound(): string|null {
48
+ return this.sound;
49
+ }
50
+ public setSound(sound: string|null) {
51
+ this.sound = sound;
52
+ return this;
53
+ }
54
+ public withSound(sound: string|null): this {
55
+ this.sound = sound;
56
+ return this;
57
+ }
58
+
59
+ public static fromDict(data: {[key: string]: any}): NotificationSetting|null {
60
+ if (data == undefined || data == null) {
61
+ return null;
62
+ }
63
+ return new NotificationSetting()
64
+ .withGatewayNamespaceId(data["gatewayNamespaceId"])
65
+ .withEnableTransferMobileNotification(data["enableTransferMobileNotification"])
66
+ .withSound(data["sound"]);
67
+ }
68
+
69
+ public toDict(): {[key: string]: any} {
70
+ return {
71
+ "gatewayNamespaceId": this.getGatewayNamespaceId(),
72
+ "enableTransferMobileNotification": this.getEnableTransferMobileNotification(),
73
+ "sound": this.getSound(),
74
+ };
75
+ }
76
+ }
@@ -0,0 +1,48 @@
1
+ import IModel from '../../core/interface/IModel';
2
+ import * as Gs2Money2 from '../../money2/model';
3
+ export default class StoreSubscriptionContentModel implements IModel {
4
+ private storeSubscriptionContentModelId;
5
+ private name;
6
+ private metadata;
7
+ private scheduleNamespaceId;
8
+ private triggerName;
9
+ private reallocateSpanDays;
10
+ private appleAppStore;
11
+ private googlePlay;
12
+ static getRegion(grn: string): string | null;
13
+ static getOwnerId(grn: string): string | null;
14
+ static getNamespaceName(grn: string): string | null;
15
+ static getContentName(grn: string): string | null;
16
+ static isValid(grn: string): boolean;
17
+ static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, contentName: string | null): string | null;
18
+ getStoreSubscriptionContentModelId(): string | null;
19
+ setStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string | null): this;
20
+ withStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string | null): this;
21
+ getName(): string | null;
22
+ setName(name: string | null): this;
23
+ withName(name: string | null): this;
24
+ getMetadata(): string | null;
25
+ setMetadata(metadata: string | null): this;
26
+ withMetadata(metadata: string | null): this;
27
+ getScheduleNamespaceId(): string | null;
28
+ setScheduleNamespaceId(scheduleNamespaceId: string | null): this;
29
+ withScheduleNamespaceId(scheduleNamespaceId: string | null): this;
30
+ getTriggerName(): string | null;
31
+ setTriggerName(triggerName: string | null): this;
32
+ withTriggerName(triggerName: string | null): this;
33
+ getReallocateSpanDays(): number | null;
34
+ setReallocateSpanDays(reallocateSpanDays: number | null): this;
35
+ withReallocateSpanDays(reallocateSpanDays: number | null): this;
36
+ getAppleAppStore(): Gs2Money2.AppleAppStoreSubscriptionContent | null;
37
+ setAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent | null): this;
38
+ withAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent | null): this;
39
+ getGooglePlay(): Gs2Money2.GooglePlaySubscriptionContent | null;
40
+ setGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent | null): this;
41
+ withGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent | null): this;
42
+ static fromDict(data: {
43
+ [key: string]: any;
44
+ }): StoreSubscriptionContentModel | null;
45
+ toDict(): {
46
+ [key: string]: any;
47
+ };
48
+ }
@@ -0,0 +1,216 @@
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}:model:subscription:content:{contentName}";
21
+ var StoreSubscriptionContentModel = /** @class */ (function () {
22
+ function StoreSubscriptionContentModel() {
23
+ this.storeSubscriptionContentModelId = null;
24
+ this.name = null;
25
+ this.metadata = null;
26
+ this.scheduleNamespaceId = null;
27
+ this.triggerName = null;
28
+ this.reallocateSpanDays = null;
29
+ this.appleAppStore = null;
30
+ this.googlePlay = null;
31
+ }
32
+ StoreSubscriptionContentModel.getRegion = function (grn) {
33
+ var match = grn.match(grnFormat
34
+ .replace('{region}', '(.*)')
35
+ .replace('{ownerId}', '.*')
36
+ .replace('{namespaceName}', '.*')
37
+ .replace('{contentName}', '.*'));
38
+ if (match) {
39
+ return match[1];
40
+ }
41
+ return null;
42
+ };
43
+ StoreSubscriptionContentModel.getOwnerId = function (grn) {
44
+ var match = grn.match(grnFormat
45
+ .replace('{region}', '.*')
46
+ .replace('{ownerId}', '(.*)')
47
+ .replace('{namespaceName}', '.*')
48
+ .replace('{contentName}', '.*'));
49
+ if (match) {
50
+ return match[1];
51
+ }
52
+ return null;
53
+ };
54
+ StoreSubscriptionContentModel.getNamespaceName = function (grn) {
55
+ var match = grn.match(grnFormat
56
+ .replace('{region}', '.*')
57
+ .replace('{ownerId}', '.*')
58
+ .replace('{namespaceName}', '(.*)')
59
+ .replace('{contentName}', '.*'));
60
+ if (match) {
61
+ return match[1];
62
+ }
63
+ return null;
64
+ };
65
+ StoreSubscriptionContentModel.getContentName = function (grn) {
66
+ var match = grn.match(grnFormat
67
+ .replace('{region}', '.*')
68
+ .replace('{ownerId}', '.*')
69
+ .replace('{namespaceName}', '.*')
70
+ .replace('{contentName}', '(.*)'));
71
+ if (match) {
72
+ return match[1];
73
+ }
74
+ return null;
75
+ };
76
+ StoreSubscriptionContentModel.isValid = function (grn) {
77
+ if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
78
+ return false;
79
+ }
80
+ if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
81
+ return false;
82
+ }
83
+ if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
84
+ return false;
85
+ }
86
+ if (this.getContentName(grn) == null || this.getContentName(grn) === '') {
87
+ return false;
88
+ }
89
+ return true;
90
+ };
91
+ StoreSubscriptionContentModel.createGrn = function (region, ownerId, namespaceName, contentName) {
92
+ return grnFormat
93
+ .replace('{region}', region !== null && region !== void 0 ? region : '')
94
+ .replace('{ownerId}', ownerId !== null && ownerId !== void 0 ? ownerId : '')
95
+ .replace('{namespaceName}', namespaceName !== null && namespaceName !== void 0 ? namespaceName : '')
96
+ .replace('{contentName}', contentName !== null && contentName !== void 0 ? contentName : '');
97
+ };
98
+ StoreSubscriptionContentModel.prototype.getStoreSubscriptionContentModelId = function () {
99
+ return this.storeSubscriptionContentModelId;
100
+ };
101
+ StoreSubscriptionContentModel.prototype.setStoreSubscriptionContentModelId = function (storeSubscriptionContentModelId) {
102
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
103
+ return this;
104
+ };
105
+ StoreSubscriptionContentModel.prototype.withStoreSubscriptionContentModelId = function (storeSubscriptionContentModelId) {
106
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
107
+ return this;
108
+ };
109
+ StoreSubscriptionContentModel.prototype.getName = function () {
110
+ return this.name;
111
+ };
112
+ StoreSubscriptionContentModel.prototype.setName = function (name) {
113
+ this.name = name;
114
+ return this;
115
+ };
116
+ StoreSubscriptionContentModel.prototype.withName = function (name) {
117
+ this.name = name;
118
+ return this;
119
+ };
120
+ StoreSubscriptionContentModel.prototype.getMetadata = function () {
121
+ return this.metadata;
122
+ };
123
+ StoreSubscriptionContentModel.prototype.setMetadata = function (metadata) {
124
+ this.metadata = metadata;
125
+ return this;
126
+ };
127
+ StoreSubscriptionContentModel.prototype.withMetadata = function (metadata) {
128
+ this.metadata = metadata;
129
+ return this;
130
+ };
131
+ StoreSubscriptionContentModel.prototype.getScheduleNamespaceId = function () {
132
+ return this.scheduleNamespaceId;
133
+ };
134
+ StoreSubscriptionContentModel.prototype.setScheduleNamespaceId = function (scheduleNamespaceId) {
135
+ this.scheduleNamespaceId = scheduleNamespaceId;
136
+ return this;
137
+ };
138
+ StoreSubscriptionContentModel.prototype.withScheduleNamespaceId = function (scheduleNamespaceId) {
139
+ this.scheduleNamespaceId = scheduleNamespaceId;
140
+ return this;
141
+ };
142
+ StoreSubscriptionContentModel.prototype.getTriggerName = function () {
143
+ return this.triggerName;
144
+ };
145
+ StoreSubscriptionContentModel.prototype.setTriggerName = function (triggerName) {
146
+ this.triggerName = triggerName;
147
+ return this;
148
+ };
149
+ StoreSubscriptionContentModel.prototype.withTriggerName = function (triggerName) {
150
+ this.triggerName = triggerName;
151
+ return this;
152
+ };
153
+ StoreSubscriptionContentModel.prototype.getReallocateSpanDays = function () {
154
+ return this.reallocateSpanDays;
155
+ };
156
+ StoreSubscriptionContentModel.prototype.setReallocateSpanDays = function (reallocateSpanDays) {
157
+ this.reallocateSpanDays = reallocateSpanDays;
158
+ return this;
159
+ };
160
+ StoreSubscriptionContentModel.prototype.withReallocateSpanDays = function (reallocateSpanDays) {
161
+ this.reallocateSpanDays = reallocateSpanDays;
162
+ return this;
163
+ };
164
+ StoreSubscriptionContentModel.prototype.getAppleAppStore = function () {
165
+ return this.appleAppStore;
166
+ };
167
+ StoreSubscriptionContentModel.prototype.setAppleAppStore = function (appleAppStore) {
168
+ this.appleAppStore = appleAppStore;
169
+ return this;
170
+ };
171
+ StoreSubscriptionContentModel.prototype.withAppleAppStore = function (appleAppStore) {
172
+ this.appleAppStore = appleAppStore;
173
+ return this;
174
+ };
175
+ StoreSubscriptionContentModel.prototype.getGooglePlay = function () {
176
+ return this.googlePlay;
177
+ };
178
+ StoreSubscriptionContentModel.prototype.setGooglePlay = function (googlePlay) {
179
+ this.googlePlay = googlePlay;
180
+ return this;
181
+ };
182
+ StoreSubscriptionContentModel.prototype.withGooglePlay = function (googlePlay) {
183
+ this.googlePlay = googlePlay;
184
+ return this;
185
+ };
186
+ StoreSubscriptionContentModel.fromDict = function (data) {
187
+ if (data == undefined || data == null) {
188
+ return null;
189
+ }
190
+ return new StoreSubscriptionContentModel()
191
+ .withStoreSubscriptionContentModelId(data["storeSubscriptionContentModelId"])
192
+ .withName(data["name"])
193
+ .withMetadata(data["metadata"])
194
+ .withScheduleNamespaceId(data["scheduleNamespaceId"])
195
+ .withTriggerName(data["triggerName"])
196
+ .withReallocateSpanDays(data["reallocateSpanDays"])
197
+ .withAppleAppStore(Gs2Money2.AppleAppStoreSubscriptionContent.fromDict(data["appleAppStore"]))
198
+ .withGooglePlay(Gs2Money2.GooglePlaySubscriptionContent.fromDict(data["googlePlay"]));
199
+ };
200
+ StoreSubscriptionContentModel.prototype.toDict = function () {
201
+ var _a, _b;
202
+ return {
203
+ "storeSubscriptionContentModelId": this.getStoreSubscriptionContentModelId(),
204
+ "name": this.getName(),
205
+ "metadata": this.getMetadata(),
206
+ "scheduleNamespaceId": this.getScheduleNamespaceId(),
207
+ "triggerName": this.getTriggerName(),
208
+ "reallocateSpanDays": this.getReallocateSpanDays(),
209
+ "appleAppStore": (_a = this.getAppleAppStore()) === null || _a === void 0 ? void 0 : _a.toDict(),
210
+ "googlePlay": (_b = this.getGooglePlay()) === null || _b === void 0 ? void 0 : _b.toDict(),
211
+ };
212
+ };
213
+ return StoreSubscriptionContentModel;
214
+ }());
215
+ exports.default = StoreSubscriptionContentModel;
216
+ //# sourceMappingURL=StoreSubscriptionContentModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreSubscriptionContentModel.js","sourceRoot":"","sources":["StoreSubscriptionContentModel.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,oEAA+C;AAG/C,IAAM,SAAS,GAAW,4FAA4F,CAAC;AAEvH;IAAA;QACY,oCAA+B,GAAgB,IAAI,CAAC;QACpD,SAAI,GAAgB,IAAI,CAAC;QACzB,aAAQ,GAAgB,IAAI,CAAC;QAC7B,wBAAmB,GAAgB,IAAI,CAAC;QACxC,gBAAW,GAAgB,IAAI,CAAC;QAChC,uBAAk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YAAY,EAAE,MAAA,IAAI,CAAC,aAAa,EAAE,0CAAE,MAAM,EAAE;SAC/C,CAAC;IACN,CAAC;IACL,oCAAC;AAAD,CAAC,AA9MD,IA8MC"}
@@ -0,0 +1,230 @@
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}:model:subscription:content:{contentName}";
23
+
24
+ export default class StoreSubscriptionContentModel implements IModel {
25
+ private storeSubscriptionContentModelId: string|null = null;
26
+ private name: string|null = null;
27
+ private metadata: string|null = null;
28
+ private scheduleNamespaceId: string|null = null;
29
+ private triggerName: string|null = null;
30
+ private reallocateSpanDays: number|null = null;
31
+ private appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent|null = null;
32
+ private googlePlay: Gs2Money2.GooglePlaySubscriptionContent|null = null;
33
+
34
+ public static getRegion(grn: string): string|null {
35
+ const match = grn.match(grnFormat
36
+ .replace('{region}', '(.*)')
37
+ .replace('{ownerId}', '.*')
38
+ .replace('{namespaceName}', '.*')
39
+ .replace('{contentName}', '.*')
40
+ );
41
+ if (match) {
42
+ return match[1];
43
+ }
44
+ return null;
45
+ }
46
+
47
+ public static getOwnerId(grn: string): string|null {
48
+ const match = grn.match(grnFormat
49
+ .replace('{region}', '.*')
50
+ .replace('{ownerId}', '(.*)')
51
+ .replace('{namespaceName}', '.*')
52
+ .replace('{contentName}', '.*')
53
+ );
54
+ if (match) {
55
+ return match[1];
56
+ }
57
+ return null;
58
+ }
59
+
60
+ public static getNamespaceName(grn: string): string|null {
61
+ const match = grn.match(grnFormat
62
+ .replace('{region}', '.*')
63
+ .replace('{ownerId}', '.*')
64
+ .replace('{namespaceName}', '(.*)')
65
+ .replace('{contentName}', '.*')
66
+ );
67
+ if (match) {
68
+ return match[1];
69
+ }
70
+ return null;
71
+ }
72
+
73
+ public static getContentName(grn: string): string|null {
74
+ const match = grn.match(grnFormat
75
+ .replace('{region}', '.*')
76
+ .replace('{ownerId}', '.*')
77
+ .replace('{namespaceName}', '.*')
78
+ .replace('{contentName}', '(.*)')
79
+ );
80
+ if (match) {
81
+ return match[1];
82
+ }
83
+ return null;
84
+ }
85
+
86
+ public static isValid(grn: string): boolean {
87
+ if (this.getRegion(grn) == null || this.getRegion(grn) === '') {
88
+ return false;
89
+ }
90
+ if (this.getOwnerId(grn) == null || this.getOwnerId(grn) === '') {
91
+ return false;
92
+ }
93
+ if (this.getNamespaceName(grn) == null || this.getNamespaceName(grn) === '') {
94
+ return false;
95
+ }
96
+ if (this.getContentName(grn) == null || this.getContentName(grn) === '') {
97
+ return false;
98
+ }
99
+ return true;
100
+ }
101
+
102
+ public static createGrn(
103
+ region: string|null,
104
+ ownerId: string|null,
105
+ namespaceName: string|null,
106
+ contentName: string|null,
107
+ ): string|null {
108
+ return grnFormat
109
+ .replace('{region}', region ?? '')
110
+ .replace('{ownerId}', ownerId ?? '')
111
+ .replace('{namespaceName}', namespaceName ?? '')
112
+ .replace('{contentName}', contentName ?? '');
113
+ }
114
+ public getStoreSubscriptionContentModelId(): string|null {
115
+ return this.storeSubscriptionContentModelId;
116
+ }
117
+ public setStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string|null) {
118
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
119
+ return this;
120
+ }
121
+ public withStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string|null): this {
122
+ this.storeSubscriptionContentModelId = storeSubscriptionContentModelId;
123
+ return this;
124
+ }
125
+ public getName(): string|null {
126
+ return this.name;
127
+ }
128
+ public setName(name: string|null) {
129
+ this.name = name;
130
+ return this;
131
+ }
132
+ public withName(name: string|null): this {
133
+ this.name = name;
134
+ return this;
135
+ }
136
+ public getMetadata(): string|null {
137
+ return this.metadata;
138
+ }
139
+ public setMetadata(metadata: string|null) {
140
+ this.metadata = metadata;
141
+ return this;
142
+ }
143
+ public withMetadata(metadata: string|null): this {
144
+ this.metadata = metadata;
145
+ return this;
146
+ }
147
+ public getScheduleNamespaceId(): string|null {
148
+ return this.scheduleNamespaceId;
149
+ }
150
+ public setScheduleNamespaceId(scheduleNamespaceId: string|null) {
151
+ this.scheduleNamespaceId = scheduleNamespaceId;
152
+ return this;
153
+ }
154
+ public withScheduleNamespaceId(scheduleNamespaceId: string|null): this {
155
+ this.scheduleNamespaceId = scheduleNamespaceId;
156
+ return this;
157
+ }
158
+ public getTriggerName(): string|null {
159
+ return this.triggerName;
160
+ }
161
+ public setTriggerName(triggerName: string|null) {
162
+ this.triggerName = triggerName;
163
+ return this;
164
+ }
165
+ public withTriggerName(triggerName: string|null): this {
166
+ this.triggerName = triggerName;
167
+ return this;
168
+ }
169
+ public getReallocateSpanDays(): number|null {
170
+ return this.reallocateSpanDays;
171
+ }
172
+ public setReallocateSpanDays(reallocateSpanDays: number|null) {
173
+ this.reallocateSpanDays = reallocateSpanDays;
174
+ return this;
175
+ }
176
+ public withReallocateSpanDays(reallocateSpanDays: number|null): this {
177
+ this.reallocateSpanDays = reallocateSpanDays;
178
+ return this;
179
+ }
180
+ public getAppleAppStore(): Gs2Money2.AppleAppStoreSubscriptionContent|null {
181
+ return this.appleAppStore;
182
+ }
183
+ public setAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent|null) {
184
+ this.appleAppStore = appleAppStore;
185
+ return this;
186
+ }
187
+ public withAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent|null): this {
188
+ this.appleAppStore = appleAppStore;
189
+ return this;
190
+ }
191
+ public getGooglePlay(): Gs2Money2.GooglePlaySubscriptionContent|null {
192
+ return this.googlePlay;
193
+ }
194
+ public setGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent|null) {
195
+ this.googlePlay = googlePlay;
196
+ return this;
197
+ }
198
+ public withGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent|null): this {
199
+ this.googlePlay = googlePlay;
200
+ return this;
201
+ }
202
+
203
+ public static fromDict(data: {[key: string]: any}): StoreSubscriptionContentModel|null {
204
+ if (data == undefined || data == null) {
205
+ return null;
206
+ }
207
+ return new StoreSubscriptionContentModel()
208
+ .withStoreSubscriptionContentModelId(data["storeSubscriptionContentModelId"])
209
+ .withName(data["name"])
210
+ .withMetadata(data["metadata"])
211
+ .withScheduleNamespaceId(data["scheduleNamespaceId"])
212
+ .withTriggerName(data["triggerName"])
213
+ .withReallocateSpanDays(data["reallocateSpanDays"])
214
+ .withAppleAppStore(Gs2Money2.AppleAppStoreSubscriptionContent.fromDict(data["appleAppStore"]))
215
+ .withGooglePlay(Gs2Money2.GooglePlaySubscriptionContent.fromDict(data["googlePlay"]));
216
+ }
217
+
218
+ public toDict(): {[key: string]: any} {
219
+ return {
220
+ "storeSubscriptionContentModelId": this.getStoreSubscriptionContentModelId(),
221
+ "name": this.getName(),
222
+ "metadata": this.getMetadata(),
223
+ "scheduleNamespaceId": this.getScheduleNamespaceId(),
224
+ "triggerName": this.getTriggerName(),
225
+ "reallocateSpanDays": this.getReallocateSpanDays(),
226
+ "appleAppStore": this.getAppleAppStore()?.toDict(),
227
+ "googlePlay": this.getGooglePlay()?.toDict(),
228
+ };
229
+ }
230
+ }
@@ -0,0 +1,64 @@
1
+ import IModel from '../../core/interface/IModel';
2
+ import * as Gs2Money2 from '../../money2/model';
3
+ export default class StoreSubscriptionContentModelMaster implements IModel {
4
+ private storeSubscriptionContentModelId;
5
+ private name;
6
+ private description;
7
+ private metadata;
8
+ private scheduleNamespaceId;
9
+ private triggerName;
10
+ private reallocateSpanDays;
11
+ private appleAppStore;
12
+ private googlePlay;
13
+ private createdAt;
14
+ private updatedAt;
15
+ private revision;
16
+ static getRegion(grn: string): string | null;
17
+ static getOwnerId(grn: string): string | null;
18
+ static getNamespaceName(grn: string): string | null;
19
+ static getContentName(grn: string): string | null;
20
+ static isValid(grn: string): boolean;
21
+ static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, contentName: string | null): string | null;
22
+ getStoreSubscriptionContentModelId(): string | null;
23
+ setStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string | null): this;
24
+ withStoreSubscriptionContentModelId(storeSubscriptionContentModelId: string | null): this;
25
+ getName(): string | null;
26
+ setName(name: string | null): this;
27
+ withName(name: string | null): this;
28
+ getDescription(): string | null;
29
+ setDescription(description: string | null): this;
30
+ withDescription(description: string | null): this;
31
+ getMetadata(): string | null;
32
+ setMetadata(metadata: string | null): this;
33
+ withMetadata(metadata: string | null): this;
34
+ getScheduleNamespaceId(): string | null;
35
+ setScheduleNamespaceId(scheduleNamespaceId: string | null): this;
36
+ withScheduleNamespaceId(scheduleNamespaceId: string | null): this;
37
+ getTriggerName(): string | null;
38
+ setTriggerName(triggerName: string | null): this;
39
+ withTriggerName(triggerName: string | null): this;
40
+ getReallocateSpanDays(): number | null;
41
+ setReallocateSpanDays(reallocateSpanDays: number | null): this;
42
+ withReallocateSpanDays(reallocateSpanDays: number | null): this;
43
+ getAppleAppStore(): Gs2Money2.AppleAppStoreSubscriptionContent | null;
44
+ setAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent | null): this;
45
+ withAppleAppStore(appleAppStore: Gs2Money2.AppleAppStoreSubscriptionContent | null): this;
46
+ getGooglePlay(): Gs2Money2.GooglePlaySubscriptionContent | null;
47
+ setGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent | null): this;
48
+ withGooglePlay(googlePlay: Gs2Money2.GooglePlaySubscriptionContent | null): this;
49
+ getCreatedAt(): number | null;
50
+ setCreatedAt(createdAt: number | null): this;
51
+ withCreatedAt(createdAt: number | null): this;
52
+ getUpdatedAt(): number | null;
53
+ setUpdatedAt(updatedAt: number | null): this;
54
+ withUpdatedAt(updatedAt: number | null): this;
55
+ getRevision(): number | null;
56
+ setRevision(revision: number | null): this;
57
+ withRevision(revision: number | null): this;
58
+ static fromDict(data: {
59
+ [key: string]: any;
60
+ }): StoreSubscriptionContentModelMaster | null;
61
+ toDict(): {
62
+ [key: string]: any;
63
+ };
64
+ }