@chevre/factory 5.3.0-alpha.2 → 5.3.0-alpha.3

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.
@@ -7,10 +7,16 @@ import { TransactionType } from '../../transactionType';
7
7
  import * as AcceptActionFactory from '../accept';
8
8
  export { IExecTran3dsArgs, IExecTran3dsResult, IAgent, IRecipe };
9
9
  export type IPaymentMethod = Pick<IPaymentMethodWithoutDetail, 'amount' | 'creditCard' | 'identifier' | 'method'>;
10
- export type IPayObject = Pick<IObjectWithoutDetail, 'id' | 'typeOf'> & {
10
+ /**
11
+ * 採用する決済方法
12
+ */
13
+ export type IPayObject = Pick<IObjectWithoutDetail, 'id' | 'typeOf' | 'serviceOutput'> & {
11
14
  paymentMethod: IPaymentMethod;
12
15
  };
13
16
  export interface IObject {
17
+ /**
18
+ * 決済方法(決済サービス)
19
+ */
14
20
  object: IPayObject;
15
21
  transactionNumber: string;
16
22
  typeOf: AssetTransactionType.Pay;
@@ -2,9 +2,9 @@ import * as ActionFactory from '../../../action';
2
2
  import * as CheckMovieTicketActionFactory from '../../../action/check/paymentMethod/movieTicket';
3
3
  import { AvailablePaymentMethodType, IMovieTicket } from '../../../action/trade/pay';
4
4
  import { ActionType } from '../../../actionType';
5
- import { ICreditCard, IFromLocation, ITokenizedPaymentCard } from '../../../assetTransaction/pay';
5
+ import { ICreditCard, IFromLocation, IInvoiceReferenceOrder, ITokenizedPaymentCard } from '../../../assetTransaction/pay';
6
6
  import { AssetTransactionType } from '../../../assetTransactionType';
7
- import { IEventServiceAsOrderedItem, IOrder, IOrderPaymentMethodIssuedThrough, IReservationFor4EventServiceOrderedItem, ITotalPaymentDue } from '../../../order';
7
+ import { IOrderPaymentMethodIssuedThrough, ITotalPaymentDue } from '../../../order';
8
8
  import { PaymentStatusType } from '../../../paymentStatusType';
9
9
  import { IPropertyValue } from '../../../propertyValue';
10
10
  import { IPermitAsServiceOutput } from '../../../service/paymentService';
@@ -82,6 +82,7 @@ export interface IObjectIncludingPaymentMethodDetails {
82
82
  * メンバーシップチケットに限らず、承認前に発行された決済方法チケットを指定すると、paymentMethodIdはチケットに依存する
83
83
  */
84
84
  ticketToken?: string;
85
+ referencesOrder: IInvoiceReferenceOrder;
85
86
  }
86
87
  export type IAuthorizeAnyPaymentObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'name' | 'additionalProperty' | 'ticketToken'> & {
87
88
  creditCard?: never;
@@ -89,16 +90,18 @@ export type IAuthorizeAnyPaymentObject = Pick<IObjectIncludingPaymentMethodDetai
89
90
  movieTickets?: never;
90
91
  paymentMethodId?: never;
91
92
  fromLocation?: never;
92
- description?: string;
93
+ description?: never;
94
+ referencesOrder?: never;
93
95
  };
94
96
  export type IAuthorizeCreditCardObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'creditCard' | 'method' | 'name' | 'additionalProperty' | 'ticketToken'> & {
95
97
  /**
96
98
  * 決済URL発行の場合、発行済のpaymentMethodIdを指定
97
99
  */
98
100
  paymentMethodId?: string;
101
+ referencesOrder?: IInvoiceReferenceOrder;
99
102
  movieTickets?: never;
100
103
  fromLocation?: never;
101
- description?: string;
104
+ description?: never;
102
105
  };
103
106
  export type IAuthorizeMovieTicketObject = Pick<IObjectIncludingPaymentMethodDetails, 'issuedThrough' | 'paymentMethod' | 'movieTickets' | 'name' | 'additionalProperty' | 'ticketToken'> & {
104
107
  /**
@@ -109,7 +112,8 @@ export type IAuthorizeMovieTicketObject = Pick<IObjectIncludingPaymentMethodDeta
109
112
  method?: never;
110
113
  paymentMethodId?: never;
111
114
  fromLocation?: never;
112
- description?: string;
115
+ description?: never;
116
+ referencesOrder?: never;
113
117
  };
114
118
  export type IAuthorizePaymentCardObject = Pick<IObjectIncludingPaymentMethodDetails, 'amount' | 'issuedThrough' | 'paymentMethod' | 'fromLocation' | 'name' | 'additionalProperty'> & {
115
119
  description?: string;
@@ -118,7 +122,11 @@ export type IAuthorizePaymentCardObject = Pick<IObjectIncludingPaymentMethodDeta
118
122
  movieTickets?: never;
119
123
  ticketToken?: never;
120
124
  paymentMethodId?: never;
125
+ referencesOrder?: never;
121
126
  };
127
+ /**
128
+ * 決済承認リクエストの承認対象オブジェクト
129
+ */
122
130
  export type IObjectWithoutDetail = IAuthorizeAnyPaymentObject | IAuthorizeCreditCardObject | IAuthorizeMovieTicketObject | IAuthorizePaymentCardObject;
123
131
  export type IObject = Pick<IObjectIncludingPaymentMethodDetails, 'typeOf' | 'paymentMethodId' | 'accountId'>;
124
132
  export interface IResultPaymentMethod {
@@ -133,34 +141,6 @@ export interface IResultPaymentMethod {
133
141
  currency?: string;
134
142
  };
135
143
  }
136
- /**
137
- * 決済承認結果としての請求書に関連する注文アイテムとしての興行
138
- */
139
- export type IEventServiceAsInvoiceOrderedItem = Pick<IEventServiceAsOrderedItem, 'typeOf'> & {
140
- serviceOutput: {
141
- /**
142
- * 請求書に関連するイベント
143
- * 興行オファー承認のイベントリストと完全に一致する必要がある
144
- */
145
- reservationFor: Pick<IReservationFor4EventServiceOrderedItem, 'id' | 'typeOf'>;
146
- };
147
- };
148
- /**
149
- * 決済承認結果としての請求書に関連する注文アイテム
150
- */
151
- export interface IInvoiceOrderedItem {
152
- typeOf: 'OrderItem';
153
- orderedItem: IEventServiceAsInvoiceOrderedItem;
154
- }
155
- /**
156
- * 決済承認結果としての請求書に関連する注文
157
- */
158
- export interface IInvoiceReferenceOrder extends Pick<IOrder, 'typeOf'> {
159
- /**
160
- * 決済承認プロセスにおいて注文アイテムを指定された場合のみ定義される
161
- */
162
- orderedItem?: IInvoiceOrderedItem[];
163
- }
164
144
  export interface IResultAsInvoice {
165
145
  /**
166
146
  * The identifier for the account the payment will be applied to.
@@ -2,8 +2,9 @@ import { IAction as IPayAction, IInstrument, ILocation, IMovieTicket, IOrderAsPa
2
2
  import * as AssetTransactionFactory from '../assetTransaction';
3
3
  import { AssetTransactionType } from '../assetTransactionType';
4
4
  import { IExtendId } from '../autoGenerated';
5
+ import { IInvoice } from '../invoice';
5
6
  import { IMonetaryAmount } from '../monetaryAmount';
6
- import { ITotalPaymentDue } from '../order';
7
+ import { IEventServiceAsOrderedItem, IOrder, IReservationFor4EventServiceOrderedItem, ITotalPaymentDue } from '../order';
7
8
  import { ICreditCard3DS, IUnauthorizedCardOfMember, IUncheckedCardRaw, IUncheckedCardTokenized } from '../paymentMethod/paymentCard/creditCard';
8
9
  import { IPropertyValue } from '../propertyValue';
9
10
  import { IPotentialAction as IPotentialInformAction, PaymentServiceType } from '../service/paymentService';
@@ -75,10 +76,44 @@ export interface IAccountsReceivableByServiceType {
75
76
  accountsReceivable?: number;
76
77
  }
77
78
  export type IPayActionInObject = Pick<IPayAction, 'actionStatus' | 'id' | 'typeOf'>;
79
+ /**
80
+ * 決済承認結果としての請求書に関連する注文アイテムとしての興行
81
+ */
82
+ export type IEventServiceAsInvoiceOrderedItem = Pick<IEventServiceAsOrderedItem, 'typeOf'> & {
83
+ serviceOutput: {
84
+ /**
85
+ * 請求書に関連するイベント
86
+ * 興行オファー承認のイベントリストと完全に一致する必要がある
87
+ */
88
+ reservationFor: Pick<IReservationFor4EventServiceOrderedItem, 'id' | 'typeOf'>;
89
+ };
90
+ };
91
+ /**
92
+ * 決済承認結果としての請求書に関連する注文アイテム
93
+ */
94
+ export interface IInvoiceOrderedItem {
95
+ typeOf: 'OrderItem';
96
+ orderedItem: IEventServiceAsInvoiceOrderedItem;
97
+ }
98
+ /**
99
+ * 決済承認結果としての請求書に関連する注文
100
+ */
101
+ export interface IInvoiceReferenceOrder extends Pick<IOrder, 'typeOf'> {
102
+ /**
103
+ * 決済承認プロセスにおいて注文アイテムを指定された場合のみ定義される
104
+ */
105
+ orderedItem?: IInvoiceOrderedItem[];
106
+ }
107
+ /**
108
+ * 関連注文情報を含む請求情報
109
+ */
110
+ export type IInvoiceAsPaymentServiceOutput = Pick<IInvoice, 'typeOf'> & {
111
+ referencesOrder: IInvoiceReferenceOrder;
112
+ };
78
113
  /**
79
114
  * 取引対象物
80
115
  */
81
- export interface IObject {
116
+ export interface IPaymentServiceAsObject {
82
117
  accountId: string;
83
118
  paymentMethodId: string;
84
119
  typeOf: PaymentServiceType;
@@ -96,14 +131,16 @@ export interface IObject {
96
131
  checkedAction?: {
97
132
  id: string;
98
133
  };
134
+ serviceOutput?: IInvoiceAsPaymentServiceOutput;
99
135
  }
136
+ export type IObject = IPaymentServiceAsObject;
100
137
  export interface IPaymentMethodWithoutDetail extends IPaymentMethod {
101
138
  /**
102
139
  * 取引開始前の指定ではnumberに限定
103
140
  */
104
141
  amount: number;
105
142
  }
106
- export interface IObjectWithoutDetail extends Pick<IObject, 'typeOf' | 'id' | 'paymentMethod'> {
143
+ export interface IObjectWithoutDetail extends Pick<IObject, 'serviceOutput' | 'typeOf' | 'id' | 'paymentMethod'> {
107
144
  paymentMethod: IPaymentMethodWithoutDetail;
108
145
  }
109
146
  export type IPotentialAction = IPotentialInformAction;
@@ -11,7 +11,7 @@ export interface IData {
11
11
  agent: {
12
12
  id: string;
13
13
  };
14
- object: Pick<IAuthorizeCreditCardObject, 'amount' | 'creditCard' | 'issuedThrough' | 'method' | 'paymentMethod'>;
14
+ object: Pick<IAuthorizeCreditCardObject, 'amount' | 'creditCard' | 'issuedThrough' | 'method' | 'paymentMethod' | 'referencesOrder'>;
15
15
  purpose: IPurpose;
16
16
  paymentServiceType: PaymentServiceType;
17
17
  location: ILocation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "5.3.0-alpha.2",
3
+ "version": "5.3.0-alpha.3",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",