@cinerino/sdk 16.3.0-alpha.8 → 16.3.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.
- package/lib/abstract/chevreAsset/order.js +1 -3
- package/lib/abstract/chevreConsole/aggregateOffer.d.ts +6 -4
- package/lib/abstract/chevreConsole/aggregateOffer.js +4 -8
- package/lib/abstract/chevreConsole/assetTransaction/pay.d.ts +0 -4
- package/lib/abstract/chevrePay/payment/factory.d.ts +6 -1
- package/lib/abstract/chevrePay/payment.d.ts +0 -21
- package/lib/abstract/chevrePay/payment.js +6 -12
- package/lib/abstract/chevreTxn/transaction/placeOrder/factory.d.ts +10 -2
- package/lib/abstract/chevreTxn/transaction/placeOrder.d.ts +1 -4
- package/lib/abstract/chevreTxn/transaction/returnOrder/factory.d.ts +86 -0
- package/lib/abstract/chevreTxn/transaction/returnOrder/factory.js +1 -0
- package/lib/abstract/chevreTxn/transaction/returnOrder.d.ts +2 -2
- package/lib/abstract/cinerino/service/emailMessage.d.ts +2 -14
- package/lib/abstract/cinerino/service/emailMessage.js +2 -2
- package/lib/abstract/cloud/asset/order.d.ts +6 -3
- package/lib/abstract/cloud/asset/order.js +1 -2
- package/lib/abstract/cloud/pay/payment.d.ts +0 -21
- package/lib/abstract/cloud/pay/payment.js +3 -15
- package/lib/abstract/cloud/txn/transaction/returnOrder.d.ts +2 -5
- package/lib/abstract/cloud/txn/transaction/returnOrder.js +0 -30
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +4 -4
- package/package.json +2 -2
|
@@ -38,9 +38,7 @@ class OrderService extends service_1.Service {
|
|
|
38
38
|
/**
|
|
39
39
|
* イベントIDと確認番号で検索
|
|
40
40
|
*/
|
|
41
|
-
async findByEventAndConfirmationNumber(params
|
|
42
|
-
// & IProjectionSearchConditions // discontinue(2024-07-24~)
|
|
43
|
-
) {
|
|
41
|
+
async findByEventAndConfirmationNumber(params) {
|
|
44
42
|
return this.fetch({
|
|
45
43
|
uri: '/orders/findByEventAndConfirmationNumber',
|
|
46
44
|
method: 'POST',
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { factory } from '../factory';
|
|
2
|
-
import {
|
|
2
|
+
import { Service } from '../service';
|
|
3
3
|
export interface IProjectionSearchConditions {
|
|
4
4
|
$projection?: {
|
|
5
5
|
[key in keyof factory.unitPriceOffer.IUnitPriceOffer]?: 0 | 1;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
type IAggregateOfferAsFindResult = Pick<factory.aggregateOffer.IAggregateOffer, 'id' | 'offers' | 'typeOf'>;
|
|
8
9
|
/**
|
|
9
10
|
* 集計オファーサービス
|
|
10
11
|
*/
|
|
11
12
|
export declare class AggregateOfferService extends Service {
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* 集計オファー検索
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
findAggregateOffers(params: Omit<factory.unitPriceOffer.ISearchConditions, 'project'> & IProjectionSearchConditions): Promise<IAggregateOfferAsFindResult[]>;
|
|
16
17
|
/**
|
|
17
18
|
* 集計オファー削除
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
deleteAggregateOfferById(params: {
|
|
20
21
|
id: string;
|
|
21
22
|
}): Promise<void>;
|
|
22
23
|
}
|
|
24
|
+
export {};
|
|
@@ -8,25 +8,21 @@ const service_1 = require("../service");
|
|
|
8
8
|
*/
|
|
9
9
|
class AggregateOfferService extends service_1.Service {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* 集計オファー検索
|
|
12
12
|
*/
|
|
13
|
-
async
|
|
13
|
+
async findAggregateOffers(params) {
|
|
14
14
|
return this.fetch({
|
|
15
15
|
uri: '/aggregateOffers',
|
|
16
16
|
method: 'GET',
|
|
17
17
|
qs: params,
|
|
18
18
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
19
19
|
})
|
|
20
|
-
.then(async (response) =>
|
|
21
|
-
return {
|
|
22
|
-
data: await response.json()
|
|
23
|
-
};
|
|
24
|
-
});
|
|
20
|
+
.then(async (response) => response.json());
|
|
25
21
|
}
|
|
26
22
|
/**
|
|
27
23
|
* 集計オファー削除
|
|
28
24
|
*/
|
|
29
|
-
async
|
|
25
|
+
async deleteAggregateOfferById(params) {
|
|
30
26
|
await this.fetch({
|
|
31
27
|
uri: `/aggregateOffers/${encodeURIComponent(String(params.id))}`,
|
|
32
28
|
method: 'DELETE',
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { ICheckMovieTicketResult } from '../../chevrePay/payment/factory';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
3
|
import { Service } from '../../service';
|
|
4
|
-
export interface IPublishPaymentUrlResult {
|
|
5
|
-
paymentMethodId: string;
|
|
6
|
-
paymentUrl: string;
|
|
7
|
-
}
|
|
8
4
|
/**
|
|
9
5
|
* 決済取引サービス
|
|
10
6
|
*/
|
|
@@ -47,7 +47,12 @@ export type IPublishPaymentUrlObject = Pick<factory.action.authorize.paymentMeth
|
|
|
47
47
|
*/
|
|
48
48
|
eventIdsAsOrderedItem: string[];
|
|
49
49
|
};
|
|
50
|
-
export type IPublishPaymentUrlResult = Pick<factory.action.accept.pay.IResult, 'paymentMethodId'
|
|
50
|
+
export type IPublishPaymentUrlResult = Pick<factory.action.accept.pay.IResult, 'paymentMethodId'> & {
|
|
51
|
+
/**
|
|
52
|
+
* 外部決済URL
|
|
53
|
+
*/
|
|
54
|
+
paymentUrl: string;
|
|
55
|
+
};
|
|
51
56
|
export interface IFindAuthorizeActionResult {
|
|
52
57
|
/**
|
|
53
58
|
* 承認アクションID
|
|
@@ -37,13 +37,6 @@ export declare class PaymentService extends Service {
|
|
|
37
37
|
authorizeCreditCard(params: {
|
|
38
38
|
object: IAuthorizeCreditCardObject;
|
|
39
39
|
purpose: IPurpose;
|
|
40
|
-
instrumentOptions: {
|
|
41
|
-
/**
|
|
42
|
-
* 対応決済方法オファーIDリスト
|
|
43
|
-
* 最大20件
|
|
44
|
-
*/
|
|
45
|
-
acceptedPaymentMethodOfferIds: string[];
|
|
46
|
-
};
|
|
47
40
|
}): Promise<IAuthorizeResult>;
|
|
48
41
|
/**
|
|
49
42
|
* 決済カード決済承認
|
|
@@ -53,13 +46,6 @@ export declare class PaymentService extends Service {
|
|
|
53
46
|
ticketToken: string;
|
|
54
47
|
};
|
|
55
48
|
purpose: IPurpose;
|
|
56
|
-
instrumentOptions: {
|
|
57
|
-
/**
|
|
58
|
-
* 対応決済方法オファーIDリスト
|
|
59
|
-
* 最大20件
|
|
60
|
-
*/
|
|
61
|
-
acceptedPaymentMethodOfferIds: string[];
|
|
62
|
-
};
|
|
63
49
|
}, options: {
|
|
64
50
|
/**
|
|
65
51
|
* 決済カード認証アクションID
|
|
@@ -74,13 +60,6 @@ export declare class PaymentService extends Service {
|
|
|
74
60
|
ticketToken: string;
|
|
75
61
|
};
|
|
76
62
|
purpose: IPurpose;
|
|
77
|
-
instrumentOptions: {
|
|
78
|
-
/**
|
|
79
|
-
* 対応決済方法オファーIDリスト
|
|
80
|
-
* 最大20件
|
|
81
|
-
*/
|
|
82
|
-
acceptedPaymentMethodOfferIds: string[];
|
|
83
|
-
};
|
|
84
63
|
}): Promise<{
|
|
85
64
|
/**
|
|
86
65
|
* task ID
|
|
@@ -71,9 +71,8 @@ class PaymentService extends service_1.Service {
|
|
|
71
71
|
* クレジットカード決済承認
|
|
72
72
|
*/
|
|
73
73
|
async authorizeCreditCard(params) {
|
|
74
|
-
const { object, purpose
|
|
74
|
+
const { object, purpose } = params;
|
|
75
75
|
const { amount, issuedThrough, paymentMethod, creditCard, method, paymentMethodId, name, additionalProperty, ticketToken, eventIdsAsOrderedItem } = object;
|
|
76
|
-
const { acceptedPaymentMethodOfferIds } = instrumentOptions;
|
|
77
76
|
// paymentMethodId or ticketToken required(2025-12-06~)
|
|
78
77
|
if ((typeof paymentMethodId !== 'string' || paymentMethodId === '')
|
|
79
78
|
&& (typeof ticketToken !== 'string' || ticketToken === '')) {
|
|
@@ -103,8 +102,7 @@ class PaymentService extends service_1.Service {
|
|
|
103
102
|
...(Array.isArray(additionalProperty)) ? { additionalProperty } : undefined,
|
|
104
103
|
...(Array.isArray(eventIdsAsOrderedItem)) ? { eventIdsAsOrderedItem } : undefined
|
|
105
104
|
},
|
|
106
|
-
purpose
|
|
107
|
-
instrumentOptions: { acceptedPaymentMethodOfferIds }
|
|
105
|
+
purpose
|
|
108
106
|
},
|
|
109
107
|
qs: {
|
|
110
108
|
async: true,
|
|
@@ -117,9 +115,8 @@ class PaymentService extends service_1.Service {
|
|
|
117
115
|
* 決済カード決済承認
|
|
118
116
|
*/
|
|
119
117
|
async authorizeMovieTicket(params, options) {
|
|
120
|
-
const { object, purpose
|
|
118
|
+
const { object, purpose } = params;
|
|
121
119
|
const { issuedThrough, paymentMethod, movieTickets, name, additionalProperty, ticketToken } = object;
|
|
122
|
-
const { acceptedPaymentMethodOfferIds } = instrumentOptions;
|
|
123
120
|
const { checkedActionId } = options;
|
|
124
121
|
return this.fetch({
|
|
125
122
|
uri: `/payment/${factory_1.factory.service.paymentService.PaymentServiceType.MovieTicket}/authorize`,
|
|
@@ -133,8 +130,7 @@ class PaymentService extends service_1.Service {
|
|
|
133
130
|
...(typeof ticketToken === 'string') ? { ticketToken } : undefined,
|
|
134
131
|
...(Array.isArray(additionalProperty)) ? { additionalProperty } : undefined
|
|
135
132
|
},
|
|
136
|
-
purpose
|
|
137
|
-
instrumentOptions: { acceptedPaymentMethodOfferIds }
|
|
133
|
+
purpose
|
|
138
134
|
},
|
|
139
135
|
qs: {
|
|
140
136
|
checkedActionId,
|
|
@@ -148,9 +144,8 @@ class PaymentService extends service_1.Service {
|
|
|
148
144
|
* 決済ロケーション発行(非同期)
|
|
149
145
|
*/
|
|
150
146
|
async publishCreditCardPaymentUrl(params) {
|
|
151
|
-
const { object, purpose
|
|
147
|
+
const { object, purpose } = params;
|
|
152
148
|
const { amount, creditCard, issuedThrough, paymentMethod, method, ticketToken, eventIdsAsOrderedItem } = object;
|
|
153
|
-
const { acceptedPaymentMethodOfferIds } = instrumentOptions;
|
|
154
149
|
if (typeof ticketToken !== 'string' || ticketToken === '') {
|
|
155
150
|
throw new factory_1.factory.errors.ArgumentNull('object.ticketToken'); // required(2025-12-06~)
|
|
156
151
|
}
|
|
@@ -170,8 +165,7 @@ class PaymentService extends service_1.Service {
|
|
|
170
165
|
...(typeof ticketToken === 'string') ? { ticketToken } : undefined,
|
|
171
166
|
...(Array.isArray(eventIdsAsOrderedItem)) ? { eventIdsAsOrderedItem } : undefined
|
|
172
167
|
},
|
|
173
|
-
purpose
|
|
174
|
-
instrumentOptions: { acceptedPaymentMethodOfferIds }
|
|
168
|
+
purpose
|
|
175
169
|
},
|
|
176
170
|
qs: {
|
|
177
171
|
async: true,
|
|
@@ -70,8 +70,16 @@ export type IEmailCustomization = Pick<factory.creativeWork.message.email.ICusto
|
|
|
70
70
|
about?: string;
|
|
71
71
|
/**
|
|
72
72
|
* 本文テンプレート
|
|
73
|
-
*
|
|
74
|
-
*
|
|
73
|
+
* メール本文をカスタマイズしたい場合、PUGテンプレートを指定
|
|
74
|
+
* 挿入変数として以下を使用できます
|
|
75
|
+
* - order.customer.familyName
|
|
76
|
+
* - order.customer.givenName
|
|
77
|
+
* - order.confirmationNumber
|
|
78
|
+
* - order.orderNumber
|
|
79
|
+
* - order.price
|
|
80
|
+
* - order.seller.name
|
|
81
|
+
*
|
|
82
|
+
* 参考 -> https://pugjs.org/api/getting-started.html
|
|
75
83
|
*/
|
|
76
84
|
template?: string;
|
|
77
85
|
/**
|
|
@@ -34,10 +34,7 @@ export declare class PlaceOrderTransactionService extends Service {
|
|
|
34
34
|
*/
|
|
35
35
|
sendEmailMessage?: boolean;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
* メール本文をカスタマイズしたい場合、PUGテンプレートを指定
|
|
39
|
-
* 挿入変数として`order`を使用できます
|
|
40
|
-
* 参考 -> https://pugjs.org/api/getting-started.html
|
|
37
|
+
* 注文配送メール指定
|
|
41
38
|
*/
|
|
42
39
|
email?: IEmailCustomization;
|
|
43
40
|
/**
|
|
@@ -14,3 +14,89 @@ export interface IStartParams {
|
|
|
14
14
|
reason?: factory.transaction.returnOrder.Reason;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* 返品取引確定時のEメール指定
|
|
19
|
+
*/
|
|
20
|
+
export type IEmailCustomization = Pick<factory.creativeWork.message.email.ICustomization, 'text'> & {
|
|
21
|
+
/**
|
|
22
|
+
* 件名
|
|
23
|
+
*/
|
|
24
|
+
about?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 本文テンプレート
|
|
27
|
+
* メール本文をカスタマイズしたい場合、PUGテンプレートを指定
|
|
28
|
+
* 挿入変数として以下を使用できます
|
|
29
|
+
* - order.customer.familyName
|
|
30
|
+
* - order.customer.givenName
|
|
31
|
+
* - order.confirmationNumber
|
|
32
|
+
* - order.orderNumber
|
|
33
|
+
* - order.price
|
|
34
|
+
* - order.seller.name
|
|
35
|
+
*
|
|
36
|
+
* 参考 -> https://pugjs.org/api/getting-started.html
|
|
37
|
+
*/
|
|
38
|
+
template?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 受信者
|
|
41
|
+
*/
|
|
42
|
+
toRecipient?: factory.creativeWork.message.email.ICustomizedParticipant;
|
|
43
|
+
/**
|
|
44
|
+
* 送信者
|
|
45
|
+
*/
|
|
46
|
+
sender?: Pick<factory.creativeWork.message.email.ICustomizedParticipant, 'name'>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Eメール送信パラメータ
|
|
50
|
+
*/
|
|
51
|
+
export interface ISendEmailMessageParams {
|
|
52
|
+
/**
|
|
53
|
+
* Eメールカスタマイズ
|
|
54
|
+
* メール本文をカスタマイズしたい場合、PUGテンプレートを指定
|
|
55
|
+
* 挿入変数として`order`を使用できます
|
|
56
|
+
* {@link https://pugjs.org/api/getting-started.html}
|
|
57
|
+
*/
|
|
58
|
+
object?: IEmailCustomization;
|
|
59
|
+
}
|
|
60
|
+
export interface IRefundParams {
|
|
61
|
+
object: {
|
|
62
|
+
object: {
|
|
63
|
+
paymentMethod: {
|
|
64
|
+
/**
|
|
65
|
+
* 返金対象決済方法ID
|
|
66
|
+
*/
|
|
67
|
+
paymentMethodId: string;
|
|
68
|
+
};
|
|
69
|
+
}[];
|
|
70
|
+
};
|
|
71
|
+
potentialActions?: {
|
|
72
|
+
/**
|
|
73
|
+
* 返金メールカスタマイズ
|
|
74
|
+
*/
|
|
75
|
+
sendEmailMessage?: ISendEmailMessageParams;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface IPotentialActionsParams {
|
|
79
|
+
/**
|
|
80
|
+
* 注文返品アクション
|
|
81
|
+
*/
|
|
82
|
+
returnOrder?: {
|
|
83
|
+
/**
|
|
84
|
+
* 注文返品後アクション
|
|
85
|
+
*/
|
|
86
|
+
potentialActions?: {
|
|
87
|
+
/**
|
|
88
|
+
* 返金アクションについてカスタマイズする場合に指定
|
|
89
|
+
* 属性名称がrefundCreditCardであるが、全ての決済方法に適用可能
|
|
90
|
+
*/
|
|
91
|
+
refundCreditCard?: IRefundParams[];
|
|
92
|
+
/**
|
|
93
|
+
* 返品時Eメール送信アクション
|
|
94
|
+
* 最大1つ指定
|
|
95
|
+
*/
|
|
96
|
+
sendEmailMessage?: [ISendEmailMessageParams];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export type IConfirmParams = Pick<factory.transaction.returnOrder.IConfirmParams, 'id'> & {
|
|
101
|
+
potentialActions?: IPotentialActionsParams;
|
|
102
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import { Service } from '../../service';
|
|
3
3
|
import { ISetProfileParams } from '../transaction';
|
|
4
|
-
import { IStartParams } from '../transaction/returnOrder/factory';
|
|
4
|
+
import { IStartParams, IConfirmParams } from '../transaction/returnOrder/factory';
|
|
5
5
|
/**
|
|
6
6
|
* 返品取引サービス
|
|
7
7
|
*/
|
|
@@ -22,5 +22,5 @@ export declare class ReturnOrderTransactionService extends Service {
|
|
|
22
22
|
/**
|
|
23
23
|
* 取引確定
|
|
24
24
|
*/
|
|
25
|
-
confirm(params:
|
|
25
|
+
confirm(params: IConfirmParams): Promise<void>;
|
|
26
26
|
}
|
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import { IAdditionalOptions, IOptions, ISearchResult, Service } from '../../service';
|
|
3
|
-
export type IEmailMessage = factory.creativeWork.message.email.ICreativeWork
|
|
4
|
-
export interface ISearchConditions {
|
|
5
|
-
limit?: number;
|
|
6
|
-
page?: number;
|
|
7
|
-
identifier?: {
|
|
8
|
-
$eq?: string;
|
|
9
|
-
};
|
|
10
|
-
about?: {
|
|
11
|
-
identifier?: {
|
|
12
|
-
$eq?: factory.creativeWork.message.email.AboutIdentifier;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
3
|
+
export type IEmailMessage = Pick<factory.creativeWork.message.email.ICreativeWork, 'about' | 'id' | 'sender' | 'text'>;
|
|
16
4
|
/**
|
|
17
5
|
* Eメールメッセージサービス
|
|
18
6
|
*/
|
|
@@ -21,5 +9,5 @@ export declare class EmailMessageService extends Service {
|
|
|
21
9
|
/**
|
|
22
10
|
* 検索
|
|
23
11
|
*/
|
|
24
|
-
search(
|
|
12
|
+
search(): Promise<ISearchResult<IEmailMessage[]>>;
|
|
25
13
|
}
|
|
@@ -13,11 +13,11 @@ class EmailMessageService extends service_1.Service {
|
|
|
13
13
|
/**
|
|
14
14
|
* 検索
|
|
15
15
|
*/
|
|
16
|
-
async search(
|
|
16
|
+
async search() {
|
|
17
17
|
return this.fetch({
|
|
18
18
|
uri: '/emailMessages',
|
|
19
19
|
method: 'GET',
|
|
20
|
-
qs: params,
|
|
20
|
+
// qs: params,
|
|
21
21
|
expectedStatusCodes: [http_status_1.status.OK]
|
|
22
22
|
})
|
|
23
23
|
.then(async (response) => {
|
|
@@ -43,7 +43,7 @@ export declare class OrderService extends Service {
|
|
|
43
43
|
orderNumber?: string;
|
|
44
44
|
}): Promise<IOrderAsFindByConfirmationNumberResult[]>;
|
|
45
45
|
/**
|
|
46
|
-
* イベントIDと確認番号で検索
|
|
46
|
+
* [ttts専用]イベントIDと確認番号で検索
|
|
47
47
|
*/
|
|
48
48
|
findByEventAndConfirmationNumber(params: {
|
|
49
49
|
/**
|
|
@@ -53,8 +53,11 @@ export declare class OrderService extends Service {
|
|
|
53
53
|
/**
|
|
54
54
|
* 購入者情報
|
|
55
55
|
*/
|
|
56
|
-
customer
|
|
57
|
-
|
|
56
|
+
customer: {
|
|
57
|
+
/**
|
|
58
|
+
* 下4桁
|
|
59
|
+
*/
|
|
60
|
+
telephone: string;
|
|
58
61
|
};
|
|
59
62
|
event: {
|
|
60
63
|
id: {
|
|
@@ -55,7 +55,7 @@ class OrderService extends service_1.Service {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* イベントIDと確認番号で検索
|
|
58
|
+
* [ttts専用]イベントIDと確認番号で検索
|
|
59
59
|
*/
|
|
60
60
|
async findByEventAndConfirmationNumber(params) {
|
|
61
61
|
const { auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes } = this.options;
|
|
@@ -70,7 +70,6 @@ class OrderService extends service_1.Service {
|
|
|
70
70
|
});
|
|
71
71
|
return orderService.findByEventAndConfirmationNumber({
|
|
72
72
|
confirmationNumber, event,
|
|
73
|
-
// $projection: DEFAULT_PROJECTION, // fixed on server side(2024-07-22~)
|
|
74
73
|
...(typeof customer?.telephone === 'string') ? { customer } : undefined
|
|
75
74
|
});
|
|
76
75
|
}
|
|
@@ -18,13 +18,6 @@ export declare class PaymentService extends Service {
|
|
|
18
18
|
authorizeCreditCardAsync(params: {
|
|
19
19
|
object: IAuthorizeCreditCardObject;
|
|
20
20
|
purpose: IPurpose;
|
|
21
|
-
instrumentOptions?: {
|
|
22
|
-
/**
|
|
23
|
-
* 対応決済方法オファーIDリスト
|
|
24
|
-
* 最大20件
|
|
25
|
-
*/
|
|
26
|
-
acceptedPaymentMethodOfferIds?: string[];
|
|
27
|
-
};
|
|
28
21
|
}, options?: {
|
|
29
22
|
/**
|
|
30
23
|
* min: 1000 ms
|
|
@@ -42,13 +35,6 @@ export declare class PaymentService extends Service {
|
|
|
42
35
|
authorizeMovieTicketAsync(params: {
|
|
43
36
|
object: IAuthorizeMovieTicketObject;
|
|
44
37
|
purpose: IPurpose;
|
|
45
|
-
instrumentOptions?: {
|
|
46
|
-
/**
|
|
47
|
-
* 対応決済方法オファーIDリスト
|
|
48
|
-
* 最大20件
|
|
49
|
-
*/
|
|
50
|
-
acceptedPaymentMethodOfferIds?: string[];
|
|
51
|
-
};
|
|
52
38
|
}, options: {
|
|
53
39
|
/**
|
|
54
40
|
* レイテンシ増加時の最大待機時間(milliseconds)
|
|
@@ -71,13 +57,6 @@ export declare class PaymentService extends Service {
|
|
|
71
57
|
publishCreditCardPaymentUrlAsync(params: {
|
|
72
58
|
object: IPublishPaymentUrlObject;
|
|
73
59
|
purpose: IPurpose;
|
|
74
|
-
instrumentOptions?: {
|
|
75
|
-
/**
|
|
76
|
-
* 対応決済方法オファーIDリスト
|
|
77
|
-
* 最大20件
|
|
78
|
-
*/
|
|
79
|
-
acceptedPaymentMethodOfferIds?: string[];
|
|
80
|
-
};
|
|
81
60
|
}, options?: {
|
|
82
61
|
/**
|
|
83
62
|
* min: 1000 ms
|
|
@@ -38,7 +38,6 @@ class PaymentService extends service_1.Service {
|
|
|
38
38
|
*/
|
|
39
39
|
async authorizeCreditCardAsync(params, options) {
|
|
40
40
|
const { object, purpose } = params;
|
|
41
|
-
const acceptedPaymentMethodOfferIds = params.instrumentOptions?.acceptedPaymentMethodOfferIds;
|
|
42
41
|
const intervalAfterIssueTicketInMS = options?.intervalAfterIssueTicketInMS;
|
|
43
42
|
const { auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes } = this.options;
|
|
44
43
|
const chevrePay = await (0, index_1.loadChevrePay)({ auth, endpoint, disableAutoRetry });
|
|
@@ -61,10 +60,7 @@ class PaymentService extends service_1.Service {
|
|
|
61
60
|
...object,
|
|
62
61
|
ticketToken
|
|
63
62
|
},
|
|
64
|
-
purpose
|
|
65
|
-
instrumentOptions: {
|
|
66
|
-
acceptedPaymentMethodOfferIds: (Array.isArray(acceptedPaymentMethodOfferIds)) ? acceptedPaymentMethodOfferIds : []
|
|
67
|
-
}
|
|
63
|
+
purpose
|
|
68
64
|
}
|
|
69
65
|
// { async: true }
|
|
70
66
|
);
|
|
@@ -74,7 +70,6 @@ class PaymentService extends service_1.Service {
|
|
|
74
70
|
*/
|
|
75
71
|
async authorizeMovieTicketAsync(params, options) {
|
|
76
72
|
const { object, purpose } = params;
|
|
77
|
-
const acceptedPaymentMethodOfferIds = params.instrumentOptions?.acceptedPaymentMethodOfferIds;
|
|
78
73
|
const { checkedActionId } = options;
|
|
79
74
|
const { auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes } = this.options;
|
|
80
75
|
const chevrePay = await (0, index_1.loadChevrePay)({ auth, endpoint, disableAutoRetry });
|
|
@@ -94,10 +89,7 @@ class PaymentService extends service_1.Service {
|
|
|
94
89
|
...object,
|
|
95
90
|
ticketToken
|
|
96
91
|
},
|
|
97
|
-
purpose
|
|
98
|
-
instrumentOptions: {
|
|
99
|
-
acceptedPaymentMethodOfferIds: (Array.isArray(acceptedPaymentMethodOfferIds)) ? acceptedPaymentMethodOfferIds : []
|
|
100
|
-
}
|
|
92
|
+
purpose
|
|
101
93
|
}, { checkedActionId });
|
|
102
94
|
}
|
|
103
95
|
/**
|
|
@@ -105,7 +97,6 @@ class PaymentService extends service_1.Service {
|
|
|
105
97
|
*/
|
|
106
98
|
async publishCreditCardPaymentUrlAsync(params, options) {
|
|
107
99
|
const { object, purpose } = params;
|
|
108
|
-
const acceptedPaymentMethodOfferIds = params.instrumentOptions?.acceptedPaymentMethodOfferIds;
|
|
109
100
|
const intervalAfterIssueTicketInMS = options?.intervalAfterIssueTicketInMS;
|
|
110
101
|
const { auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes } = this.options;
|
|
111
102
|
const chevrePay = await (0, index_1.loadChevrePay)({ auth, endpoint, disableAutoRetry });
|
|
@@ -132,10 +123,7 @@ class PaymentService extends service_1.Service {
|
|
|
132
123
|
...object,
|
|
133
124
|
ticketToken
|
|
134
125
|
},
|
|
135
|
-
purpose
|
|
136
|
-
instrumentOptions: {
|
|
137
|
-
acceptedPaymentMethodOfferIds: (Array.isArray(acceptedPaymentMethodOfferIds)) ? acceptedPaymentMethodOfferIds : []
|
|
138
|
-
}
|
|
126
|
+
purpose
|
|
139
127
|
});
|
|
140
128
|
}
|
|
141
129
|
/**
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import type { IStartParams } from '../../../chevreTxn/transaction/returnOrder/factory';
|
|
1
|
+
import type { IStartParams, IConfirmParams } from '../../../chevreTxn/transaction/returnOrder/factory';
|
|
2
2
|
import { factory } from '../../../factory';
|
|
3
3
|
import { Service } from '../../../service';
|
|
4
4
|
/**
|
|
5
5
|
* 返品取引サービス
|
|
6
6
|
*/
|
|
7
7
|
export declare class ReturnOrderTransactionService extends Service {
|
|
8
|
-
/**
|
|
9
|
-
* 取引を開始する
|
|
10
|
-
*/
|
|
11
8
|
start(params: IStartParams): Promise<Pick<factory.transaction.ITransaction<factory.transactionType.ReturnOrder>, 'expires' | 'id' | 'project' | 'startDate' | 'status' | 'typeOf'>>;
|
|
12
9
|
/**
|
|
13
10
|
* 返品取引を開始可能かどうか検証する
|
|
@@ -16,5 +13,5 @@ export declare class ReturnOrderTransactionService extends Service {
|
|
|
16
13
|
/**
|
|
17
14
|
* 取引確定
|
|
18
15
|
*/
|
|
19
|
-
confirm(params:
|
|
16
|
+
confirm(params: IConfirmParams): Promise<void>;
|
|
20
17
|
}
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReturnOrderTransactionService = void 0;
|
|
4
|
-
// import { IAdditionalOptions, IOptions, Service } from '../../../service';
|
|
5
4
|
const index_1 = require("../../../index");
|
|
6
5
|
const service_1 = require("../../../service");
|
|
7
6
|
/**
|
|
8
7
|
* 返品取引サービス
|
|
9
8
|
*/
|
|
10
9
|
class ReturnOrderTransactionService extends service_1.Service {
|
|
11
|
-
// constructor(options: Pick<
|
|
12
|
-
// IOptions,
|
|
13
|
-
// 'auth' | 'endpoint' | 'transporter' | 'project' | 'defaultPath' | 'retryableStatusCodes'
|
|
14
|
-
// > & IAdditionalOptions) {
|
|
15
|
-
// super(options);
|
|
16
|
-
// }
|
|
17
|
-
/**
|
|
18
|
-
* 取引を開始する
|
|
19
|
-
*/
|
|
20
10
|
async start(params) {
|
|
21
11
|
const { agent, object } = params;
|
|
22
12
|
const { auth, endpoint, project, seller, retryableStatusCodes } = this.options;
|
|
@@ -29,13 +19,6 @@ class ReturnOrderTransactionService extends service_1.Service {
|
|
|
29
19
|
]
|
|
30
20
|
});
|
|
31
21
|
return returnOrderService.start({ agent, object });
|
|
32
|
-
// return this.fetch({
|
|
33
|
-
// uri: `/transactions/${this.typeOf}/start`,
|
|
34
|
-
// method: 'POST',
|
|
35
|
-
// body: params,
|
|
36
|
-
// expectedStatusCodes: [status.OK]
|
|
37
|
-
// })
|
|
38
|
-
// .then(async (response) => response.json());
|
|
39
22
|
}
|
|
40
23
|
/**
|
|
41
24
|
* 返品取引を開始可能かどうか検証する
|
|
@@ -52,13 +35,6 @@ class ReturnOrderTransactionService extends service_1.Service {
|
|
|
52
35
|
]
|
|
53
36
|
});
|
|
54
37
|
await returnOrderService.verifyReturnPolicy({ object });
|
|
55
|
-
// await this.fetch({
|
|
56
|
-
// uri: `/transactions/${this.typeOf}/start`,
|
|
57
|
-
// method: 'POST',
|
|
58
|
-
// body: params,
|
|
59
|
-
// qs: { justVerify: true },
|
|
60
|
-
// expectedStatusCodes: [NO_CONTENT, OK]
|
|
61
|
-
// });
|
|
62
38
|
}
|
|
63
39
|
/**
|
|
64
40
|
* 取引確定
|
|
@@ -75,12 +51,6 @@ class ReturnOrderTransactionService extends service_1.Service {
|
|
|
75
51
|
]
|
|
76
52
|
});
|
|
77
53
|
await returnOrderService.confirm({ id, potentialActions });
|
|
78
|
-
// await this.fetch({
|
|
79
|
-
// uri: `/transactions/${this.typeOf}/${params.id}/confirm`,
|
|
80
|
-
// method: 'PUT',
|
|
81
|
-
// body: params,
|
|
82
|
-
// expectedStatusCodes: [status.NO_CONTENT]
|
|
83
|
-
// });
|
|
84
54
|
}
|
|
85
55
|
}
|
|
86
56
|
exports.ReturnOrderTransactionService = ReturnOrderTransactionService;
|