Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Reservation.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
11 
18 {
22  private $reservationId;
23 
27  private $stockId;
28 
32  private $sku;
33 
37  private $quantity;
38 
42  private $metadata;
43 
51  public function __construct(
52  $reservationId,
53  int $stockId,
54  string $sku,
55  float $quantity,
56  $metadata = null
57  ) {
58  $this->reservationId = $reservationId;
59  $this->stockId = $stockId;
60  $this->sku = $sku;
61  $this->quantity = $quantity;
62  $this->metadata = $metadata;
63  }
64 
68  public function getReservationId(): ?int
69  {
70  return $this->reservationId === null ?
71  null:
72  (int)$this->reservationId;
73  }
74 
78  public function getStockId(): int
79  {
80  return $this->stockId;
81  }
82 
86  public function getSku(): string
87  {
88  return $this->sku;
89  }
90 
94  public function getQuantity(): float
95  {
96  return $this->quantity;
97  }
98 
102  public function getMetadata(): ?string
103  {
104  return $this->metadata;
105  }
106 }
__construct( $reservationId, int $stockId, string $sku, float $quantity, $metadata=null)
Definition: Reservation.php:51