@chevre/factory 4.325.0-alpha.1 → 4.325.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.
@@ -98,6 +98,12 @@ export interface IObject {
98
98
  */
99
99
  movieTickets?: IMovieTicket[];
100
100
  }
101
+ export interface IResultPaymentMethod {
102
+ typeOf: IAnyPaymentMethod;
103
+ amount?: {
104
+ currency?: string;
105
+ };
106
+ }
101
107
  export interface IResult {
102
108
  /**
103
109
  * The identifier for the account the payment will be applied to.
@@ -111,6 +117,10 @@ export interface IResult {
111
117
  * 決済方法
112
118
  */
113
119
  paymentMethod: IAnyPaymentMethod;
120
+ /**
121
+ * amount.currencyに対応するために追加(2023-08-13~)
122
+ */
123
+ paymentMethodAsObject?: IResultPaymentMethod;
114
124
  /**
115
125
  * 決済ID
116
126
  */
@@ -1,10 +1,10 @@
1
1
  import * as ActionFactory from '../../../action';
2
- import * as OrderFactory from '../../../order';
2
+ import { IReferencedInvoice, ISimpleOrder } from '../../../order';
3
3
  import { IAttributes as ISendEmailMessageActionAttributes } from '../../transfer/send/message/email';
4
4
  import * as ReturnActionFactory from '../return';
5
5
  export declare type IAgent = ActionFactory.IParticipantAsProject;
6
6
  export declare type IRecipient = ActionFactory.IParticipant;
7
- export declare type IObject = OrderFactory.IPaymentMethod;
7
+ export declare type IObject = IReferencedInvoice;
8
8
  export declare type IResult = any;
9
9
  export interface IPotentialActions {
10
10
  /**
@@ -12,7 +12,7 @@ export interface IPotentialActions {
12
12
  */
13
13
  sendEmailMessage?: ISendEmailMessageActionAttributes[];
14
14
  }
15
- export declare type IPurpose = OrderFactory.ISimpleOrder;
15
+ export declare type IPurpose = ISimpleOrder;
16
16
  export interface IAttributes extends ReturnActionFactory.IAttributes<IObject, IResult> {
17
17
  agent: IAgent;
18
18
  recipient: IRecipient;
@@ -3,7 +3,8 @@ import { IAction as IPayAction, IAttributes as IPayActionAttributes, ILocation,
3
3
  import * as AssetTransactionFactory from '../assetTransaction';
4
4
  import { AssetTransactionType } from '../assetTransactionType';
5
5
  import { IExtendId } from '../autoGenerated';
6
- import { IOrderPaymentMethodIssuedThroughServiceOutput, ITotalPaymentDue } from '../order';
6
+ import { IMonetaryAmount } from '../monetaryAmount';
7
+ import { ITotalPaymentDue } from '../order';
7
8
  import { IUnauthorizedCardOfMember, IUncheckedCardRaw, IUncheckedCardTokenized } from '../paymentMethod/paymentCard/creditCard';
8
9
  import { IOnPaymentStatusChanged } from '../project';
9
10
  import { IPropertyValue } from '../propertyValue';
@@ -23,6 +24,9 @@ export import IEntryTranArgs = GMO.factory.credit.IEntryTranArgs;
23
24
  export import IEntryTranResult = GMO.factory.credit.IEntryTranResult;
24
25
  export import IExecTranArgs = GMO.factory.credit.IExecTranArgs;
25
26
  export import IExecTranResult = GMO.factory.credit.IExecTranResult;
27
+ export interface IPaymentMethodAmount extends Pick<IMonetaryAmount, 'currency' | 'typeOf' | 'value'> {
28
+ value: number;
29
+ }
26
30
  export interface IPaymentMethod {
27
31
  /**
28
32
  * The identifier for the account the payment will be applied to.
@@ -34,8 +38,9 @@ export interface IPaymentMethod {
34
38
  additionalProperty?: IPropertyValue<string>[];
35
39
  /**
36
40
  * The amount of money.
41
+ * MonetaryAmount対応(2023-08-12~)
37
42
  */
38
- amount: number;
43
+ amount: number | IPaymentMethodAmount;
39
44
  /**
40
45
  * 説明
41
46
  */
@@ -89,7 +94,6 @@ export interface IObject {
89
94
  * 発行決済サービスID
90
95
  */
91
96
  id: string;
92
- serviceOutput?: IOrderPaymentMethodIssuedThroughServiceOutput;
93
97
  paymentMethod: IPaymentMethod;
94
98
  pendingTransaction?: IPendingTransaction;
95
99
  entryTranArgs?: IEntryTranArgs;
@@ -100,7 +104,15 @@ export interface IObject {
100
104
  onPaymentStatusChanged?: IOnPaymentStatusChanged;
101
105
  accountsReceivablesByServiceType?: IAccountsReceivableByServiceType[];
102
106
  }
103
- export declare type IObjectWithoutDetail = Pick<IObject, 'typeOf' | 'id' | 'paymentMethod'>;
107
+ export interface IPaymentMethodWithoutDetail extends IPaymentMethod {
108
+ /**
109
+ * 取引開始前の指定ではnumberに限定
110
+ */
111
+ amount: number;
112
+ }
113
+ export interface IObjectWithoutDetail extends Pick<IObject, 'typeOf' | 'id' | 'paymentMethod'> {
114
+ paymentMethod: IPaymentMethodWithoutDetail;
115
+ }
104
116
  export declare type IStartParamsWithoutDetail = AssetTransactionFactory.IStartParams<AssetTransactionType.Pay, IAgent, IRecipient, IObjectWithoutDetail> & {
105
117
  location?: ILocation;
106
118
  recipient: IRecipient;
package/lib/invoice.d.ts CHANGED
@@ -57,7 +57,7 @@ export interface IMovieTicketAsPaymentServiceOutput {
57
57
  serviceOutput?: IReservation;
58
58
  amount?: IAmountOfMovieTicketAsPaymentServiceOutput;
59
59
  }
60
- export declare type IPaymentServiceOutput = IMovieTicketAsPaymentServiceOutput[] | OrderFactory.IOrderPaymentMethodIssuedThroughServiceOutput;
60
+ export declare type IPaymentServiceOutput = IMovieTicketAsPaymentServiceOutput[];
61
61
  /**
62
62
  * 決済方法(サービス)
63
63
  */
package/lib/order.d.ts CHANGED
@@ -25,7 +25,7 @@ import * as BusReservationFactory from './reservation/busReservation';
25
25
  import * as EventReservationFactory from './reservation/event';
26
26
  import { ReservationType } from './reservationType';
27
27
  import { ISeller as IBaseSeller } from './seller';
28
- import { ICreditCardAsPaymentServiceOutput, PaymentServiceType } from './service/paymentService';
28
+ import { IPaymentMethodAsServiceOutput, PaymentServiceType } from './service/paymentService';
29
29
  import { SortType } from './sortType';
30
30
  import { IUnitPriceOfferPriceSpecification } from './unitPriceOffer';
31
31
  export interface IProject {
@@ -35,27 +35,21 @@ export interface IProject {
35
35
  export declare enum OrderType {
36
36
  Order = "Order"
37
37
  }
38
- export interface IOrderPaymentMethodIssuedThroughServiceOutput extends ICreditCardAsPaymentServiceOutput {
39
- amount?: {
40
- currency: string;
41
- value: number;
42
- };
43
- }
44
38
  export interface IOrderPaymentMethodIssuedThrough {
45
39
  typeOf: PaymentServiceType;
46
40
  /**
47
41
  * 発行決済サービスID
48
42
  */
49
43
  id: string;
50
- serviceOutput?: IOrderPaymentMethodIssuedThroughServiceOutput;
51
44
  }
52
45
  export interface ITotalPaymentDue extends Pick<IMonetaryAmount, 'typeOf' | 'currency' | 'value'> {
53
46
  value: number;
54
47
  }
48
+ export declare type IPaymentMethodOfInvoice = Pick<IPaymentMethodAsServiceOutput, 'amount'>;
55
49
  /**
56
- * 決済方法
50
+ * 請求
57
51
  */
58
- export interface IPaymentMethod {
52
+ export interface IReferencedInvoice {
59
53
  /**
60
54
  * The identifier for the account the payment will be applied to.
61
55
  */
@@ -68,6 +62,11 @@ export interface IPaymentMethod {
68
62
  * 決済方法名称
69
63
  */
70
64
  name: string;
65
+ /**
66
+ * The name of the credit card or other method of payment for the order.
67
+ * 追加(2023-08-13~)
68
+ */
69
+ paymentMethod?: IPaymentMethodOfInvoice;
71
70
  /**
72
71
  * An identifier for the method of payment used (e.g.the last 4 digits of the credit card).
73
72
  */
@@ -324,7 +323,7 @@ export interface IOrder extends Omit<ISimpleOrder, 'customer'> {
324
323
  /**
325
324
  * payment methods
326
325
  */
327
- paymentMethods: IPaymentMethod[];
326
+ paymentMethods: IReferencedInvoice[];
328
327
  /**
329
328
  * Returner
330
329
  */
@@ -1,3 +1,4 @@
1
+ import { IInvoice } from '../invoice';
1
2
  import { IAvailableChannel as IProductAvailableChannel, IServiceType } from '../product';
2
3
  import { IOnPaymentStatusChanged, IProject } from '../project';
3
4
  import { IPropertyValue } from '../propertyValue';
@@ -61,15 +62,21 @@ export declare type IAvailableChannel = IProductAvailableChannel & {
61
62
  * CreditCardIF決済サービスのカード属性
62
63
  * ポイントカード情報など
63
64
  */
64
- export interface ICreditCardAsPaymentServiceOutput {
65
+ export interface IPaymentMethodAsServiceOutput {
65
66
  amount?: {
66
67
  /**
67
- * 通貨区分
68
+ * カード通貨区分
68
69
  */
69
70
  currency: string;
70
71
  };
71
72
  }
72
- export declare type IServiceOutput = ICreditCardAsPaymentServiceOutput;
73
+ export interface IInvoiceAsServiceOutput extends Pick<IInvoice, 'paymentStatus' | 'typeOf'> {
74
+ /**
75
+ * 発行される決済方法
76
+ */
77
+ paymentMethod?: IPaymentMethodAsServiceOutput;
78
+ }
79
+ export declare type IServiceOutput = IInvoiceAsServiceOutput;
73
80
  /**
74
81
  * 決済サービス
75
82
  * {@link https://schema.org/Service}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.325.0-alpha.1",
3
+ "version": "4.325.0-alpha.3",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",