Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ItemDetails.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  const KEY_CODE = 'code';
20  const KEY_TYPE = 'type';
21  const KEY_TAX_CLASS_KEY = 'tax_class_key';
22  const KEY_UNIT_PRICE = 'unit_price';
23  const KEY_QUANTITY = 'quantity';
24  const KEY_IS_TAX_INCLUDED = 'is_tax_included';
25  const KEY_SHORT_DESCRIPTION = 'short_description';
26  const KEY_DISCOUNT_AMOUNT = 'discount_amount';
27  const KEY_PARENT_CODE = 'parent_code';
28  const KEY_ASSOCIATED_ITEM_CODE = 'associated_item_code';
29  const KEY_TAX_CLASS_ID = 'tax_class_id';
35  public function getCode()
36  {
37  return $this->getData(self::KEY_CODE);
38  }
39 
43  public function getType()
44  {
45  return $this->getData(self::KEY_TYPE);
46  }
47 
51  public function getTaxClassKey()
52  {
53  return $this->getData(self::KEY_TAX_CLASS_KEY);
54  }
55 
59  public function getUnitPrice()
60  {
61  return $this->getData(self::KEY_UNIT_PRICE);
62  }
63 
67  public function getQuantity()
68  {
69  return $this->getData(self::KEY_QUANTITY);
70  }
71 
75  public function getIsTaxIncluded()
76  {
77  return $this->getData(self::KEY_IS_TAX_INCLUDED);
78  }
79 
83  public function getShortDescription()
84  {
85  return $this->getData(self::KEY_SHORT_DESCRIPTION);
86  }
87 
91  public function getDiscountAmount()
92  {
93  return $this->getData(self::KEY_DISCOUNT_AMOUNT);
94  }
95 
99  public function getParentCode()
100  {
101  return $this->getData(self::KEY_PARENT_CODE);
102  }
103 
107  public function getAssociatedItemCode()
108  {
109  return $this->getData(self::KEY_ASSOCIATED_ITEM_CODE);
110  }
111 
115  public function getTaxClassId()
116  {
117  return $this->getData(self::KEY_TAX_CLASS_ID);
118  }
119 
126  public function setCode($code)
127  {
128  return $this->setData(self::KEY_CODE, $code);
129  }
130 
137  public function setType($type)
138  {
139  return $this->setData(self::KEY_TYPE, $type);
140  }
141 
148  public function setTaxClassKey(\Magento\Tax\Api\Data\TaxClassKeyInterface $taxClassKey = null)
149  {
150  return $this->setData(self::KEY_TAX_CLASS_KEY, $taxClassKey);
151  }
152 
159  public function setUnitPrice($unitPrice)
160  {
161  return $this->setData(self::KEY_UNIT_PRICE, $unitPrice);
162  }
163 
170  public function setQuantity($quantity)
171  {
172  return $this->setData(self::KEY_QUANTITY, $quantity);
173  }
174 
181  public function setIsTaxIncluded($isTaxIncluded)
182  {
183  return $this->setData(self::KEY_IS_TAX_INCLUDED, $isTaxIncluded);
184  }
185 
192  public function setShortDescription($shortDescription)
193  {
194  return $this->setData(self::KEY_SHORT_DESCRIPTION, $shortDescription);
195  }
196 
203  public function setDiscountAmount($discountAmount)
204  {
205  return $this->setData(self::KEY_DISCOUNT_AMOUNT, $discountAmount);
206  }
207 
214  public function setParentCode($parentCode)
215  {
216  return $this->setData(self::KEY_PARENT_CODE, $parentCode);
217  }
218 
225  public function setAssociatedItemCode($associatedItemCode)
226  {
227  return $this->setData(self::KEY_ASSOCIATED_ITEM_CODE, $associatedItemCode);
228  }
229 
236  public function setTaxClassId($taxClassId)
237  {
238  return $this->setData(self::KEY_TAX_CLASS_ID, $taxClassId);
239  }
240 
246  public function getExtensionAttributes()
247  {
248  return $this->_getExtensionAttributes();
249  }
250 
257  public function setExtensionAttributes(
258  \Magento\Tax\Api\Data\QuoteDetailsItemExtensionInterface $extensionAttributes
259  ) {
260  return $this->_setExtensionAttributes($extensionAttributes);
261  }
262 }
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
$type
Definition: item.phtml:13
setTaxClassKey(\Magento\Tax\Api\Data\TaxClassKeyInterface $taxClassKey=null)
setExtensionAttributes(\Magento\Tax\Api\Data\QuoteDetailsItemExtensionInterface $extensionAttributes)
$code
Definition: info.phtml:12