<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use App\Listener\OrderListener;
use Symfony\Component\Serializer\Annotation\Ignore;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\OrderRepository")
* @ORM\Table(name="orders")
* @ORM\HasLifecycleCallbacks()
* @ORM\EntityListeners({OrderListener::class})
*/
class Order implements DomainBaseInterface
{
const STATUS_PAID = 'paid';
const STATUS_NEW = 'new';
const STATUS_OPEN = 'open';
const STATUS_FAILED = 'failed';
const STATUS_IN_PROCESS = 'IN_PROCESS';
const PARTIALLY_REFUNDED = 'partially refunded';
const REFUNDED = 'refunded';
const STATUS_CHARGEBACK = 'chargeback';
const STATUS_COPIED = 'copied';
const PARTIALLY_PAID = 'partially paid';
const STATUS_PENDING = 'pending';
const MANUALLY_CREATED = 'manually created';
const TZ = 'Europe/Amsterdam';
const SS_STATUS_NEW = 'New';
const SS_STATUS_DELIVERED = 'Delivered';
const SS_STATUS_SHIPPED = 'Shipped';
const SS_STATUS_CANCELED = 'Canceled';
const TYPE_ONE_OFF = 'one-off';
const TYPE_SUBSCRIPTION = 'subscription';
/**
* @Ignore()
*/
private int $variantId = 0;
/**
* @var int $id
* @ORM\Id()
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var PaymentProvider $paymentProvider
* @ORM\ManyToOne(targetEntity="PaymentProvider")
* @Ignore()
*/
private $paymentProvider;
/**
* @var ShippingProvider $shippingProvider
* @ORM\ManyToOne(targetEntity="ShippingProvider")
* @ORM\JoinColumn(referencedColumnName="id", nullable=true)
* @Ignore()
*/
private $shippingProvider;
/**
* @var EndUser $endUser
* @ORM\ManyToOne(targetEntity="EndUser", inversedBy="orders", fetch="EAGER", cascade={"persist"})
*/
private $endUser;
/**
* @var string $shippingStatus
* @ORM\Column(type="string")
*/
private $shippingStatus;
/**
* @var string $paymentStatus
* @ORM\Column(type="string")
*/
private $paymentStatus;
/**
* @var $totalPrice float
* @ORM\Column(type="decimal", precision=10, scale=2)
*/
private $totalPrice;
/**
* @var $saleSupplyId string
* @ORM\Column(type="string", nullable=true)
* @Ignore()
*/
private $saleSupplyId;
/**
* @ORM\Column(type="string", nullable=true)
* @Ignore()
*/
private $saleSupplyMainStatus;
/**
* @ORM\Column(type="string", nullable=true)
* @Ignore()
*/
private $saleSupplyShipmentStatus;
/**
* @ORM\Column(type="string", nullable=true)
* @Ignore()
*/
private $saleSupplyTrackingCode;
/**
* @ORM\Column(type="string", nullable=true)
* @Ignore()
*/
private $saleSupplyCarrierName;
/**
* @var boolean $termsAndConditions
* @Assert\IsTrue(message="You have to accept T&C's")
* @ORM\Column(type="boolean", nullable=true)
*/
private $termsAndConditions;
/**
* @var $paymentId string
* @ORM\Column(type="string", nullable=true)
*/
private $paymentId;
/**
* @var \DateTime $createdAt
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @var \DateTime $updatedAt
* @ORM\Column(type="datetime")
*/
private $updatedAt;
/**
* @var $status string
* @ORM\Column(type="string", nullable=true)
*/
private $status;
/**
* @var $paymentMethod string
* @ORM\Column(type="string", nullable=true)
*/
private $paymentMethod;
/**
* @var $products OrderProduct[]
* @ORM\OneToMany(targetEntity="OrderProduct", mappedBy="order", cascade={"persist"})
*/
private $products;
/**
* @var EndUserVoucher[] $vouchers
* @ORM\OneToMany(targetEntity="EndUserVoucher", mappedBy="order", fetch="EAGER" ,cascade={"persist", "remove"})
*/
private $vouchers;
/**
* @var $refunds OrderRefund[]
* @ORM\OneToMany(targetEntity="OrderRefund", mappedBy="order", cascade={"persist"})
*/
private $refunds;
/**
* @var
* @ORM\Column(type="array")
* @Ignore()
*/
private $userSnapshot;
/**
* @var \DateTime
* @ORM\Column(type="datetime", nullable=true)
*/
private $paidAt;
/**
* @var
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=false, options={"default" : 0})
*/
private $shippingCost = 0;
/**
* @var Domain $domain
* @ORM\ManyToOne(targetEntity="Domain")
* @Ignore()
*/
private $domain;
/**
* @Ignore()
*/
private $upsells;
/**
* @var $amountVat float
* @ORM\Column(type="decimal", scale=2, nullable=true)
*/
private $amountVat = 0;
/**
* @var
* @ORM\Column(type="string", nullable=false)
*/
private $currency;
/**
* @var DomainVat $domainVat
* @ORM\ManyToOne(targetEntity="DomainVat")
* @Ignore()
*/
private $domainVat;
/**
* @var
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $chargePsp = 0;
/**
* @var
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $chargeShipping = 0;
/**
* @var $country Country
* @ORM\ManyToOne(targetEntity="Country")
* @Ignore()
*/
private $country;
/**
* @var $tracker mixed
* @ORM\ManyToOne(targetEntity="Tracker", fetch="EAGER")
* @ORM\JoinColumn(referencedColumnName="id", nullable=true)
* @Ignore()
*/
private $tracker;
/**
* @var
* @ORM\Column(type="array", nullable=true)
* @Ignore()
*/
private $trackingParams;
/**
* @var \DateTime $postbackUrlDate
* @ORM\Column(type="datetime", nullable=true)
*/
private $postbackUrlDate;
/**
* @var $trackingCommission float
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $trackingCommission = 0;
/**
* @var $totalPriceEx float
* @ORM\Column(type="decimal", precision=10, scale=2)
*/
private $totalPriceEx = 0;
/**
* @var string $text
* @ORM\Column(type="text", nullable=true)
*/
private $comment;
/**
* @var string $orderNumber
* @ORM\Column(type="string", nullable=true)
*/
private $orderNumber;
/**
* @var int $id
* @ORM\Column(type="integer", nullable=true)
*/
private $countByUser;
/**
* @var
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $chargePickAndPack = 0;
/**
* @ORM\Column(type="string", nullable=true)
* @Ignore()
*/
private $saleSupplyTrackingUrl;
/**
* @ORM\OneToMany(targetEntity="Order", mappedBy="parent")
* @Ignore()
*/
protected $postOrders;
/**
* @ORM\ManyToOne(targetEntity="Order", inversedBy="postOrders")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
* @Ignore()
*/
protected $parent;
/**
* @var $eventId string
* @ORM\Column(type="string", nullable=true)
*/
private $eventId;
/**
* @var
* @ORM\Column(type="array", nullable=true)
* @Ignore()
*/
private $eventAdditionalParams;
/**
* @var $totalPriceToEUR float
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=false, options={"after": "totalPrice", "default" : 0})
*/
private $totalPriceToEUR = 0;
/**
* @var $totalPriceExToEUR float
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=false, options={"after": "total_price_ex", "default" : 0})
*/
private $totalPriceExToEUR = 0;
/**
* @var
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=false, options={"after": "shipping_cost","default" : 0})
*/
private $shippingCostToEUR = 0;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $type;
/**
* @Ignore()
*/
private $subscriptionId;
/**
* @ORM\OneToOne(targetEntity="App\Entity\OrderSubscription", mappedBy="order", fetch="EAGER")
* @Ignore()
*/
private $orderSubscription;
/**
* @ORM\OneToOne(targetEntity="App\Entity\OrderHolder", mappedBy="order")
* @Ignore()
*/
private $orderHolder;
/**
* @var $productCost float
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $productCost = 0;
/**
* @var $productCostToEUR float
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $productCostToEUR = 0;
/**
* @var $returnCost float
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $returnCost = 0;
/**
* @var $returnCostToEUR float
* @ORM\Column(type="decimal", precision=10, scale=2, options={"default" : 0})
*/
private $returnCostToEUR = 0;
/**
* @var Product $firstProduct
* @ORM\ManyToOne(targetEntity="Product", inversedBy="orders")
* @Ignore()
*/
private $firstProduct;
/**
* @var $warehouse Warehouse
* @ORM\ManyToOne(targetEntity="Warehouse")
* @ORM\JoinColumn(name="warehouse_id", referencedColumnName="id", nullable=true)
* @Ignore()
*/
private $warehouse;
/**
* @ORM\OneToOne(targetEntity="OrderWarehouseDetail", mappedBy="order", fetch="EAGER", cascade={"persist", "remove"})
*/
private $orderWarehouseDetail;
/**
* @ORM\OneToOne(targetEntity="OrderCalculatedData", mappedBy="order", fetch="EAGER", cascade={"persist", "remove"})
*/
private $orderCalculatedData;
private $paymentUrl;
/**
* @var boolean $isVoucher
* @ORM\Column(type="boolean", options={"default":0})
*/
private $isVoucher = 0;
/**
* @var boolean $isFirstOrder
* @ORM\Column(type="boolean", options={"default":0})
*/
private $isFirstOrder = 0;
/**
* @return null|Warehouse
*/
public function getWarehouse(): ?Warehouse
{
return $this->warehouse;
}
/**
* @param Warehouse $warehouse
* @return self
*/
public function setWarehouse(Warehouse $warehouse): self
{
$this->warehouse = $warehouse;
return $this;
}
/**
* @ORM\Column(type="string", nullable=true)
*/
private $ip;
/**
* @var $funnel mixed
* @ORM\ManyToOne(targetEntity="Funnel", fetch="EAGER")
* @ORM\JoinColumn(referencedColumnName="id", nullable=true)
* @Ignore()
*/
private $funnel;
public function __construct()
{
$this->products = new ArrayCollection();
$this->refunds = new ArrayCollection();
$this->postOrders = new ArrayCollection();
$this->vouchers = new ArrayCollection();
}
/**
* @return int
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @return PaymentProvider
*/
public function getPaymentProvider(): ?PaymentProvider
{
return $this->paymentProvider;
}
/**
* @param PaymentProvider|null $paymentProvider
* @return self
*/
public function setPaymentProvider(?PaymentProvider $paymentProvider): self
{
$this->paymentProvider = $paymentProvider;
return $this;
}
/**
* @return ShippingProvider
*/
public function getShippingProvider(): ?ShippingProvider
{
return $this->shippingProvider;
}
/**
* @param ShippingProvider $shippingProvider
* @return self
*/
public function setShippingProvider(?ShippingProvider $shippingProvider): self
{
$this->shippingProvider = $shippingProvider;
return $this;
}
/**
* @return EndUser
*/
public function getEndUser(): ?EndUser
{
return $this->endUser;
}
/**
* @param EndUser $endUser
* @return self
*/
public function setEndUser(EndUser $endUser): self
{
$this->endUser = $endUser;
return $this;
}
/**
* @return string
*/
public function getShippingStatus(): string
{
return $this->shippingStatus;
}
/**
* @param string $shippingStatus
* @return self
*/
public function setShippingStatus(string $shippingStatus): self
{
$this->shippingStatus = $shippingStatus;
return $this;
}
/**
* @return string
*/
public function getPaymentStatus(): string
{
return $this->paymentStatus;
}
/**
* @param string $paymentStatus
* @return self
*/
public function setPaymentStatus(string $paymentStatus): self
{
$this->paymentStatus = $paymentStatus;
return $this;
}
/**
* @return float
*/
public function getTotalPrice(): ?float
{
return $this->totalPrice;
}
/**
* @param float $totalPrice
* @return self
*/
public function setTotalPrice(float $totalPrice): self
{
$this->totalPrice = $totalPrice;
return $this;
}
/**
* @return string
*/
public function getSaleSupplyId(): ?string
{
return $this->saleSupplyId;
}
/**
* @param string $saleSupplyId
* @return self
*/
public function setSaleSupplyId(string $saleSupplyId): self
{
$this->saleSupplyId = $saleSupplyId;
return $this;
}
/**
* @return mixed
*/
public function getSaleSupplyMainStatus()
{
return $this->saleSupplyMainStatus;
}
/**
* @param mixed $saleSupplyMainStatus
* @return self
*/
public function setSaleSupplyMainStatus($saleSupplyMainStatus): self
{
$this->saleSupplyMainStatus = $saleSupplyMainStatus;
return $this;
}
/**
* @return mixed
*/
public function getSaleSupplyShipmentStatus()
{
return $this->saleSupplyShipmentStatus;
}
/**
* @param mixed $saleSupplyShipmentStatus
* @return self
*/
public function setSaleSupplyShipmentStatus($saleSupplyShipmentStatus): self
{
$this->saleSupplyShipmentStatus = $saleSupplyShipmentStatus;
return $this;
}
/**
* @return mixed
*/
public function getSaleSupplyTrackingCode()
{
return $this->saleSupplyTrackingCode;
}
/**
* @param mixed $saleSupplyTrackingCode
* @return self
*/
public function setSaleSupplyTrackingCode($saleSupplyTrackingCode): self
{
$this->saleSupplyTrackingCode = $saleSupplyTrackingCode;
return $this;
}
/**
* @return string
*/
public function getPaymentId(): ?string
{
return $this->paymentId;
}
/**
* @param string $paymentId
* @return self
*/
public function setPaymentId(string $paymentId): self
{
$this->paymentId = $paymentId;
return $this;
}
/**
* @return string
*/
public function getPaymentUrl(): ?string
{
return $this->paymentUrl;
}
/**
* @param string|null $paymentUrl
* @return self
*/
public function setPaymentUrl(?string $paymentUrl): self
{
$this->paymentUrl = $paymentUrl;
return $this;
}
/**
* @return string
*/
public function getStatus(): ?string
{
return $this->status;
}
/**
* @param string $status
* @return self
*/
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
/**
* @return bool
*/
public function isTermsAndConditions(): bool
{
return $this->termsAndConditions;
}
/**
* @param bool $termsAndConditions
*/
public function setTermsAndConditions(bool $termsAndConditions): self
{
$this->termsAndConditions = $termsAndConditions;
return $this;
}
/**
* @return OrderProduct[]
*/
public function getProducts()
{
return $this->products;
}
/**
* @return self
*/
public function resetProducts(): self
{
$this->products = new ArrayCollection();
return $this;
}
/**
* @param OrderProduct[] $products
* @return self
*/
public function addOrderProduct(OrderProduct $orderProduct): self
{
if (!$this->products->contains($orderProduct)) {
$this->products[] = $orderProduct;
$orderProduct->setOrder($this);
}
return $this;
}
/**
* @param OrderProduct[] $products
* @return self
*/
public function removeOrderProduct(OrderProduct $orderProduct): self
{
if ($this->products->contains($orderProduct)) {
$this->products->removeElement($orderProduct);
// if ($orderProduct->getOrder() === $this) {
// $orderProduct->setOrder(null);
// }
}
return $this;
}
public function setProducts($products): self
{
$this->products = $products;
return $this;
}
public function getVouchers()
{
return $this->vouchers;
}
/**
* @return \DateTime
*/
public function getCreatedAt(): \DateTime
{
return $this->createdAt;
}
/**
* @param \DateTime $createdAt
* @return self
*/
public function setCreatedAt(\DateTime $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return \DateTime
*/
public function getUpdatedAt(): \DateTime
{
return $this->updatedAt;
}
/**
* @param \DateTime $updatedAt
* @return self
*/
public function setUpdatedAt(\DateTime $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* @ORM\PrePersist()
*/
public function prePersist()
{
$orderProduct = $this->products->first();
$this->firstProduct = $orderProduct ? $orderProduct->getProduct() : null;
$this->orderWarehouseDetail = new OrderWarehouseDetail();
$this->orderWarehouseDetail->setOrder($this);
$this->createdAt = new \DateTime('now', new \DateTimeZone(self::TZ));
$this->updatedAt = new \DateTime('now', new \DateTimeZone(self::TZ));
}
/**
* @return void
* @ORM\PreUpdate()
*/
public function preUpdate()
{
$this->updatedAt = new \DateTime('now', new \DateTimeZone(self::TZ));
}
/**
* @return mixed
*/
public function getUpsells()
{
return $this->upsells;
}
/**
* @param mixed $upsells
* @return self
*/
public function setUpsells($upsells): self
{
$this->upsells = $upsells;
return $this;
}
/**
* @return string
*/
public function getPaymentMethod()
{
return $this->paymentMethod;
}
/**
* @param mixed $paymentMethod
*/
public function setPaymentMethod($paymentMethod): self
{
$this->paymentMethod = $paymentMethod;
return $this;
}
/**
* @return \DateTime
*/
public function getPaidAt(): ?\DateTime
{
return $this->paidAt;
}
/**
* @param \DateTime $paidAt
*/
public function setPaidAt(?\DateTime $paidAt): self
{
$this->paidAt = $paidAt;
return $this;
}
/**
* @return mixed
*/
public function getUserSnapshot()
{
return $this->userSnapshot;
}
/**
* @param mixed $userSnapshot
*/
public function setUserSnapshot($userSnapshot): self
{
$this->userSnapshot = $userSnapshot;
return $this;
}
/**
* @return DomainVat
*/
public function getDomainVat()
{
return $this->domainVat;
}
/**
* @param mixed $domainVat
*/
public function setDomainVat($domainVat): self
{
$this->domainVat = $domainVat;
return $this;
}
/**
* @return float
*/
public function getAmountVat(): ?float
{
return $this->amountVat;
}
/**
* @param float $amountVat
* @return self
*/
public function setAmountVat($amountVat): self
{
$this->amountVat = $amountVat;
return $this;
}
/**
* @return mixed
*/
public function getShippingCost()
{
return $this->shippingCost;
}
/**
* @param mixed $shippingCost
*/
public function setShippingCost($shippingCost): self
{
$this->shippingCost = $shippingCost;
return $this;
}
/**
* @return mixed
*/
public function getCurrency()
{
return $this->currency;
}
/**
* @param mixed $currency
* @return self
*/
public function setCurrency($currency): self
{
$this->currency = $currency;
return $this;
}
/**
* @return Country
*/
public function getCountry(): ?Country
{
return $this->country;
}
/**
* @param Country|null $country
* @return self
*/
public function setCountry(?Country $country): self
{
$this->country = $country;
return $this;
}
/**
* @return mixed
*/
public function getChargePsp()
{
return $this->chargePsp;
}
/**
* @param mixed $chargePsp
* @return self
*/
public function setChargePsp($chargePsp): self
{
$this->chargePsp = $chargePsp;
return $this;
}
/**
* @return mixed
*/
public function getChargeShipping()
{
return $this->chargeShipping;
}
/**
* @param mixed $chargeShipping
* @return self
*/
public function setChargeShipping($chargeShipping): self
{
$this->chargeShipping = $chargeShipping;
return $this;
}
/**
* @return mixed
*/
public function getTracker(): ?Tracker
{
return $this->tracker;
}
/**
* @param mixed $tracker
* @return self
*/
public function setTracker(?Tracker $tracker): self
{
$this->tracker = $tracker;
return $this;
}
/**
* @return mixed
*/
public function getTrackingParams()
{
return $this->trackingParams;
}
/**
* @param mixed $trackingParams
*/
public function setTrackingParams($trackingParams): self
{
$this->trackingParams = $trackingParams;
return $this;
}
/**
* @return mixed
*/
public function getPostbackUrlDate(): ?\DateTime
{
return $this->postbackUrlDate;
}
/**
* @param mixed $postbackUrlDate
* @return self
*/
public function setPostbackUrlDate(?\DateTime $postbackUrlDate): self
{
$this->postbackUrlDate = $postbackUrlDate;
return $this;
}
/**
* @return mixed
*/
public function getDomain(): ?Domain
{
return $this->domain;
}
/**
* @param mixed $domain
* @return self
*/
public function setDomain($domain): self
{
$this->domain = $domain;
return $this;
}
/**
* @return mixed
*/
public function getTrackingCommission(): ?float
{
return $this->trackingCommission;
}
/**
* @param float $trackingCommission
* @return self
*/
public function setTrackingCommission(float $trackingCommission): self
{
$this->trackingCommission = $trackingCommission;
return $this;
}
/**
* @return mixed
*/
public function getSaleSupplyCarrierName()
{
return $this->saleSupplyCarrierName;
}
/**
* @param mixed $saleSupplyCarrierName
* @return self
*/
public function setSaleSupplyCarrierName($saleSupplyCarrierName): self
{
$this->saleSupplyCarrierName = $saleSupplyCarrierName;
return $this;
}
/**
* @return string
*/
public function getComment(): ?string
{
return $this->comment;
}
/**
* @param mixed $comment
* @return self
*/
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
/**
* @return float
*/
public function getTotalPriceEx(): float
{
return $this->totalPriceEx;
}
/**
* @param float $totalPriceEx
* @return self
*/
public function setTotalPriceEx(float $totalPriceEx): self
{
$this->totalPriceEx = $totalPriceEx;
return $this;
}
/**
* @return mixed
*/
public function getRefunds()
{
return $this->refunds;
}
public function addRefund(OrderRefund $orderRefund)
{
if (!$this->refunds->contains($orderRefund)) {
$this->refunds[] = $orderRefund;
$orderRefund->setOrder($this);
}
return $this;
}
/**
* @return mixed
*/
public function getOrderNumber(): ?string
{
return $this->orderNumber;
}
/**
* @param null|string $orderNumber
* @return self
*/
public function setOrderNumber(?string $orderNumber): self
{
$this->orderNumber = $orderNumber;
return $this;
}
/**
* @return null|int
*/
public function getCountByUser(): ?int
{
return $this->countByUser;
}
/**
* @param null|int $countByUser
* @return self
*/
public function setCountByUser(?int $countByUser): self
{
$this->countByUser = $countByUser;
return $this;
}
/**
* @return mixed
*/
public function getChargePickAndPack()
{
return $this->chargePickAndPack;
}
/**
* @param mixed $chargePickAndPack
* @return self
*/
public function setChargePickAndPack($chargePickAndPack): self
{
$this->chargePickAndPack = $chargePickAndPack;
return $this;
}
/**
* @return mixed
*/
public function getSaleSupplyTrackingUrl()
{
return $this->saleSupplyTrackingUrl;
}
/**
* @param mixed $saleSupplyTrackingUrl
* @return self
*/
public function setSaleSupplyTrackingUrl($saleSupplyTrackingUrl): self
{
$this->saleSupplyTrackingUrl = $saleSupplyTrackingUrl;
return $this;
}
/**
* @return Order|null
*/
public function getParent(): ?Order
{
return $this->parent;
}
/**
* @param Order|null $parent
* @return self
*/
public function setParent(?Order $parent): self
{
$this->parent = $parent;
return $this;
}
/**
* @return mixed
*/
public function getPostOrders()
{
return $this->postOrders;
}
/**
* @return string|null
*/
public function getEventId(): ?string
{
return $this->eventId;
}
/**
* @param string|null $eventId
* @return self
*/
public function setEventId(?string $eventId): self
{
$this->eventId = $eventId;
return $this;
}
/**
* @return mixed
*/
public function getEventAdditionalParams()
{
return $this->eventAdditionalParams;
}
/**
* @param mixed $eventAdditionalParams
*/
public function setEventAdditionalParams($eventAdditionalParams): self
{
$this->eventAdditionalParams = $eventAdditionalParams;
return $this;
}
/**
* @return float
*/
public function getTotalPriceToEUR(): float
{
return $this->totalPriceToEUR;
}
/**
* @param float $totalPriceToEUR
* @return self
*/
public function setTotalPriceToEUR(float $totalPriceToEUR): self
{
$this->totalPriceToEUR = $totalPriceToEUR;
return $this;
}
/**
* @return float
*/
public function getTotalPriceExToEUR(): float
{
return $this->totalPriceExToEUR;
}
/**
* @param float $totalPriceExToEUR
* @return self
*/
public function setTotalPriceExToEUR(float $totalPriceExToEUR): self
{
$this->totalPriceExToEUR = $totalPriceExToEUR;
return $this;
}
/**
* @return mixed
*/
public function getShippingCostToEUR()
{
return $this->shippingCostToEUR;
}
/**
* @param mixed $shippingCostToEUR
*/
public function setShippingCostToEUR($shippingCostToEUR): self
{
$this->shippingCostToEUR = $shippingCostToEUR;
return $this;
}
/**
* @return mixed
*/
public function getType()
{
return $this->type;
}
/**
* @param mixed $type
* @return self
*/
public function setType($type): self
{
$this->type = $type;
return $this;
}
/**
* @return mixed
*/
public function getSubscriptionId()
{
return $this->subscriptionId;
}
/**
* @param mixed $subscriptionId
* @return self
*/
public function setSubscriptionId($subscriptionId): self
{
$this->subscriptionId = $subscriptionId;
return $this;
}
public function getOrderSubscription(): ?OrderSubscription
{
return $this->orderSubscription;
}
/**
* @param OrderSubscription|null $orderSubscription
* @return self
*/
public function setOrderSubscription(?OrderSubscription $orderSubscription): self
{
$this->orderSubscription = $orderSubscription;
return $this;
}
public function __clone()
{
$this->id = null;
$this->saleSupplyId = null;
$this->saleSupplyCarrierName = null;
$this->saleSupplyMainStatus = null;
$this->saleSupplyShipmentStatus = null;
$this->saleSupplyTrackingCode = null;
$this->saleSupplyTrackingUrl = null;
$this->totalPrice = 0;
$this->paymentId = null;
$this->userSnapshot = null;
$this->amountVat = 0;
$this->chargePsp = 0;
$this->chargeShipping = 0;
$this->trackingParams = null;
$this->tracker = null;
$this->postbackUrlDate = null;
$this->trackingCommission = 0;
$this->comment = null;
$this->totalPriceEx = 0;
$this->countByUser = null;
$this->chargePickAndPack = 0;
$this->parent = null;
$this->eventAdditionalParams = null;
$this->refunds = new ArrayCollection();
$this->postOrders = new ArrayCollection();
$this->shippingStatus = null;
$this->paymentStatus = null;
$this->paidAt = null;
$this->warehouse = null;
}
/**
* @return null|OrderHolder
*/
public function getOrderHolder(): ?OrderHolder
{
return $this->orderHolder;
}
/**
* @param OrderHolder|null $orderHolder
* @return self
*/
public function setOrderHolder(?OrderHolder $orderHolder): self
{
$this->orderHolder = $orderHolder;
return $this;
}
/**
* @return float
*/
public function getProductCost(): float
{
return $this->productCost;
}
/**
* @param float $productCost
* @return self
*/
public function setProductCost(float $productCost): self
{
$this->productCost = $productCost;
return $this;
}
/**
* @return float
*/
public function getProductCostToEUR(): float
{
return $this->productCostToEUR;
}
/**
* @param float $productCostToEUR
* @return self
*/
public function setProductCostToEUR(float $productCostToEUR): self
{
$this->productCostToEUR = $productCostToEUR;
return $this;
}
/**
* @return float
*/
public function getReturnCost(): float
{
return $this->returnCost;
}
/**
* @param float $returnCost
* @return self
*/
public function setReturnCost(float $returnCost): self
{
$this->returnCost = $returnCost;
return $this;
}
/**
* @return float
*/
public function getReturnCostToEUR(): float
{
return $this->returnCostToEUR;
}
/**
* @param float $returnCostToEUR
* @return self
*/
public function setReturnCostToEUR(float $returnCostToEUR): self
{
$this->returnCostToEUR = $returnCostToEUR;
return $this;
}
/**
* @return Product
*/
public function getFirstProduct(): ?Product
{
return $this->firstProduct;
}
/**
* @param Product|null $firstProduct
* @return self
*/
public function setFirstProduct(?Product $firstProduct): self
{
$this->firstProduct = $firstProduct;
return $this;
}
public function getOrderWarehouseDetail(): ?OrderWarehouseDetail
{
return $this->orderWarehouseDetail;
}
/**
* @param OrderWarehouseDetail|null $orderWarehouseDetail
* @return self
*/
public function setOrderWarehouseDetail(?OrderWarehouseDetail $orderWarehouseDetail): self
{
$this->orderWarehouseDetail = $orderWarehouseDetail;
if ($orderWarehouseDetail && $orderWarehouseDetail->getOrder() !== $this) {
$orderWarehouseDetail->setOrder($this);
}
return $this;
}
/**
* @return Funnel|null
*/
public function getFunnel(): ?Funnel
{
return $this->funnel;
}
/**
* @param Funnel|null $funnel
* @return self
*/
public function setFunnel(?Funnel $funnel): self
{
$this->funnel = $funnel;
return $this;
}
/**
* @return bool|int
*/
public function isVoucher()
{
return $this->isVoucher;
}
/**
* @param bool|int $isVoucher
* @return Order
*/
public function setIsVoucher($isVoucher)
{
$this->isVoucher = $isVoucher;
return $this;
}
/**
* @return bool|int
*/
public function isFirstOrder()
{
return $this->isFirstOrder;
}
/**
* @param bool|int $isFirstOrder
* @return Order
*/
public function setIsFirstOrder($isFirstOrder): self
{
$this->isFirstOrder = $isFirstOrder;
return $this;
}
/**
* @return mixed
*/
public function getIp()
{
return $this->ip;
}
/**
* @param string|null $ip
* @return self
*/
public function setIp(?string $ip): self
{
$this->ip = $ip;
return $this;
}
public function getVariantId(): ?int
{
return $this->variantId;
}
public function setVariantId(?int $variantId): self
{
$this->variantId = $variantId;
return $this;
}
}