gs2 1.4.53 → 1.4.55
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.
- package/distributor/request/FreezeMasterDataByTimestampRequest.d.ts +33 -0
- package/distributor/request/FreezeMasterDataByTimestampRequest.js +109 -0
- package/distributor/request/FreezeMasterDataByTimestampRequest.js.map +1 -0
- package/distributor/request/FreezeMasterDataByTimestampRequest.ts +119 -0
- package/distributor/request/index.d.ts +2 -1
- package/distributor/request/index.js +3 -1
- package/distributor/request/index.js.map +1 -1
- package/distributor/request/index.ts +2 -0
- package/distributor/rest.d.ts +1 -0
- package/distributor/rest.js +33 -0
- package/distributor/rest.js.map +1 -1
- package/distributor/rest.ts +37 -0
- package/distributor/result/FreezeMasterDataByTimestampResult.d.ts +13 -0
- package/distributor/result/FreezeMasterDataByTimestampResult.js +45 -0
- package/distributor/result/FreezeMasterDataByTimestampResult.js.map +1 -0
- package/distributor/result/FreezeMasterDataByTimestampResult.ts +46 -0
- package/distributor/result/index.d.ts +2 -1
- package/distributor/result/index.js +3 -1
- package/distributor/result/index.js.map +1 -1
- package/distributor/result/index.ts +2 -0
- package/money2/model/AppleAppStoreSetting.d.ts +12 -0
- package/money2/model/AppleAppStoreSetting.js +43 -1
- package/money2/model/AppleAppStoreSetting.js.map +1 -1
- package/money2/model/AppleAppStoreSetting.ts +43 -1
- package/money2/model/Event.d.ts +4 -0
- package/money2/model/Event.js +15 -1
- package/money2/model/Event.js.map +1 -1
- package/money2/model/Event.ts +15 -0
- package/money2/model/GooglePlayRealtimeNotificationMessage.d.ts +21 -0
- package/money2/model/GooglePlayRealtimeNotificationMessage.js +76 -0
- package/money2/model/GooglePlayRealtimeNotificationMessage.js.map +1 -0
- package/money2/model/GooglePlayRealtimeNotificationMessage.ts +76 -0
- package/money2/model/GooglePlaySetting.d.ts +4 -0
- package/money2/model/GooglePlaySetting.js +15 -1
- package/money2/model/GooglePlaySetting.js.map +1 -1
- package/money2/model/GooglePlaySetting.ts +15 -1
- package/money2/model/RefundEvent.d.ts +26 -0
- package/money2/model/RefundEvent.js +93 -0
- package/money2/model/RefundEvent.js.map +1 -0
- package/money2/model/RefundEvent.ts +92 -0
- package/money2/model/SubscribeTransaction.d.ts +55 -0
- package/money2/model/SubscribeTransaction.js +241 -0
- package/money2/model/SubscribeTransaction.js.map +1 -0
- package/money2/model/SubscribeTransaction.ts +256 -0
- package/money2/model/index.d.ts +4 -1
- package/money2/model/index.js +7 -1
- package/money2/model/index.js.map +1 -1
- package/money2/model/index.ts +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
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 AppleAppStoreVerifyReceiptEvent from './AppleAppStoreVerifyReceiptEvent';
|
|
21
|
+
import GooglePlayVerifyReceiptEvent from './GooglePlayVerifyReceiptEvent';
|
|
22
|
+
|
|
23
|
+
export default class RefundEvent implements IModel {
|
|
24
|
+
private contentName: string|null = null;
|
|
25
|
+
private platform: string|null = null;
|
|
26
|
+
private appleAppStoreRefundEvent: Gs2Money2.AppleAppStoreVerifyReceiptEvent|null = null;
|
|
27
|
+
private googlePlayRefundEvent: Gs2Money2.GooglePlayVerifyReceiptEvent|null = null;
|
|
28
|
+
public getContentName(): string|null {
|
|
29
|
+
return this.contentName;
|
|
30
|
+
}
|
|
31
|
+
public setContentName(contentName: string|null) {
|
|
32
|
+
this.contentName = contentName;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
public withContentName(contentName: string|null): this {
|
|
36
|
+
this.contentName = contentName;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
public getPlatform(): string|null {
|
|
40
|
+
return this.platform;
|
|
41
|
+
}
|
|
42
|
+
public setPlatform(platform: string|null) {
|
|
43
|
+
this.platform = platform;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
public withPlatform(platform: string|null): this {
|
|
47
|
+
this.platform = platform;
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
public getAppleAppStoreRefundEvent(): Gs2Money2.AppleAppStoreVerifyReceiptEvent|null {
|
|
51
|
+
return this.appleAppStoreRefundEvent;
|
|
52
|
+
}
|
|
53
|
+
public setAppleAppStoreRefundEvent(appleAppStoreRefundEvent: Gs2Money2.AppleAppStoreVerifyReceiptEvent|null) {
|
|
54
|
+
this.appleAppStoreRefundEvent = appleAppStoreRefundEvent;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
public withAppleAppStoreRefundEvent(appleAppStoreRefundEvent: Gs2Money2.AppleAppStoreVerifyReceiptEvent|null): this {
|
|
58
|
+
this.appleAppStoreRefundEvent = appleAppStoreRefundEvent;
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
public getGooglePlayRefundEvent(): Gs2Money2.GooglePlayVerifyReceiptEvent|null {
|
|
62
|
+
return this.googlePlayRefundEvent;
|
|
63
|
+
}
|
|
64
|
+
public setGooglePlayRefundEvent(googlePlayRefundEvent: Gs2Money2.GooglePlayVerifyReceiptEvent|null) {
|
|
65
|
+
this.googlePlayRefundEvent = googlePlayRefundEvent;
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
public withGooglePlayRefundEvent(googlePlayRefundEvent: Gs2Money2.GooglePlayVerifyReceiptEvent|null): this {
|
|
69
|
+
this.googlePlayRefundEvent = googlePlayRefundEvent;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public static fromDict(data: {[key: string]: any}): RefundEvent|null {
|
|
74
|
+
if (data == undefined || data == null) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return new RefundEvent()
|
|
78
|
+
.withContentName(data["contentName"])
|
|
79
|
+
.withPlatform(data["platform"])
|
|
80
|
+
.withAppleAppStoreRefundEvent(Gs2Money2.AppleAppStoreVerifyReceiptEvent.fromDict(data["appleAppStoreRefundEvent"]))
|
|
81
|
+
.withGooglePlayRefundEvent(Gs2Money2.GooglePlayVerifyReceiptEvent.fromDict(data["googlePlayRefundEvent"]));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
public toDict(): {[key: string]: any} {
|
|
85
|
+
return {
|
|
86
|
+
"contentName": this.getContentName(),
|
|
87
|
+
"platform": this.getPlatform(),
|
|
88
|
+
"appleAppStoreRefundEvent": this.getAppleAppStoreRefundEvent()?.toDict(),
|
|
89
|
+
"googlePlayRefundEvent": this.getGooglePlayRefundEvent()?.toDict(),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import IModel from '../../core/interface/IModel';
|
|
2
|
+
export default class SubscribeTransaction implements IModel {
|
|
3
|
+
private subscribeTransactionId;
|
|
4
|
+
private transactionId;
|
|
5
|
+
private store;
|
|
6
|
+
private userId;
|
|
7
|
+
private status;
|
|
8
|
+
private statusDetail;
|
|
9
|
+
private expiresAt;
|
|
10
|
+
private createdAt;
|
|
11
|
+
private updatedAt;
|
|
12
|
+
private revision;
|
|
13
|
+
static getRegion(grn: string): string | null;
|
|
14
|
+
static getOwnerId(grn: string): string | null;
|
|
15
|
+
static getNamespaceName(grn: string): string | null;
|
|
16
|
+
static getTransactionId(grn: string): string | null;
|
|
17
|
+
static isValid(grn: string): boolean;
|
|
18
|
+
static createGrn(region: string | null, ownerId: string | null, namespaceName: string | null, transactionId: string | null): string | null;
|
|
19
|
+
getSubscribeTransactionId(): string | null;
|
|
20
|
+
setSubscribeTransactionId(subscribeTransactionId: string | null): this;
|
|
21
|
+
withSubscribeTransactionId(subscribeTransactionId: string | null): this;
|
|
22
|
+
getTransactionId(): string | null;
|
|
23
|
+
setTransactionId(transactionId: string | null): this;
|
|
24
|
+
withTransactionId(transactionId: string | null): this;
|
|
25
|
+
getStore(): string | null;
|
|
26
|
+
setStore(store: string | null): this;
|
|
27
|
+
withStore(store: string | null): this;
|
|
28
|
+
getUserId(): string | null;
|
|
29
|
+
setUserId(userId: string | null): this;
|
|
30
|
+
withUserId(userId: string | null): this;
|
|
31
|
+
getStatus(): string | null;
|
|
32
|
+
setStatus(status: string | null): this;
|
|
33
|
+
withStatus(status: string | null): this;
|
|
34
|
+
getStatusDetail(): string | null;
|
|
35
|
+
setStatusDetail(statusDetail: string | null): this;
|
|
36
|
+
withStatusDetail(statusDetail: string | null): this;
|
|
37
|
+
getExpiresAt(): number | null;
|
|
38
|
+
setExpiresAt(expiresAt: number | null): this;
|
|
39
|
+
withExpiresAt(expiresAt: number | null): this;
|
|
40
|
+
getCreatedAt(): number | null;
|
|
41
|
+
setCreatedAt(createdAt: number | null): this;
|
|
42
|
+
withCreatedAt(createdAt: number | null): this;
|
|
43
|
+
getUpdatedAt(): number | null;
|
|
44
|
+
setUpdatedAt(updatedAt: number | null): this;
|
|
45
|
+
withUpdatedAt(updatedAt: number | null): this;
|
|
46
|
+
getRevision(): number | null;
|
|
47
|
+
setRevision(revision: number | null): this;
|
|
48
|
+
withRevision(revision: number | null): this;
|
|
49
|
+
static fromDict(data: {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}): SubscribeTransaction | null;
|
|
52
|
+
toDict(): {
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
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 grnFormat = "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:subscriptionTransaction:{transactionId}";
|
|
19
|
+
var SubscribeTransaction = /** @class */ (function () {
|
|
20
|
+
function SubscribeTransaction() {
|
|
21
|
+
this.subscribeTransactionId = null;
|
|
22
|
+
this.transactionId = null;
|
|
23
|
+
this.store = null;
|
|
24
|
+
this.userId = null;
|
|
25
|
+
this.status = null;
|
|
26
|
+
this.statusDetail = null;
|
|
27
|
+
this.expiresAt = null;
|
|
28
|
+
this.createdAt = null;
|
|
29
|
+
this.updatedAt = null;
|
|
30
|
+
this.revision = null;
|
|
31
|
+
}
|
|
32
|
+
SubscribeTransaction.getRegion = function (grn) {
|
|
33
|
+
var match = grn.match(grnFormat
|
|
34
|
+
.replace('{region}', '(.*)')
|
|
35
|
+
.replace('{ownerId}', '.*')
|
|
36
|
+
.replace('{namespaceName}', '.*')
|
|
37
|
+
.replace('{transactionId}', '.*'));
|
|
38
|
+
if (match) {
|
|
39
|
+
return match[1];
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
SubscribeTransaction.getOwnerId = function (grn) {
|
|
44
|
+
var match = grn.match(grnFormat
|
|
45
|
+
.replace('{region}', '.*')
|
|
46
|
+
.replace('{ownerId}', '(.*)')
|
|
47
|
+
.replace('{namespaceName}', '.*')
|
|
48
|
+
.replace('{transactionId}', '.*'));
|
|
49
|
+
if (match) {
|
|
50
|
+
return match[1];
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
SubscribeTransaction.getNamespaceName = function (grn) {
|
|
55
|
+
var match = grn.match(grnFormat
|
|
56
|
+
.replace('{region}', '.*')
|
|
57
|
+
.replace('{ownerId}', '.*')
|
|
58
|
+
.replace('{namespaceName}', '(.*)')
|
|
59
|
+
.replace('{transactionId}', '.*'));
|
|
60
|
+
if (match) {
|
|
61
|
+
return match[1];
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
};
|
|
65
|
+
SubscribeTransaction.getTransactionId = function (grn) {
|
|
66
|
+
var match = grn.match(grnFormat
|
|
67
|
+
.replace('{region}', '.*')
|
|
68
|
+
.replace('{ownerId}', '.*')
|
|
69
|
+
.replace('{namespaceName}', '.*')
|
|
70
|
+
.replace('{transactionId}', '(.*)'));
|
|
71
|
+
if (match) {
|
|
72
|
+
return match[1];
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
SubscribeTransaction.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.getTransactionId(grn) == null || this.getTransactionId(grn) === '') {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
};
|
|
91
|
+
SubscribeTransaction.createGrn = function (region, ownerId, namespaceName, transactionId) {
|
|
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('{transactionId}', transactionId !== null && transactionId !== void 0 ? transactionId : '');
|
|
97
|
+
};
|
|
98
|
+
SubscribeTransaction.prototype.getSubscribeTransactionId = function () {
|
|
99
|
+
return this.subscribeTransactionId;
|
|
100
|
+
};
|
|
101
|
+
SubscribeTransaction.prototype.setSubscribeTransactionId = function (subscribeTransactionId) {
|
|
102
|
+
this.subscribeTransactionId = subscribeTransactionId;
|
|
103
|
+
return this;
|
|
104
|
+
};
|
|
105
|
+
SubscribeTransaction.prototype.withSubscribeTransactionId = function (subscribeTransactionId) {
|
|
106
|
+
this.subscribeTransactionId = subscribeTransactionId;
|
|
107
|
+
return this;
|
|
108
|
+
};
|
|
109
|
+
SubscribeTransaction.prototype.getTransactionId = function () {
|
|
110
|
+
return this.transactionId;
|
|
111
|
+
};
|
|
112
|
+
SubscribeTransaction.prototype.setTransactionId = function (transactionId) {
|
|
113
|
+
this.transactionId = transactionId;
|
|
114
|
+
return this;
|
|
115
|
+
};
|
|
116
|
+
SubscribeTransaction.prototype.withTransactionId = function (transactionId) {
|
|
117
|
+
this.transactionId = transactionId;
|
|
118
|
+
return this;
|
|
119
|
+
};
|
|
120
|
+
SubscribeTransaction.prototype.getStore = function () {
|
|
121
|
+
return this.store;
|
|
122
|
+
};
|
|
123
|
+
SubscribeTransaction.prototype.setStore = function (store) {
|
|
124
|
+
this.store = store;
|
|
125
|
+
return this;
|
|
126
|
+
};
|
|
127
|
+
SubscribeTransaction.prototype.withStore = function (store) {
|
|
128
|
+
this.store = store;
|
|
129
|
+
return this;
|
|
130
|
+
};
|
|
131
|
+
SubscribeTransaction.prototype.getUserId = function () {
|
|
132
|
+
return this.userId;
|
|
133
|
+
};
|
|
134
|
+
SubscribeTransaction.prototype.setUserId = function (userId) {
|
|
135
|
+
this.userId = userId;
|
|
136
|
+
return this;
|
|
137
|
+
};
|
|
138
|
+
SubscribeTransaction.prototype.withUserId = function (userId) {
|
|
139
|
+
this.userId = userId;
|
|
140
|
+
return this;
|
|
141
|
+
};
|
|
142
|
+
SubscribeTransaction.prototype.getStatus = function () {
|
|
143
|
+
return this.status;
|
|
144
|
+
};
|
|
145
|
+
SubscribeTransaction.prototype.setStatus = function (status) {
|
|
146
|
+
this.status = status;
|
|
147
|
+
return this;
|
|
148
|
+
};
|
|
149
|
+
SubscribeTransaction.prototype.withStatus = function (status) {
|
|
150
|
+
this.status = status;
|
|
151
|
+
return this;
|
|
152
|
+
};
|
|
153
|
+
SubscribeTransaction.prototype.getStatusDetail = function () {
|
|
154
|
+
return this.statusDetail;
|
|
155
|
+
};
|
|
156
|
+
SubscribeTransaction.prototype.setStatusDetail = function (statusDetail) {
|
|
157
|
+
this.statusDetail = statusDetail;
|
|
158
|
+
return this;
|
|
159
|
+
};
|
|
160
|
+
SubscribeTransaction.prototype.withStatusDetail = function (statusDetail) {
|
|
161
|
+
this.statusDetail = statusDetail;
|
|
162
|
+
return this;
|
|
163
|
+
};
|
|
164
|
+
SubscribeTransaction.prototype.getExpiresAt = function () {
|
|
165
|
+
return this.expiresAt;
|
|
166
|
+
};
|
|
167
|
+
SubscribeTransaction.prototype.setExpiresAt = function (expiresAt) {
|
|
168
|
+
this.expiresAt = expiresAt;
|
|
169
|
+
return this;
|
|
170
|
+
};
|
|
171
|
+
SubscribeTransaction.prototype.withExpiresAt = function (expiresAt) {
|
|
172
|
+
this.expiresAt = expiresAt;
|
|
173
|
+
return this;
|
|
174
|
+
};
|
|
175
|
+
SubscribeTransaction.prototype.getCreatedAt = function () {
|
|
176
|
+
return this.createdAt;
|
|
177
|
+
};
|
|
178
|
+
SubscribeTransaction.prototype.setCreatedAt = function (createdAt) {
|
|
179
|
+
this.createdAt = createdAt;
|
|
180
|
+
return this;
|
|
181
|
+
};
|
|
182
|
+
SubscribeTransaction.prototype.withCreatedAt = function (createdAt) {
|
|
183
|
+
this.createdAt = createdAt;
|
|
184
|
+
return this;
|
|
185
|
+
};
|
|
186
|
+
SubscribeTransaction.prototype.getUpdatedAt = function () {
|
|
187
|
+
return this.updatedAt;
|
|
188
|
+
};
|
|
189
|
+
SubscribeTransaction.prototype.setUpdatedAt = function (updatedAt) {
|
|
190
|
+
this.updatedAt = updatedAt;
|
|
191
|
+
return this;
|
|
192
|
+
};
|
|
193
|
+
SubscribeTransaction.prototype.withUpdatedAt = function (updatedAt) {
|
|
194
|
+
this.updatedAt = updatedAt;
|
|
195
|
+
return this;
|
|
196
|
+
};
|
|
197
|
+
SubscribeTransaction.prototype.getRevision = function () {
|
|
198
|
+
return this.revision;
|
|
199
|
+
};
|
|
200
|
+
SubscribeTransaction.prototype.setRevision = function (revision) {
|
|
201
|
+
this.revision = revision;
|
|
202
|
+
return this;
|
|
203
|
+
};
|
|
204
|
+
SubscribeTransaction.prototype.withRevision = function (revision) {
|
|
205
|
+
this.revision = revision;
|
|
206
|
+
return this;
|
|
207
|
+
};
|
|
208
|
+
SubscribeTransaction.fromDict = function (data) {
|
|
209
|
+
if (data == undefined || data == null) {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
return new SubscribeTransaction()
|
|
213
|
+
.withSubscribeTransactionId(data["subscribeTransactionId"])
|
|
214
|
+
.withTransactionId(data["transactionId"])
|
|
215
|
+
.withStore(data["store"])
|
|
216
|
+
.withUserId(data["userId"])
|
|
217
|
+
.withStatus(data["status"])
|
|
218
|
+
.withStatusDetail(data["statusDetail"])
|
|
219
|
+
.withExpiresAt(data["expiresAt"])
|
|
220
|
+
.withCreatedAt(data["createdAt"])
|
|
221
|
+
.withUpdatedAt(data["updatedAt"])
|
|
222
|
+
.withRevision(data["revision"]);
|
|
223
|
+
};
|
|
224
|
+
SubscribeTransaction.prototype.toDict = function () {
|
|
225
|
+
return {
|
|
226
|
+
"subscribeTransactionId": this.getSubscribeTransactionId(),
|
|
227
|
+
"transactionId": this.getTransactionId(),
|
|
228
|
+
"store": this.getStore(),
|
|
229
|
+
"userId": this.getUserId(),
|
|
230
|
+
"status": this.getStatus(),
|
|
231
|
+
"statusDetail": this.getStatusDetail(),
|
|
232
|
+
"expiresAt": this.getExpiresAt(),
|
|
233
|
+
"createdAt": this.getCreatedAt(),
|
|
234
|
+
"updatedAt": this.getUpdatedAt(),
|
|
235
|
+
"revision": this.getRevision(),
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
return SubscribeTransaction;
|
|
239
|
+
}());
|
|
240
|
+
exports.default = SubscribeTransaction;
|
|
241
|
+
//# sourceMappingURL=SubscribeTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscribeTransaction.js","sourceRoot":"","sources":["SubscribeTransaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAKH,IAAM,SAAS,GAAW,2FAA2F,CAAC;AAEtH;IAAA;QACY,2BAAsB,GAAgB,IAAI,CAAC;QAC3C,kBAAa,GAAgB,IAAI,CAAC;QAClC,UAAK,GAAgB,IAAI,CAAC;QAC1B,WAAM,GAAgB,IAAI,CAAC;QAC3B,WAAM,GAAgB,IAAI,CAAC;QAC3B,iBAAY,GAAgB,IAAI,CAAC;QACjC,cAAS,GAAgB,IAAI,CAAC;QAC9B,cAAS,GAAgB,IAAI,CAAC;QAC9B,cAAS,GAAgB,IAAI,CAAC;QAC9B,aAAQ,GAAgB,IAAI,CAAC;IAgOzC,CAAC;IA9NiB,8BAAS,GAAvB,UAAwB,GAAW;QAC/B,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS;aAC5B,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC;aAC3B,OAAO,CAAC,WAAW,EAAE,IAAI,C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1D,eAAe,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACxC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxB,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE;YAC1B,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE;YACtC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;YAChC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;YAChC,WAAW,EAAE,IAAI,CAAC,YAAY,EAAE;YAChC,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;SACjC,CAAC;IACN,CAAC;IACL,2BAAC;AAAD,CAAC,AA1OD,IA0OC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
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
|
+
const grnFormat: string = "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:subscriptionTransaction:{transactionId}";
|
|
21
|
+
|
|
22
|
+
export default class SubscribeTransaction implements IModel {
|
|
23
|
+
private subscribeTransactionId: string|null = null;
|
|
24
|
+
private transactionId: string|null = null;
|
|
25
|
+
private store: string|null = null;
|
|
26
|
+
private userId: string|null = null;
|
|
27
|
+
private status: string|null = null;
|
|
28
|
+
private statusDetail: string|null = null;
|
|
29
|
+
private expiresAt: number|null = null;
|
|
30
|
+
private createdAt: number|null = null;
|
|
31
|
+
private updatedAt: number|null = null;
|
|
32
|
+
private revision: number|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('{transactionId}', '.*')
|
|
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('{transactionId}', '.*')
|
|
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('{transactionId}', '.*')
|
|
66
|
+
);
|
|
67
|
+
if (match) {
|
|
68
|
+
return match[1];
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public static getTransactionId(grn: string): string|null {
|
|
74
|
+
const match = grn.match(grnFormat
|
|
75
|
+
.replace('{region}', '.*')
|
|
76
|
+
.replace('{ownerId}', '.*')
|
|
77
|
+
.replace('{namespaceName}', '.*')
|
|
78
|
+
.replace('{transactionId}', '(.*)')
|
|
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.getTransactionId(grn) == null || this.getTransactionId(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
|
+
transactionId: string|null,
|
|
107
|
+
): string|null {
|
|
108
|
+
return grnFormat
|
|
109
|
+
.replace('{region}', region ?? '')
|
|
110
|
+
.replace('{ownerId}', ownerId ?? '')
|
|
111
|
+
.replace('{namespaceName}', namespaceName ?? '')
|
|
112
|
+
.replace('{transactionId}', transactionId ?? '');
|
|
113
|
+
}
|
|
114
|
+
public getSubscribeTransactionId(): string|null {
|
|
115
|
+
return this.subscribeTransactionId;
|
|
116
|
+
}
|
|
117
|
+
public setSubscribeTransactionId(subscribeTransactionId: string|null) {
|
|
118
|
+
this.subscribeTransactionId = subscribeTransactionId;
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
public withSubscribeTransactionId(subscribeTransactionId: string|null): this {
|
|
122
|
+
this.subscribeTransactionId = subscribeTransactionId;
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
public getTransactionId(): string|null {
|
|
126
|
+
return this.transactionId;
|
|
127
|
+
}
|
|
128
|
+
public setTransactionId(transactionId: string|null) {
|
|
129
|
+
this.transactionId = transactionId;
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
public withTransactionId(transactionId: string|null): this {
|
|
133
|
+
this.transactionId = transactionId;
|
|
134
|
+
return this;
|
|
135
|
+
}
|
|
136
|
+
public getStore(): string|null {
|
|
137
|
+
return this.store;
|
|
138
|
+
}
|
|
139
|
+
public setStore(store: string|null) {
|
|
140
|
+
this.store = store;
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
public withStore(store: string|null): this {
|
|
144
|
+
this.store = store;
|
|
145
|
+
return this;
|
|
146
|
+
}
|
|
147
|
+
public getUserId(): string|null {
|
|
148
|
+
return this.userId;
|
|
149
|
+
}
|
|
150
|
+
public setUserId(userId: string|null) {
|
|
151
|
+
this.userId = userId;
|
|
152
|
+
return this;
|
|
153
|
+
}
|
|
154
|
+
public withUserId(userId: string|null): this {
|
|
155
|
+
this.userId = userId;
|
|
156
|
+
return this;
|
|
157
|
+
}
|
|
158
|
+
public getStatus(): string|null {
|
|
159
|
+
return this.status;
|
|
160
|
+
}
|
|
161
|
+
public setStatus(status: string|null) {
|
|
162
|
+
this.status = status;
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
public withStatus(status: string|null): this {
|
|
166
|
+
this.status = status;
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
public getStatusDetail(): string|null {
|
|
170
|
+
return this.statusDetail;
|
|
171
|
+
}
|
|
172
|
+
public setStatusDetail(statusDetail: string|null) {
|
|
173
|
+
this.statusDetail = statusDetail;
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
public withStatusDetail(statusDetail: string|null): this {
|
|
177
|
+
this.statusDetail = statusDetail;
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
180
|
+
public getExpiresAt(): number|null {
|
|
181
|
+
return this.expiresAt;
|
|
182
|
+
}
|
|
183
|
+
public setExpiresAt(expiresAt: number|null) {
|
|
184
|
+
this.expiresAt = expiresAt;
|
|
185
|
+
return this;
|
|
186
|
+
}
|
|
187
|
+
public withExpiresAt(expiresAt: number|null): this {
|
|
188
|
+
this.expiresAt = expiresAt;
|
|
189
|
+
return this;
|
|
190
|
+
}
|
|
191
|
+
public getCreatedAt(): number|null {
|
|
192
|
+
return this.createdAt;
|
|
193
|
+
}
|
|
194
|
+
public setCreatedAt(createdAt: number|null) {
|
|
195
|
+
this.createdAt = createdAt;
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
public withCreatedAt(createdAt: number|null): this {
|
|
199
|
+
this.createdAt = createdAt;
|
|
200
|
+
return this;
|
|
201
|
+
}
|
|
202
|
+
public getUpdatedAt(): number|null {
|
|
203
|
+
return this.updatedAt;
|
|
204
|
+
}
|
|
205
|
+
public setUpdatedAt(updatedAt: number|null) {
|
|
206
|
+
this.updatedAt = updatedAt;
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
public withUpdatedAt(updatedAt: number|null): this {
|
|
210
|
+
this.updatedAt = updatedAt;
|
|
211
|
+
return this;
|
|
212
|
+
}
|
|
213
|
+
public getRevision(): number|null {
|
|
214
|
+
return this.revision;
|
|
215
|
+
}
|
|
216
|
+
public setRevision(revision: number|null) {
|
|
217
|
+
this.revision = revision;
|
|
218
|
+
return this;
|
|
219
|
+
}
|
|
220
|
+
public withRevision(revision: number|null): this {
|
|
221
|
+
this.revision = revision;
|
|
222
|
+
return this;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
public static fromDict(data: {[key: string]: any}): SubscribeTransaction|null {
|
|
226
|
+
if (data == undefined || data == null) {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
return new SubscribeTransaction()
|
|
230
|
+
.withSubscribeTransactionId(data["subscribeTransactionId"])
|
|
231
|
+
.withTransactionId(data["transactionId"])
|
|
232
|
+
.withStore(data["store"])
|
|
233
|
+
.withUserId(data["userId"])
|
|
234
|
+
.withStatus(data["status"])
|
|
235
|
+
.withStatusDetail(data["statusDetail"])
|
|
236
|
+
.withExpiresAt(data["expiresAt"])
|
|
237
|
+
.withCreatedAt(data["createdAt"])
|
|
238
|
+
.withUpdatedAt(data["updatedAt"])
|
|
239
|
+
.withRevision(data["revision"]);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
public toDict(): {[key: string]: any} {
|
|
243
|
+
return {
|
|
244
|
+
"subscribeTransactionId": this.getSubscribeTransactionId(),
|
|
245
|
+
"transactionId": this.getTransactionId(),
|
|
246
|
+
"store": this.getStore(),
|
|
247
|
+
"userId": this.getUserId(),
|
|
248
|
+
"status": this.getStatus(),
|
|
249
|
+
"statusDetail": this.getStatusDetail(),
|
|
250
|
+
"expiresAt": this.getExpiresAt(),
|
|
251
|
+
"createdAt": this.getCreatedAt(),
|
|
252
|
+
"updatedAt": this.getUpdatedAt(),
|
|
253
|
+
"revision": this.getRevision(),
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
package/money2/model/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Namespace from "./Namespace";
|
|
2
2
|
import Wallet from "./Wallet";
|
|
3
3
|
import Event from "./Event";
|
|
4
|
+
import SubscribeTransaction from "./SubscribeTransaction";
|
|
4
5
|
import StoreContentModel from "./StoreContentModel";
|
|
5
6
|
import StoreContentModelMaster from "./StoreContentModelMaster";
|
|
6
7
|
import CurrentModelMaster from "./CurrentModelMaster";
|
|
@@ -14,13 +15,15 @@ import DepositTransaction from "./DepositTransaction";
|
|
|
14
15
|
import VerifyReceiptEvent from "./VerifyReceiptEvent";
|
|
15
16
|
import DepositEvent from "./DepositEvent";
|
|
16
17
|
import WithdrawEvent from "./WithdrawEvent";
|
|
18
|
+
import RefundEvent from "./RefundEvent";
|
|
17
19
|
import AppleAppStoreVerifyReceiptEvent from "./AppleAppStoreVerifyReceiptEvent";
|
|
18
20
|
import GooglePlayVerifyReceiptEvent from "./GooglePlayVerifyReceiptEvent";
|
|
19
21
|
import AppleAppStoreContent from "./AppleAppStoreContent";
|
|
20
22
|
import GooglePlayContent from "./GooglePlayContent";
|
|
23
|
+
import GooglePlayRealtimeNotificationMessage from "./GooglePlayRealtimeNotificationMessage";
|
|
21
24
|
import GitHubCheckoutSetting from "./GitHubCheckoutSetting";
|
|
22
25
|
import ScriptSetting from "./ScriptSetting";
|
|
23
26
|
import LogSetting from "./LogSetting";
|
|
24
27
|
import DailyTransactionHistory from "./DailyTransactionHistory";
|
|
25
28
|
import UnusedBalance from "./UnusedBalance";
|
|
26
|
-
export { Namespace, Wallet, Event, StoreContentModel, StoreContentModelMaster, CurrentModelMaster, Receipt, PlatformSetting, AppleAppStoreSetting, GooglePlaySetting, FakeSetting, WalletSummary, DepositTransaction, VerifyReceiptEvent, DepositEvent, WithdrawEvent, AppleAppStoreVerifyReceiptEvent, GooglePlayVerifyReceiptEvent, AppleAppStoreContent, GooglePlayContent, GitHubCheckoutSetting, ScriptSetting, LogSetting, DailyTransactionHistory, UnusedBalance, };
|
|
29
|
+
export { Namespace, Wallet, Event, SubscribeTransaction, StoreContentModel, StoreContentModelMaster, CurrentModelMaster, Receipt, PlatformSetting, AppleAppStoreSetting, GooglePlaySetting, FakeSetting, WalletSummary, DepositTransaction, VerifyReceiptEvent, DepositEvent, WithdrawEvent, RefundEvent, AppleAppStoreVerifyReceiptEvent, GooglePlayVerifyReceiptEvent, AppleAppStoreContent, GooglePlayContent, GooglePlayRealtimeNotificationMessage, GitHubCheckoutSetting, ScriptSetting, LogSetting, DailyTransactionHistory, UnusedBalance, };
|