billNo = $billNo; $this->transactionType = $transactionType; $this->issuer = $issuer; $this->receiver = $receiver; $this->recipientBankAccountId = $recipientBankAccountId; $this->paymentMethod = $paymentMethod; $this->amount = $amount; $this->originalAmount = $originalAmount; $this->currencyId = $currencyId; $this->originalCurrencyId = $originalCurrencyId; $this->currencyRate = $currencyRate; $this->tax = $tax; $this->serviceCharge = $serviceCharge; $this->expiresOn = $expiresOn; $this->status = $status; $this->details = $details; $this->paymentReference = $paymentReference; } /** * @return string */ public function getBillNo(): string { return $this->billNo; } /** * @return string */ public function getTransactionType(): string { return $this->transactionType; } /** * @return int */ public function getIssuer(): int { return $this->issuer; } /** * @return int */ public function getReceiver(): int { return $this->receiver; } /** * @return int */ public function getRecipientBankAccountId(): int { return $this->recipientBankAccountId; } /** * @return int */ public function getPaymentMethod(): int { return $this->paymentMethod; } /** * @return float */ public function getAmount(): float { return $this->amount; } /** * @return float */ public function getOriginalAmount(): float { return $this->originalAmount; } /** * @return int */ public function getCurrencyId(): int { return $this->currencyId; } /** * @return int */ public function getOriginalCurrencyId(): int { return $this->originalCurrencyId; } /** * @return float */ public function getCurrencyRate(): float { return $this->currencyRate; } /** * @return float */ public function getTax(): float { return $this->tax; } /** * @return float */ public function getServiceCharge(): float { return $this->serviceCharge; } /** * @return Carbon|null */ public function getExpiresOn(): ?Carbon { return $this->expiresOn; } /** * @return int */ public function getStatus(): int { return $this->status; } /** * @return array */ public function getDetails(): array { return array_map(function($product){ return new TransactionDetailObject($product['stockCode'] ?? '', $product['description'] ?? '', $product['quantity'] ?? '', floatval(str_replace(',', '', $product['unit_price']))); }, $this->details); } /** * @return string|null */ public function getPaymentReference(): ?string { return $this->paymentReference; } /** * Set the amount. * * @param float $amount * @return void */ public function setAmount(float $amount): void { $this->amount = $amount; } /** * Set the original amount. * * @param float $originalAmount * @return void */ public function setOriginalAmount(float $originalAmount): void { $this->originalAmount = $originalAmount; } }