Use Case
export class ProcessOrderUseCase {
static Token = "ProcessOrderUseCase";
public async execute(
orderItems: Product[],
customerDetails: Customer,
paymentMethod: string,
): Promise<Result<OrderConfirmation>> {
let confirmation: OrderConfirmation;
// logic ...
return Result.withContent(confirmation);
}
}Creating new use case
Using CLI Command with options
soap new use-case -n "ProcessOrder" -e "shop" -i "orderItems:Array<Entity<Product>>,customerDetails:Customer,paymentMethod:string" -o "Entity<OrderConfirmation>" -w -fUsing Interactive Form
Using JSON Configuration
File Structure
Last updated