-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { RequestContext } from '../../api/common/request-context'; | ||
import { Order } from '../../entity/order/order.entity'; | ||
import { OrderState } from '../../service/helpers/order-state-machine/order-state'; | ||
import { VendureEvent } from '../vendure-event'; | ||
|
||
/** | ||
* @description | ||
* This event is fired whenever an {@link Order} is set as "placed", which by default is | ||
* when it transitions from 'ArrangingPayment' to either 'PaymentAuthorized' or 'PaymentSettled'. | ||
* | ||
* Note that the exact point that it is set as "placed" can be configured according to the | ||
* {@link OrderPlacedStrategy}. | ||
* | ||
* @docsCategory events | ||
* @docsPage Event Types | ||
*/ | ||
export class OrderPlacedEvent extends VendureEvent { | ||
constructor( | ||
public fromState: OrderState, | ||
public toState: OrderState, | ||
public ctx: RequestContext, | ||
public order: Order, | ||
) { | ||
super(); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
packages/core/src/event-bus/events/order-state-transition-event.ts
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