Skip to content

Commit

Permalink
予約に識別子を拡張
Browse files Browse the repository at this point in the history
決済カードに予約識別子を拡張
  • Loading branch information
ilovegadd committed Apr 13, 2024
1 parent 1e56631 commit 380b1c0
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 27 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Changed

- 注文のadditionalPropertyを廃止
- 予約に識別子を拡張
- 決済カードに予約識別子を拡張

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion src/action/check/paymentMethod/movieTicket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type * as surfrock from '@surfrock/sdk';

import * as ActionFactory from '../../../action';
import { OrganizationType } from '../../../organizationType';
import { IMovieTicket as IMovieTicketPaymentCard, IServiceOutput as IMovieTicketServiceOutput } from '../../../paymentMethod/paymentCard/movieTicket';
import { IMovieTicketPaymentCard, IMovieTicketServiceOutput } from '../../../paymentMethod/paymentCard/movieTicket';
import { TransactionType } from '../../../transactionType';
import * as CheckActionFactory from '../../check';
import * as PayActionFactory from '../../trade/pay';
Expand Down
2 changes: 1 addition & 1 deletion src/action/trade/pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AssetTransactionType } from '../../assetTransactionType';
import { CreativeWorkType } from '../../creativeWorkType';
import { IPaymentServiceOutput } from '../../invoice';
import { ITotalPaymentDue, OrderType } from '../../order';
import { IMovieTicket as IMovieTicketPaymentCard } from '../../paymentMethod/paymentCard/movieTicket';
import { IMovieTicketPaymentCard } from '../../paymentMethod/paymentCard/movieTicket';
import { IPropertyValue } from '../../propertyValue';
import { PaymentServiceType } from '../../service/paymentService';
import { IAttributes as IInformActionAttributes } from '../interact/inform';
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ export import ownershipInfo = OwnershipInfoFactory;

export namespace paymentMethod {
export type ISearchConditions = any;
export type IPaymentMethod = CreditCardFactory.ICheckedCard | MovieTicketFactory.IMovieTicket;
export type IPaymentMethod = CreditCardFactory.ICheckedCard | MovieTicketFactory.IMovieTicketPaymentCard;

export namespace paymentCard {
export import IPaymentCard = PaymentCardFactory.IPaymentCard;
Expand Down
4 changes: 2 additions & 2 deletions src/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export type IBusReservation = Pick<
BusReservationFactory.IReservation,
'additionalProperty' |
'additionalTicketText' |
// 'bookingTime' |
'id' |
'identifier' | // 追加(2024-04-15~)
'issuedThrough' |
'programMembershipUsed' |
'reservationNumber' |
Expand All @@ -170,8 +170,8 @@ export type IEventReservation = Pick<
EventReservationFactory.IReservation,
'additionalProperty' |
'additionalTicketText' |
// 'bookingTime' |
'id' |
'identifier' | // 追加(2024-04-15~)
'issuedThrough' |
'programMembershipUsed' |
'reservationNumber' |
Expand Down
48 changes: 26 additions & 22 deletions src/paymentMethod/paymentCard/movieTicket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,39 @@ import { EventType } from '../../eventType';
import { ISeat } from '../../reservation';
import { IPaymentCard } from '../paymentCard';

export interface IReservationFor { typeOf: EventType.ScreeningEvent; id: string; }
export interface IServiceOutput {
export interface IMovieTicketReservationFor { typeOf: EventType.ScreeningEvent; id: string; }
export interface IMovieTicketServiceOutput {
/**
* 予約識別子
*/
identifier?: string; // 追加(2024-04-15~)
/**
* 予約対象イベント
*/
reservationFor: IReservationFor;
reservationFor: IMovieTicketReservationFor;
/**
* 予約チケット
*/
reservedTicket: { ticketedSeat: ISeat };
}
export interface IAttributes extends IPaymentCard {
/**
* 決済カード
*/
export interface IMovieTicketPaymentCard extends Pick<
IPaymentCard,
'accessCode' | 'amount' | 'serviceOutput' | 'serviceType' | 'identifier' | 'typeOf'
> {
/**
* 決済方法区分コード
*/
typeOf: string;
category: {
/**
* 前売券(カード)の種類
* 全国券,劇場券など
*/
codeValue: string; // 追加(2023-02-08~)
};
/**
* 購入管理番号
*/
Expand All @@ -29,22 +50,5 @@ export interface IAttributes extends IPaymentCard {
/**
* 利用対象予約
*/
serviceOutput: IServiceOutput;
}

/**
* MovieTicket決済カード
*/
export interface IMovieTicket extends IAttributes {
/**
* 決済方法区分コード
*/
typeOf: string;
category: {
/**
* 前売券(カード)の種類
* 全国券,劇場券など
*/
codeValue: string; // 追加(2023-02-08~)
};
serviceOutput: IMovieTicketServiceOutput;
}
4 changes: 4 additions & 0 deletions src/reservation/busReservation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export interface IIssuedThrough extends ReservationFactory.IIssuedThrough {
export interface IReservation extends ReservationFactory.IReservation<IPriceSpecification> {
bookingTime: Date;
id: string;
/**
* 予約識別子
*/
identifier?: string; // 追加(2024-04-15~)
issuedThrough: IIssuedThrough;
reservationFor: IReservationFor;
reservationNumber: string;
Expand Down
4 changes: 4 additions & 0 deletions src/reservation/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ export interface IIssuedThrough extends ReservationFactory.IIssuedThrough {
export interface IReservation extends ReservationFactory.IReservation<IPriceSpecification> {
bookingTime: Date;
id: string;
/**
* 予約識別子
*/
identifier?: string; // 追加(2024-04-15~)
issuedThrough: IIssuedThrough;
reservationFor: IReservationFor;
reservationNumber: string;
Expand Down

0 comments on commit 380b1c0

Please sign in to comment.