@chevre/domain 20.1.0-alpha.0 → 20.1.0-alpha.10
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/example/src/chevre/deleteEvents.ts +9 -1
- package/example/src/chevre/migrateEventOffersSellerMakesOffer.ts +127 -0
- package/lib/chevre/repo/action.js +42 -31
- package/lib/chevre/repo/assetTransaction.js +1 -1
- package/lib/chevre/repo/mongoose/model/action.js +12 -2
- package/lib/chevre/repo/mongoose/model/assetTransaction.js +3 -1
- package/lib/chevre/repo/mongoose/model/place.js +18 -0
- package/lib/chevre/service/assetTransaction/pay/factory.d.ts +1 -0
- package/lib/chevre/service/assetTransaction/pay/factory.js +5 -11
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +11 -17
- package/lib/chevre/service/delivery/factory.js +2 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +4 -0
- package/lib/chevre/service/offer/event/authorize.js +46 -10
- package/lib/chevre/service/offer.js +6 -6
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +6 -4
- package/lib/chevre/service/order/onOrderStatusChanged.js +5 -4
- package/lib/chevre/service/order/placeOrder.js +21 -11
- package/lib/chevre/service/order/returnOrder.js +3 -2
- package/lib/chevre/service/order/sendOrder.js +6 -4
- package/lib/chevre/service/payment/any/factory.d.ts +1 -0
- package/lib/chevre/service/payment/any/factory.js +4 -7
- package/lib/chevre/service/payment/any.d.ts +2 -0
- package/lib/chevre/service/payment/any.js +4 -2
- package/lib/chevre/service/transaction/orderProgramMembership.js +0 -3
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +6 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +3 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +3 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +3 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +5 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -4
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +4 -5
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +9 -6
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +4 -6
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -2
- package/lib/chevre/service/transaction.js +1 -14
- package/package.json +3 -3
- package/example/src/chevre/migrateEventOffersItemOfferedName.ts +0 -82
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmReservation.d.ts +0 -11
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmReservation.js +0 -187
|
@@ -47,26 +47,24 @@ function createReturnPointAwardActions(params) {
|
|
|
47
47
|
console.error('JSON.parse(awardAccountsStr) throws', error);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
// const transaction = params.transaction;
|
|
51
50
|
const order = params.order;
|
|
51
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
52
52
|
const purpose = {
|
|
53
|
-
project: order.project,
|
|
54
53
|
typeOf: order.typeOf,
|
|
55
54
|
seller: order.seller,
|
|
56
55
|
// mask
|
|
57
|
-
customer:
|
|
58
|
-
|
|
56
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id, name: maskedCustomer.name },
|
|
57
|
+
// IOrderへ移行(2022-11-17~)
|
|
58
|
+
// confirmationNumber: order.confirmationNumber,
|
|
59
59
|
orderNumber: order.orderNumber,
|
|
60
60
|
price: order.price,
|
|
61
61
|
priceCurrency: order.priceCurrency,
|
|
62
62
|
orderDate: order.orderDate
|
|
63
63
|
};
|
|
64
64
|
const recipient = {
|
|
65
|
-
// project: { typeOf: transaction.project.typeOf, id: transaction.project.id },
|
|
66
65
|
typeOf: order.seller.typeOf,
|
|
67
66
|
id: order.seller.id,
|
|
68
67
|
name: order.seller.name
|
|
69
|
-
// url: order.seller.url
|
|
70
68
|
};
|
|
71
69
|
// ポイントインセンティブの数だけ、返却アクションを作成
|
|
72
70
|
returnPointAwardActions.push(...pointAwardIdentifiers.map((pointAwardIdentifier) => {
|
|
@@ -18,12 +18,13 @@ function createSendEmailMessaegActionsOnReturn(params) {
|
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const order = params.order;
|
|
20
20
|
const sendActionPurpose = {
|
|
21
|
-
project: order.project,
|
|
21
|
+
// project: order.project,
|
|
22
22
|
typeOf: order.typeOf,
|
|
23
23
|
seller: order.seller,
|
|
24
24
|
// mask
|
|
25
25
|
customer: (0, order_1.createMaskedCustomer)(order),
|
|
26
|
-
|
|
26
|
+
// IOrderへ移行(2022-11-17~)
|
|
27
|
+
// confirmationNumber: order.confirmationNumber,
|
|
27
28
|
orderNumber: order.orderNumber,
|
|
28
29
|
price: order.price,
|
|
29
30
|
priceCurrency: order.priceCurrency,
|
|
@@ -53,26 +53,13 @@ function updateAgent(params) {
|
|
|
53
53
|
const newAgent = {
|
|
54
54
|
typeOf: transaction.agent.typeOf,
|
|
55
55
|
id: transaction.agent.id
|
|
56
|
-
// 不要なので廃止(2022-05-26~)
|
|
57
|
-
// ...(Array.isArray(params.agent.additionalProperty)) ? { additionalProperty: params.agent.additionalProperty } : {},
|
|
58
|
-
// ...(typeof params.agent.age === 'string') ? { age: params.agent.age } : {},
|
|
59
|
-
// ...(typeof params.agent.address === 'string') ? { address: params.agent.address } : {},
|
|
60
|
-
// ...(typeof params.agent.email === 'string') ? { email: params.agent.email } : {},
|
|
61
|
-
// ...(typeof params.agent.familyName === 'string') ? { familyName: params.agent.familyName } : {},
|
|
62
|
-
// ...(typeof params.agent.gender === 'string') ? { gender: params.agent.gender } : {},
|
|
63
|
-
// ...(typeof params.agent.givenName === 'string') ? { givenName: params.agent.givenName } : {},
|
|
64
|
-
// ...(typeof params.agent.name === 'string') ? { name: params.agent.name } : {},
|
|
65
|
-
// ...(typeof formattedTelephone === 'string') ? { telephone: formattedTelephone } : {},
|
|
66
|
-
// ...(typeof params.agent.url === 'string') ? { url: params.agent.url } : {}
|
|
67
56
|
};
|
|
68
57
|
// 注文取引の場合、object.customerにも適用
|
|
69
58
|
let customer;
|
|
70
59
|
if (transaction.typeOf === factory.transactionType.PlaceOrder) {
|
|
71
60
|
// いったんtransaction.object.customer?.typeOfは取引開始時にセットされている前提
|
|
72
61
|
if (typeof ((_a = transaction.object.customer) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') {
|
|
73
|
-
customer = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(
|
|
74
|
-
? { project: transaction.object.customer.project }
|
|
75
|
-
: undefined), (Array.isArray(transaction.object.customer.identifier))
|
|
62
|
+
customer = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ typeOf: transaction.object.customer.typeOf, id: transaction.object.customer.id }, (Array.isArray(transaction.object.customer.identifier))
|
|
76
63
|
? { identifier: transaction.object.customer.identifier }
|
|
77
64
|
: undefined), (transaction.object.customer.typeOf === factory.personType.Person
|
|
78
65
|
&& typeof ((_b = transaction.object.customer.memberOf) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string')
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.
|
|
13
|
-
"@cinerino/sdk": "3.132.
|
|
12
|
+
"@chevre/factory": "4.278.0-alpha.1",
|
|
13
|
+
"@cinerino/sdk": "3.132.1",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.1.0-alpha.
|
|
123
|
+
"version": "20.1.0-alpha.10"
|
|
124
124
|
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// tslint:disable:no-console
|
|
2
|
-
import * as moment from 'moment';
|
|
3
|
-
import * as mongoose from 'mongoose';
|
|
4
|
-
|
|
5
|
-
import { chevre } from '../../../lib/index';
|
|
6
|
-
|
|
7
|
-
// const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
-
|
|
9
|
-
async function main() {
|
|
10
|
-
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
11
|
-
|
|
12
|
-
const eventRepo = new chevre.repository.Event(mongoose.connection);
|
|
13
|
-
const productRepo = new chevre.repository.Product(mongoose.connection);
|
|
14
|
-
|
|
15
|
-
const cursor = eventRepo.getCursor(
|
|
16
|
-
{
|
|
17
|
-
// 'project.id': { $eq: project.id },
|
|
18
|
-
'project.id': { $ne: '' },
|
|
19
|
-
typeOf: { $eq: chevre.factory.eventType.ScreeningEvent },
|
|
20
|
-
startDate: {
|
|
21
|
-
$gte: moment()
|
|
22
|
-
.add(-1, 'month')
|
|
23
|
-
.toDate()
|
|
24
|
-
}
|
|
25
|
-
// _id: { $eq: 'al6afd7np' }
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
// _id: 1,
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
console.log('events found');
|
|
32
|
-
|
|
33
|
-
let i = 0;
|
|
34
|
-
let updateCount = 0;
|
|
35
|
-
await cursor.eachAsync(async (doc) => {
|
|
36
|
-
i += 1;
|
|
37
|
-
const event: chevre.factory.event.screeningEvent.IEvent = doc.toObject();
|
|
38
|
-
|
|
39
|
-
const itemOfferedId = (<chevre.factory.event.screeningEvent.IOffer | undefined>event.offers)?.itemOffered?.id;
|
|
40
|
-
const itemOfferedName = (<any>event.offers)?.itemOffered?.name?.ja;
|
|
41
|
-
|
|
42
|
-
if (typeof itemOfferedName === 'string' && itemOfferedName.length > 0) {
|
|
43
|
-
console.log(
|
|
44
|
-
'already exist...', event.project.id, event.id, event.startDate, itemOfferedId, i);
|
|
45
|
-
} else {
|
|
46
|
-
const existingProducts = await productRepo.search({
|
|
47
|
-
limit: 1,
|
|
48
|
-
page: 1,
|
|
49
|
-
project: { id: { $eq: event.project.id } },
|
|
50
|
-
id: { $eq: itemOfferedId }
|
|
51
|
-
});
|
|
52
|
-
const existingProduct = existingProducts.shift();
|
|
53
|
-
if (existingProduct === undefined) {
|
|
54
|
-
// throw new Error(`product not found ${event.id}`);
|
|
55
|
-
// no op
|
|
56
|
-
} else {
|
|
57
|
-
const newItemOfferedName: string = (typeof existingProduct.name === 'string')
|
|
58
|
-
? existingProduct.name
|
|
59
|
-
: String(existingProduct.name?.ja);
|
|
60
|
-
console.log(
|
|
61
|
-
'updating event...', event.project.id, event.id, event.startDate, itemOfferedId, newItemOfferedName, i);
|
|
62
|
-
await eventRepo.updatePartiallyById({
|
|
63
|
-
id: event.id,
|
|
64
|
-
attributes: <any>{
|
|
65
|
-
typeOf: event.typeOf,
|
|
66
|
-
'offers.itemOffered.name': { ja: newItemOfferedName }
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
updateCount += 1;
|
|
71
|
-
console.log(
|
|
72
|
-
'updated', event.project.id, event.id, event.startDate, itemOfferedId, i);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
console.log(i, 'events checked');
|
|
77
|
-
console.log(updateCount, 'events updated');
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
main()
|
|
81
|
-
.then()
|
|
82
|
-
.catch(console.error);
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmReservation.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as factory from '../../../../factory';
|
|
2
|
-
export declare type IAuthorizeSeatReservationOffer = factory.action.authorize.offer.seatReservation.IAction<factory.service.webAPI.Identifier>;
|
|
3
|
-
/**
|
|
4
|
-
* 予約確定アクションを作成する
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* 予約確定オブジェクトを作成する
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* 予約確定オブジェクトを作成する
|
|
11
|
-
*/
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/confirmReservation.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { PhoneNumberFormat, PhoneNumberUtil } from 'google-libphonenumber';
|
|
3
|
-
// import { format } from 'util';
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
/**
|
|
6
|
-
* 予約確定アクションを作成する
|
|
7
|
-
*/
|
|
8
|
-
// export async function createConfirmReservationActions(params: {
|
|
9
|
-
// order: factory.order.IOrder;
|
|
10
|
-
// transaction: factory.transaction.placeOrder.ITransaction;
|
|
11
|
-
// createConfirmReserveActions: boolean;
|
|
12
|
-
// }): Promise<factory.action.interact.confirm.reservation.IAttributes<factory.service.webAPI.Identifier>[]> {
|
|
13
|
-
// const confirmReservationActions: factory.action.interact.confirm.reservation.IAttributes<factory.service.webAPI.Identifier>[] = [];
|
|
14
|
-
// const seatReservationAuthorizeActions = <IAuthorizeSeatReservationOffer[]>
|
|
15
|
-
// params.transaction.object.authorizeActions
|
|
16
|
-
// .filter((a) => a.actionStatus === factory.actionStatusType.CompletedActionStatus)
|
|
17
|
-
// .filter((a) => a.object.typeOf === factory.action.authorize.offer.seatReservation.ObjectType.SeatReservation);
|
|
18
|
-
// const purpose: factory.order.ISimpleOrder = createPurpose({ order: params.order });
|
|
19
|
-
// seatReservationAuthorizeActions.forEach((a) => {
|
|
20
|
-
// const actionResult = a.result;
|
|
21
|
-
// if (a.instrument === undefined) {
|
|
22
|
-
// a.instrument = {
|
|
23
|
-
// typeOf: 'WebAPI',
|
|
24
|
-
// identifier: factory.service.webAPI.Identifier.Chevre
|
|
25
|
-
// };
|
|
26
|
-
// }
|
|
27
|
-
// if (actionResult !== undefined) {
|
|
28
|
-
// const responseBody = actionResult.responseBody;
|
|
29
|
-
// let confirmReservationObject: factory.action.interact.confirm.reservation.IObject<factory.service.webAPI.Identifier.Chevre>
|
|
30
|
-
// | factory.action.interact.confirm.reservation.IObject<factory.service.webAPI.Identifier.COA>;
|
|
31
|
-
// switch (a.instrument.identifier) {
|
|
32
|
-
// case factory.service.webAPI.Identifier.COA:
|
|
33
|
-
// confirmReservationObject = createConfirmReservationActionObject4COA({
|
|
34
|
-
// order: params.order,
|
|
35
|
-
// // tslint:disable-next-line:max-line-length
|
|
36
|
-
// tslint:disable-next-line:max-line-length
|
|
37
|
-
// reserveTransaction: <factory.action.authorize.offer.seatReservation.IResponseBody<factory.service.webAPI.Identifier.COA>>responseBody,
|
|
38
|
-
// requestBody: actionResult.requestBody,
|
|
39
|
-
// price: Number(actionResult.price),
|
|
40
|
-
// acceptedOffers: <factory.action.authorize.offer.seatReservation.IAcceptedOffer4COA[]>a.object.acceptedOffer
|
|
41
|
-
// });
|
|
42
|
-
// break;
|
|
43
|
-
// default:
|
|
44
|
-
// const reserveTransactionNumber = a.object.pendingTransaction?.transactionNumber;
|
|
45
|
-
// if (typeof reserveTransactionNumber !== 'string') {
|
|
46
|
-
// throw new factory.errors.NotFound('AuthorizaAction.object.pendingTransaction.transactionNumber');
|
|
47
|
-
// }
|
|
48
|
-
// confirmReservationObject = createConfirmReservationActionObject({
|
|
49
|
-
// order: params.order,
|
|
50
|
-
// // transaction: params.transaction,
|
|
51
|
-
// // tslint:disable-next-line:max-line-length
|
|
52
|
-
// tslint:disable-next-line:max-line-length
|
|
53
|
-
// // reserveTransaction: <factory.action.authorize.offer.seatReservation.IResponseBody<factory.service.webAPI.Identifier.Chevre>>responseBody,
|
|
54
|
-
// reserveTransactionNumber
|
|
55
|
-
// });
|
|
56
|
-
// }
|
|
57
|
-
// if (params.createConfirmReserveActions) {
|
|
58
|
-
// confirmReservationActions.push({
|
|
59
|
-
// project: params.transaction.project,
|
|
60
|
-
// typeOf: <factory.actionType.ConfirmAction>factory.actionType.ConfirmAction,
|
|
61
|
-
// object: confirmReservationObject,
|
|
62
|
-
// // agent: Projectに統一(2022-05-16~)
|
|
63
|
-
// agent: params.transaction.project,
|
|
64
|
-
// // agent: params.transaction.agent,
|
|
65
|
-
// purpose: purpose,
|
|
66
|
-
// instrument: a.instrument
|
|
67
|
-
// });
|
|
68
|
-
// }
|
|
69
|
-
// }
|
|
70
|
-
// });
|
|
71
|
-
// return confirmReservationActions;
|
|
72
|
-
// }
|
|
73
|
-
// function createPurpose(params: {
|
|
74
|
-
// order: factory.order.IOrder;
|
|
75
|
-
// }): factory.order.ISimpleOrder {
|
|
76
|
-
// return {
|
|
77
|
-
// project: params.order.project,
|
|
78
|
-
// typeOf: params.order.typeOf,
|
|
79
|
-
// seller: params.order.seller,
|
|
80
|
-
// // mask
|
|
81
|
-
// customer: createMaskedCustomer(params.order),
|
|
82
|
-
// confirmationNumber: params.order.confirmationNumber,
|
|
83
|
-
// orderNumber: params.order.orderNumber,
|
|
84
|
-
// price: params.order.price,
|
|
85
|
-
// priceCurrency: params.order.priceCurrency,
|
|
86
|
-
// orderDate: params.order.orderDate
|
|
87
|
-
// };
|
|
88
|
-
// }
|
|
89
|
-
/**
|
|
90
|
-
* 予約確定オブジェクトを作成する
|
|
91
|
-
*/
|
|
92
|
-
// function createConfirmReservationActionObject4COA(params: {
|
|
93
|
-
// order: factory.order.IOrder;
|
|
94
|
-
// reserveTransaction: factory.action.authorize.offer.seatReservation.IResponseBody<factory.service.webAPI.Identifier.COA>;
|
|
95
|
-
// requestBody: any;
|
|
96
|
-
// price: number;
|
|
97
|
-
// acceptedOffers: factory.action.authorize.offer.seatReservation.IAcceptedOffer4COA[];
|
|
98
|
-
// }): factory.action.interact.confirm.reservation.IObject<factory.service.webAPI.Identifier.COA> {
|
|
99
|
-
// const price = params.price;
|
|
100
|
-
// const customer = params.order.customer;
|
|
101
|
-
// const updTmpReserveSeatArgs = params.requestBody;
|
|
102
|
-
// const updTmpReserveSeatResult = params.reserveTransaction;
|
|
103
|
-
// // 電話番号のフォーマットを日本人にリーダブルに調整(COAではこのフォーマットで扱うので)
|
|
104
|
-
// const phoneUtil = PhoneNumberUtil.getInstance();
|
|
105
|
-
// const phoneNumber = phoneUtil.parse(customer.telephone, 'JP');
|
|
106
|
-
// let telNum = phoneUtil.format(phoneNumber, PhoneNumberFormat.NATIONAL);
|
|
107
|
-
// // COAでは数字のみ受け付けるので数字以外を除去
|
|
108
|
-
// telNum = telNum.replace(/[^\d]/g, '');
|
|
109
|
-
// const mailAddr = customer.email;
|
|
110
|
-
// if (mailAddr === undefined) {
|
|
111
|
-
// throw new factory.errors.Argument('order', 'order.customer.email undefined');
|
|
112
|
-
// }
|
|
113
|
-
// return {
|
|
114
|
-
// theaterCode: updTmpReserveSeatArgs.theaterCode,
|
|
115
|
-
// dateJouei: updTmpReserveSeatArgs.dateJouei,
|
|
116
|
-
// titleCode: updTmpReserveSeatArgs.titleCode,
|
|
117
|
-
// titleBranchNum: updTmpReserveSeatArgs.titleBranchNum,
|
|
118
|
-
// timeBegin: updTmpReserveSeatArgs.timeBegin,
|
|
119
|
-
// tmpReserveNum: updTmpReserveSeatResult.tmpReserveNum,
|
|
120
|
-
// tslint:disable-next-line:no-irregular-whitespace
|
|
121
|
-
// reserveName: format('%s %s', customer.familyName, customer.givenName),
|
|
122
|
-
// tslint:disable-next-line:no-irregular-whitespace
|
|
123
|
-
// reserveNameJkana: format('%s %s', customer.familyName, customer.givenName),
|
|
124
|
-
// telNum: telNum,
|
|
125
|
-
// mailAddr: mailAddr,
|
|
126
|
-
// reserveAmount: price, // デフォルトのpriceCurrencyがJPYなのでこれでよし
|
|
127
|
-
// listTicket: params.acceptedOffers.map((o) => o.ticketInfo),
|
|
128
|
-
// transactionNumber: String(updTmpReserveSeatResult.tmpReserveNum),
|
|
129
|
-
// typeOf: 'COAReserveTransaction'
|
|
130
|
-
// };
|
|
131
|
-
// }
|
|
132
|
-
/**
|
|
133
|
-
* 予約確定オブジェクトを作成する
|
|
134
|
-
*/
|
|
135
|
-
// function createConfirmReservationActionObject(params: {
|
|
136
|
-
// order: factory.order.IOrder;
|
|
137
|
-
// reserveTransactionNumber: string;
|
|
138
|
-
// }): factory.action.interact.confirm.reservation.IObject<factory.service.webAPI.Identifier.Chevre> {
|
|
139
|
-
// return {
|
|
140
|
-
// typeOf: factory.assetTransactionType.Reserve,
|
|
141
|
-
// transactionNumber: params.reserveTransactionNumber,
|
|
142
|
-
// potentialActions: {
|
|
143
|
-
// reserve: {
|
|
144
|
-
// purpose: {
|
|
145
|
-
// confirmationNumber: params.order.confirmationNumber,
|
|
146
|
-
// orderNumber: params.order.orderNumber,
|
|
147
|
-
// typeOf: params.order.typeOf
|
|
148
|
-
// }
|
|
149
|
-
// }
|
|
150
|
-
// }
|
|
151
|
-
// };
|
|
152
|
-
// }
|
|
153
|
-
// function createReservationUnderNameIdentifier(params: {
|
|
154
|
-
// order: factory.order.IOrder;
|
|
155
|
-
// transaction: factory.transaction.placeOrder.ITransaction;
|
|
156
|
-
// }): factory.propertyValue.IPropertyValue<string>[] {
|
|
157
|
-
// const order = params.order;
|
|
158
|
-
// const customer = order.customer;
|
|
159
|
-
// // 予約のunderName.identifierを決定する
|
|
160
|
-
// return [
|
|
161
|
-
// { name: 'orderNumber', value: order.orderNumber },
|
|
162
|
-
// // 不要なので廃止(2022-05-24~)
|
|
163
|
-
// // { name: 'transaction', value: params.transaction.id },
|
|
164
|
-
// // ↓legacy-reservationの印刷アウトプットで使用(2022-02-09廃止)
|
|
165
|
-
// // { name: 'paymentMethod', value: paymentMethodNames },
|
|
166
|
-
// ...(Array.isArray(customer.identifier)) ? customer.identifier : []
|
|
167
|
-
// ];
|
|
168
|
-
// }
|
|
169
|
-
// function createReservationUnderName(params: {
|
|
170
|
-
// order: factory.order.IOrder;
|
|
171
|
-
// identifier: factory.propertyValue.IPropertyValue<string>[];
|
|
172
|
-
// }): factory.reservation.IUnderName<factory.reservationType.EventReservation> {
|
|
173
|
-
// return {
|
|
174
|
-
// identifier: params.identifier,
|
|
175
|
-
// name: String(params.order.customer.name),
|
|
176
|
-
// typeOf: params.order.customer.typeOf,
|
|
177
|
-
// ...(typeof params.order.customer.address === 'string') ? { address: params.order.customer.address } : undefined,
|
|
178
|
-
// ...(typeof params.order.customer.age === 'string') ? { age: params.order.customer.age } : undefined,
|
|
179
|
-
// ...(typeof params.order.customer.email === 'string') ? { email: params.order.customer.email } : undefined,
|
|
180
|
-
// ...(typeof params.order.customer.familyName === 'string') ? { familyName: params.order.customer.familyName } : undefined,
|
|
181
|
-
// ...(typeof params.order.customer.gender === 'string') ? { gender: params.order.customer.gender } : undefined,
|
|
182
|
-
// ...(typeof params.order.customer.givenName === 'string') ? { givenName: params.order.customer.givenName } : undefined,
|
|
183
|
-
// ...(typeof params.order.customer.id === 'string') ? { id: params.order.customer.id } : undefined,
|
|
184
|
-
// ...(typeof params.order.customer.telephone === 'string') ? { telephone: params.order.customer.telephone } : undefined,
|
|
185
|
-
// ...(typeof params.order.customer.url === 'string') ? { url: params.order.customer.url } : undefined
|
|
186
|
-
// };
|
|
187
|
-
// }
|