Business rules

Class BusinessRules

Business rules for generic invoice.

Index

Constructor methods

Properties

Get accessors

Methods

Constructor methods

constructor(Data: IInvoiceData): BusinessRules

Default ctor.

Parameters

Returns

BusinessRules

Properties

public Data: IInvoiceData

public InvoiceValidator: any

All business rules for invoice.

public ValidationResult: any

Return all invoice errors.

Get accessors

public Name(): string

Business rules name

Returns

string

Methods

public Validate(): Q.Promise<Validation.IValidationResult>

Executes all business rules.

Returns

Q.Promise<Validation.IValidationResult>

private createInvoiceValidator(): Validation.IAbstractValidator<Invoice.IInvoiceData>

Returns

Validation.IAbstractValidator<Invoice.IInvoiceData>

private createItemValidator(): Validation.IAbstractValidator<Invoice.IItem>

Returns

Validation.IAbstractValidator<Invoice.IItem>

private createSubjectValidator(): Validation.IAbstractValidator<Invoice.ISubject>

Returns

Validation.IAbstractValidator<Invoice.ISubject>