Skip to content

Commit

Permalink
資産取引を最適化(agent)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Mar 5, 2024
1 parent 4493f79 commit 11ebaba
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 32 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
- update @motionpicture/gmo-service
- 施設コンテンツのcoaInfoを拡張
- 施設コンテンツのlocationを最適化(kanaNameを廃止)
- 資産取引を最適化(agent)

### Deprecated

Expand Down
17 changes: 2 additions & 15 deletions src/action/reserve.ts
@@ -1,7 +1,6 @@
import * as ActionFactory from '../action';
import { ActionType } from '../actionType';
import { AssetTransactionType } from '../assetTransactionType';
import { OrderType } from '../order';
import { IAvailableReservationStatusType } from '../reservation';
import { IReservationFor as IBusReservationFor } from '../reservation/busReservation';
import { IReservationFor as IEventReservationFor } from '../reservation/event';
Expand All @@ -14,28 +13,16 @@ export type IAgent = ActionFactory.IParticipantAsProject;
export type IReservationFor = (Pick<IBusReservationFor, 'id' | 'typeOf'> | Pick<IEventReservationFor, 'id' | 'typeOf'>) & {
optimized: boolean;
};
// ReservationPackageに拡張(2022-12-22~)
export interface IReservationPackageAsObject {
// IReservationPackageAsObject以外を廃止(2023-01-19~)
export interface IObject {
reservationFor: IReservationFor;
reservationNumber: string;
reservationStatus: IAvailableReservationStatusType;
// 不要なので廃止(2023-01-19~)
// subReservation?: ISubReservation[];
// 不要なので廃止(2023-05-31~)→予約取引から取得に変更
// underName?: IUnderName;
typeOf: ReservationType.ReservationPackage;
}
// IReservationPackageAsObject以外を廃止(2023-01-19~)
// export type IObject = IBusReservation | IEventReservation | IReservationPackageAsObject;
export type IObject = IReservationPackageAsObject;
export interface IResult {
confirmedReservationId?: string;
}
export interface IOrderAsReservePurpose {
typeOf: OrderType.Order;
confirmationNumber?: string;
orderNumber?: string;
}
export interface IAssetTransactionAsReservePurpose {
/**
* 取引タイプ
Expand Down
6 changes: 2 additions & 4 deletions src/assetTransaction.ts
Expand Up @@ -3,7 +3,6 @@ import { IExtendId } from './autoGenerated';
import { OrganizationType } from './organizationType';
import { PersonType } from './personType';
import { SortType } from './sortType';
import { IIdentifier } from './thing';
import { TransactionStatusType } from './transactionStatusType';
import { TransactionTasksExportationStatus } from './transactionTasksExportationStatus';

Expand All @@ -17,7 +16,7 @@ export interface IAgentAsSeller {
* 名称は必須
*/
name: string;
identifier?: IIdentifier;
// identifier?: IIdentifier; // 廃止(2024-03-05~)
}
/**
* 管理者主体
Expand All @@ -29,7 +28,7 @@ export interface IAgentAsPerson {
* 名称は必須
*/
name: string;
identifier?: IIdentifier;
// identifier?: IIdentifier; // 廃止(2024-03-05~)
}
/**
* 資産取引主体は販売者or管理者
Expand Down Expand Up @@ -82,7 +81,6 @@ export interface IStartParams<T extends AssetTransactionType, TAgent extends IAg
* 資産取引属性
*/
export type IAttributes<TStartParams, TResult, TError, TPotentialActions> = TStartParams & {
purpose?: any;
/**
* 取引状態
*/
Expand Down
14 changes: 3 additions & 11 deletions src/assetTransaction/reserve.ts
Expand Up @@ -4,6 +4,7 @@ import { ActionType } from '../actionType';
import * as AssetTransactionFactory from '../assetTransaction';
import { AssetTransactionType } from '../assetTransactionType';
import { IExtendId } from '../autoGenerated';
import { IOrder } from '../order';
import { IPropertyValue } from '../propertyValue';
import * as ReservationFactory from '../reservation';
import {
Expand Down Expand Up @@ -193,8 +194,6 @@ export interface IAcceptedTicketOfferWithoutDetail {
* 受入アドオン
*/
addOn?: IAcceptedAddOn[];
// 不要なので廃止(2023-02-08~)
// paymentMethod?: IAcceptedPaymentMethod;
additionalProperty?: IPropertyValue<string>[];
priceSpecification?: {
appliesToMovieTicket?: IAcceptedAppliesToMovieTicket;
Expand All @@ -210,10 +209,11 @@ export interface IAcceptedOffer4object {
appliesToMovieTicket?: IAcceptedAppliesToMovieTicket;
};
}
export type IOrderAsReservePurpose = Pick<IOrder, 'confirmationNumber' | 'orderNumber' | 'typeOf'>;
export interface IPotentialActionsParams {
reserve?: {
// purposeの指定があれば、注文情報を予約へ自動連携
purpose?: ReserveActionFactory.IOrderAsReservePurpose;
purpose?: IOrderAsReservePurpose;
};
}
/**
Expand All @@ -222,13 +222,6 @@ export interface IPotentialActionsParams {
export interface IConfirmParams {
id?: string;
transactionNumber?: string;
// 不要なので廃止(2022-12-14~)
// object?: {
// /**
// * 最終的な予約の属性を指定
// */
// reservations: IConfirmingReservation[];
// };
potentialActions?: IPotentialActionsParams;
}
// tslint:disable-next-line:no-empty-interface
Expand All @@ -243,7 +236,6 @@ export interface IObjectWithoutDetail {
broker?: ReservationFactory.IBroker;
reservationFor?: { id: string };
}
// IReservationForを最適化
export type IReservationFor = IBusReservationReservationFor | IEventReservationReservationFor;
// reservationStatusは不要なので削除(2023-07-19~)
export type IOmittedReservationProperty = 'reservationFor' | 'broker' | 'issuedThrough' | 'provider' | 'reservationStatus';
Expand Down
3 changes: 1 addition & 2 deletions src/assetTransactionType.ts
Expand Up @@ -11,12 +11,11 @@ export enum AssetTransactionType {
*/
Reserve = 'Reserve',
/**
* 予約キャンセル
* 予約取消
*/
CancelReservation = 'CancelReservation',
/**
* 決済
* PaymentMethod: PaymentCard,CreditCard...
*/
Pay = 'Pay',
/**
Expand Down

0 comments on commit 11ebaba

Please sign in to comment.