@cinerino/sdk 3.34.0 → 3.35.0
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.
|
@@ -13704,37 +13704,7 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
|
|
|
13704
13704
|
});
|
|
13705
13705
|
};
|
|
13706
13706
|
/**
|
|
13707
|
-
*
|
|
13708
|
-
*/
|
|
13709
|
-
// public async openAccount(params: {
|
|
13710
|
-
// /**
|
|
13711
|
-
// * 未指定の場合`me`がセットされます
|
|
13712
|
-
// */
|
|
13713
|
-
// id?: string;
|
|
13714
|
-
// /**
|
|
13715
|
-
// * 口座名義
|
|
13716
|
-
// */
|
|
13717
|
-
// name: string;
|
|
13718
|
-
// /**
|
|
13719
|
-
// * 口座タイプ
|
|
13720
|
-
// */
|
|
13721
|
-
// accountType: string;
|
|
13722
|
-
// }): Promise<factory.transaction.placeOrder.IResult> {
|
|
13723
|
-
// const id = (typeof params.id === 'string') ? params.id : 'me';
|
|
13724
|
-
// return this.fetch({
|
|
13725
|
-
// uri: `/people/${id}/ownershipInfos/accounts/${params.accountType}`,
|
|
13726
|
-
// method: 'POST',
|
|
13727
|
-
// body: {
|
|
13728
|
-
// name: params.name
|
|
13729
|
-
// },
|
|
13730
|
-
// expectedStatusCodes: [CREATED]
|
|
13731
|
-
// })
|
|
13732
|
-
// .then(async (response) => response.json());
|
|
13733
|
-
// }
|
|
13734
|
-
/**
|
|
13735
|
-
* 口座解約
|
|
13736
|
-
* 口座の状態を変更するだけで、ユーザーの所有する口座リストから削除はされません。
|
|
13737
|
-
* 解約された口座で取引を進行しようとすると400エラーとなります。
|
|
13707
|
+
* ペイメントカード所有権削除
|
|
13738
13708
|
*/
|
|
13739
13709
|
PersonOwnershipInfoService.prototype.closeAccount = function (params) {
|
|
13740
13710
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -13939,6 +13909,28 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
|
|
|
13939
13909
|
});
|
|
13940
13910
|
});
|
|
13941
13911
|
};
|
|
13912
|
+
/**
|
|
13913
|
+
* 会員所有権削除
|
|
13914
|
+
*/
|
|
13915
|
+
PersonOwnershipInfoService.prototype.deleteOwnershipInfoById = function (params) {
|
|
13916
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
13917
|
+
var id;
|
|
13918
|
+
return __generator(this, function (_a) {
|
|
13919
|
+
switch (_a.label) {
|
|
13920
|
+
case 0:
|
|
13921
|
+
id = (typeof params.id === 'string') ? params.id : 'me';
|
|
13922
|
+
return [4 /*yield*/, this.fetch({
|
|
13923
|
+
uri: "/people/" + id + "/ownershipInfos/" + String(params.ownershipInfoId),
|
|
13924
|
+
method: 'DELETE',
|
|
13925
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
13926
|
+
})];
|
|
13927
|
+
case 1:
|
|
13928
|
+
_a.sent();
|
|
13929
|
+
return [2 /*return*/];
|
|
13930
|
+
}
|
|
13931
|
+
});
|
|
13932
|
+
});
|
|
13933
|
+
};
|
|
13942
13934
|
return PersonOwnershipInfoService;
|
|
13943
13935
|
}(service_1.Service));
|
|
13944
13936
|
exports.PersonOwnershipInfoService = PersonOwnershipInfoService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// tslint:disable:no-console no-implicit-dependencies no-magic-numbers
|
|
2
2
|
import * as httpStatus from 'http-status';
|
|
3
|
-
|
|
3
|
+
import * as moment from 'moment';
|
|
4
4
|
|
|
5
5
|
import * as client from '../../../../lib/index';
|
|
6
6
|
import * as auth from '../../auth/auth';
|
|
@@ -18,18 +18,40 @@ async function main() {
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
console.log('searching...');
|
|
21
|
+
const now = new Date();
|
|
21
22
|
const result = await personService.fetch({
|
|
22
23
|
uri: '/people/me/ownershipInfos/PaymentCard',
|
|
23
24
|
method: 'GET',
|
|
24
25
|
qs: {
|
|
25
26
|
limit: 10,
|
|
26
|
-
page: 1
|
|
27
|
+
page: 1,
|
|
28
|
+
ownedFrom: moment(now)
|
|
29
|
+
.add(-1, 'seconds')
|
|
30
|
+
.toDate(),
|
|
31
|
+
ownedThrough: now
|
|
27
32
|
},
|
|
28
33
|
expectedStatusCodes: [httpStatus.OK]
|
|
29
34
|
})
|
|
30
35
|
.then(async (response) => response.json());
|
|
31
36
|
console.log(result);
|
|
32
37
|
console.log(result.map((o: any) => o.typeOfGood));
|
|
38
|
+
|
|
39
|
+
if (result.length > 0) {
|
|
40
|
+
// カード取引履歴検索
|
|
41
|
+
const paymentCardOwnershipInfo = result[result.length - 1];
|
|
42
|
+
const actions = await personService.fetch({
|
|
43
|
+
uri: `/people/me/ownershipInfos/PaymentCard/${paymentCardOwnershipInfo.id}/actions/moneyTransfer`,
|
|
44
|
+
method: 'GET',
|
|
45
|
+
qs: {
|
|
46
|
+
limit: 1,
|
|
47
|
+
page: 1
|
|
48
|
+
},
|
|
49
|
+
expectedStatusCodes: [httpStatus.OK]
|
|
50
|
+
})
|
|
51
|
+
.then(async (response) => response.json());
|
|
52
|
+
console.log(actions);
|
|
53
|
+
|
|
54
|
+
}
|
|
33
55
|
}
|
|
34
56
|
|
|
35
57
|
main()
|
|
@@ -41,31 +41,12 @@ async function main() {
|
|
|
41
41
|
});
|
|
42
42
|
console.log('transaction started', transaction.id);
|
|
43
43
|
|
|
44
|
-
const informUrl = process.env.LINE_NOTIFY_URL;
|
|
45
|
-
|
|
46
44
|
console.log('confirming transaction...');
|
|
47
45
|
await returnOrderService.confirm({
|
|
48
46
|
id: transaction.id,
|
|
49
47
|
potentialActions: {
|
|
50
48
|
returnOrder: {
|
|
51
49
|
potentialActions: {
|
|
52
|
-
cancelReservation: [
|
|
53
|
-
{
|
|
54
|
-
object: {
|
|
55
|
-
typeOf: client.factory.assetTransactionType.Reserve,
|
|
56
|
-
id: '5d6e593c0470230012b80b53'
|
|
57
|
-
},
|
|
58
|
-
potentialActions: {
|
|
59
|
-
cancelReservation: {
|
|
60
|
-
potentialActions: {
|
|
61
|
-
informReservation: [
|
|
62
|
-
{ recipient: { url: informUrl } }
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
50
|
/**
|
|
70
51
|
* クレジットカード返金アクションについてカスタマイズする場合に指定
|
|
71
52
|
*/
|
package/lib/bundle.js
CHANGED
|
@@ -13704,37 +13704,7 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
|
|
|
13704
13704
|
});
|
|
13705
13705
|
};
|
|
13706
13706
|
/**
|
|
13707
|
-
*
|
|
13708
|
-
*/
|
|
13709
|
-
// public async openAccount(params: {
|
|
13710
|
-
// /**
|
|
13711
|
-
// * 未指定の場合`me`がセットされます
|
|
13712
|
-
// */
|
|
13713
|
-
// id?: string;
|
|
13714
|
-
// /**
|
|
13715
|
-
// * 口座名義
|
|
13716
|
-
// */
|
|
13717
|
-
// name: string;
|
|
13718
|
-
// /**
|
|
13719
|
-
// * 口座タイプ
|
|
13720
|
-
// */
|
|
13721
|
-
// accountType: string;
|
|
13722
|
-
// }): Promise<factory.transaction.placeOrder.IResult> {
|
|
13723
|
-
// const id = (typeof params.id === 'string') ? params.id : 'me';
|
|
13724
|
-
// return this.fetch({
|
|
13725
|
-
// uri: `/people/${id}/ownershipInfos/accounts/${params.accountType}`,
|
|
13726
|
-
// method: 'POST',
|
|
13727
|
-
// body: {
|
|
13728
|
-
// name: params.name
|
|
13729
|
-
// },
|
|
13730
|
-
// expectedStatusCodes: [CREATED]
|
|
13731
|
-
// })
|
|
13732
|
-
// .then(async (response) => response.json());
|
|
13733
|
-
// }
|
|
13734
|
-
/**
|
|
13735
|
-
* 口座解約
|
|
13736
|
-
* 口座の状態を変更するだけで、ユーザーの所有する口座リストから削除はされません。
|
|
13737
|
-
* 解約された口座で取引を進行しようとすると400エラーとなります。
|
|
13707
|
+
* ペイメントカード所有権削除
|
|
13738
13708
|
*/
|
|
13739
13709
|
PersonOwnershipInfoService.prototype.closeAccount = function (params) {
|
|
13740
13710
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -13939,6 +13909,28 @@ var PersonOwnershipInfoService = /** @class */ (function (_super) {
|
|
|
13939
13909
|
});
|
|
13940
13910
|
});
|
|
13941
13911
|
};
|
|
13912
|
+
/**
|
|
13913
|
+
* 会員所有権削除
|
|
13914
|
+
*/
|
|
13915
|
+
PersonOwnershipInfoService.prototype.deleteOwnershipInfoById = function (params) {
|
|
13916
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
13917
|
+
var id;
|
|
13918
|
+
return __generator(this, function (_a) {
|
|
13919
|
+
switch (_a.label) {
|
|
13920
|
+
case 0:
|
|
13921
|
+
id = (typeof params.id === 'string') ? params.id : 'me';
|
|
13922
|
+
return [4 /*yield*/, this.fetch({
|
|
13923
|
+
uri: "/people/" + id + "/ownershipInfos/" + String(params.ownershipInfoId),
|
|
13924
|
+
method: 'DELETE',
|
|
13925
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
13926
|
+
})];
|
|
13927
|
+
case 1:
|
|
13928
|
+
_a.sent();
|
|
13929
|
+
return [2 /*return*/];
|
|
13930
|
+
}
|
|
13931
|
+
});
|
|
13932
|
+
});
|
|
13933
|
+
};
|
|
13942
13934
|
return PersonOwnershipInfoService;
|
|
13943
13935
|
}(service_1.Service));
|
|
13944
13936
|
exports.PersonOwnershipInfoService = PersonOwnershipInfoService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.35.0",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"watchify": "^3.11.1"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@cinerino/api-abstract-client": "3.
|
|
100
|
+
"@cinerino/api-abstract-client": "3.35.0",
|
|
101
101
|
"debug": "^3.2.6",
|
|
102
102
|
"http-status": "^1.4.2",
|
|
103
103
|
"idtoken-verifier": "^2.0.3",
|