This commit is contained in:
2025-12-21 19:53:22 +01:00
parent f2d8a23583
commit 3c64f328e2
105 changed files with 3191 additions and 1706 deletions

View File

@@ -5,22 +5,22 @@ import type {
} from '@core/payments/application/presenters/ICreatePaymentPresenter';
export class CreatePaymentPresenter implements ICreatePaymentPresenter {
private result: CreatePaymentViewModel | null = null;
private responseModel: CreatePaymentViewModel | null = null;
reset() {
this.result = null;
this.responseModel = null;
}
present(dto: CreatePaymentResultDTO) {
this.result = dto;
this.responseModel = dto;
}
getViewModel(): CreatePaymentViewModel | null {
return this.result;
getResponseModel(): CreatePaymentViewModel | null {
return this.responseModel;
}
get viewModel(): CreatePaymentViewModel {
if (!this.result) throw new Error('Presenter not presented');
return this.result;
get responseModel(): CreatePaymentViewModel {
if (!this.responseModel) throw new Error('Presenter not presented');
return this.responseModel;
}
}