vendor/shopware/core/Checkout/Cart/Transaction/Struct/Transaction.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Checkout\Cart\Transaction\Struct;
  3. use Shopware\Core\Checkout\Cart\Price\Struct\CalculatedPrice;
  4. use Shopware\Core\Framework\Log\Package;
  5. use Shopware\Core\Framework\Struct\Struct;
  6. #[Package('checkout')]
  7. class Transaction extends Struct
  8. {
  9.     /**
  10.      * @var CalculatedPrice
  11.      */
  12.     protected $amount;
  13.     /**
  14.      * @var string
  15.      */
  16.     protected $paymentMethodId;
  17.     public function __construct(CalculatedPrice $amountstring $paymentMethodId)
  18.     {
  19.         $this->amount $amount;
  20.         $this->paymentMethodId $paymentMethodId;
  21.     }
  22.     public function getAmount(): CalculatedPrice
  23.     {
  24.         return $this->amount;
  25.     }
  26.     public function setAmount(CalculatedPrice $amount): void
  27.     {
  28.         $this->amount $amount;
  29.     }
  30.     public function getPaymentMethodId(): string
  31.     {
  32.         return $this->paymentMethodId;
  33.     }
  34.     public function setPaymentMethodId(string $paymentMethodId): void
  35.     {
  36.         $this->paymentMethodId $paymentMethodId;
  37.     }
  38.     public function getApiAlias(): string
  39.     {
  40.         return 'cart_transaction';
  41.     }
  42. }