Initial xentral_oss_20.3.c9ffacf

This commit is contained in:
Alex
2021-05-21 08:49:41 +02:00
parent 5406e4a551
commit 34e5ac43d9
18884 changed files with 2109867 additions and 0 deletions
@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace Xentral\Modules\FiskalyApi\Data\CashPointClosing;
class CashPointClosingInternalTransaktionReference extends CashPointClosingTransactionLineReference
{
/** @var string $txId */
private $txId;
/**
* CashPointClosingInternalTransaktionReference constructor.
*
* @param string $type
* @param string $txId
*/
public function __construct(string $type, string $txId)
{
parent::__construct($type);
$this->txId = $txId;
}
/**
* @param $apiResult
*
* @return CashPointClosingInternalTransaktionReference
*/
public static function fromApiResult(object $apiResult): CashPointClosingInternalTransaktionReference
{
return new self($apiResult->type, $apiResult->tx_id);
}
/**
* @param array $dbState
*
* @return CashPointClosingInternalTransaktionReference
*/
public static function fromDbState(array $dbState): CashPointClosingInternalTransaktionReference
{
return new self($dbState['type'], $dbState['tx_id']);
}
/**
* @return array
*/
public function toArray(): array
{
$dbState = parent::toArray();
$dbState['tx_id'] = $this->txId;
return $dbState;
}
/**
* @return string
*/
public function getTxId(): string
{
return $this->txId;
}
/**
* @param string $txId
*/
public function setTxId(string $txId): void
{
$this->txId = $txId;
}
}