-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redefine returnPaymentMethodAction as returnInvoiceAction
- Loading branch information
Showing
6 changed files
with
56 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import * as ActionFactory from '../../../action'; | ||
import { AssetTransactionType } from '../../../assetTransactionType'; | ||
import { IInvoice } from '../../../invoice'; | ||
import { IReferencedInvoice, ISimpleOrder } from '../../../order'; | ||
import { IAttributes as ISendEmailMessageActionAttributes } from '../../transfer/send/message/email'; | ||
import * as ReturnActionFactory from '../return'; | ||
|
||
export type IAgent = ActionFactory.IParticipantAsProject; | ||
type IRecipientAttributes = 'id' | 'name' | 'typeOf'; | ||
export type IRecipient = Pick<ActionFactory.IParticipantAsCustomer, IRecipientAttributes> | ||
| Pick<ActionFactory.IParticipantAsPerson, IRecipientAttributes> | ||
| Pick<ActionFactory.IParticipantAsWebApplication, IRecipientAttributes>; | ||
export type IObject = Pick< | ||
IReferencedInvoice, | ||
'accountId' | 'issuedThrough' | 'paymentMethod' | 'paymentMethodId' | 'totalPaymentDue' | 'name' | 'additionalProperty' | ||
> | ||
& Pick<IInvoice, 'typeOf'>; // typeOfを定義(2024-03-06~) | ||
// tslint:disable-next-line:no-empty-interface | ||
export interface IResult { } | ||
export interface IPotentialActions { | ||
/** | ||
* 返金処理完了を通知するEメール送信アクション | ||
*/ | ||
sendEmailMessage?: ISendEmailMessageActionAttributes[]; | ||
} | ||
export type IPurpose = ISimpleOrder; | ||
export interface IInstrument { | ||
typeOf: AssetTransactionType.Refund; | ||
transactionNumber: string; | ||
} | ||
export interface IAttributes extends Pick< | ||
ReturnActionFactory.IAttributes<IObject, IResult>, | ||
'agent' | 'error' | 'instrument' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf' | ||
> { | ||
agent: IAgent; | ||
recipient: IRecipient; | ||
purpose: IPurpose; | ||
potentialActions?: IPotentialActions; | ||
instrument?: IInstrument; // define(2024-06-17~) | ||
} | ||
/** | ||
* 請求返却アクション | ||
*/ | ||
export type IAction = ReturnActionFactory.IAction<IAttributes>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters