Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CouponGenerationSpec.php
Go to the documentation of this file.
1 <?php
9 
17 {
18  const KEY_RULE_ID = 'rule_id';
19  const KEY_FORMAT = 'format';
20  const KEY_LENGTH = 'length';
21  const KEY_QUANTITY = 'quantity';
22  const KEY_PREFIX = 'prefix';
23  const KEY_SUFFIX = 'suffix';
24  const KEY_DELIMITER_AT_EVERY = 'dash';
25  const KEY_DELIMITER = 'delimiter';
26 
32  public function getRuleId()
33  {
34  return $this->_get(self::KEY_RULE_ID);
35  }
36 
43  public function setRuleId($ruleId)
44  {
45  return $this->setData(self::KEY_RULE_ID, $ruleId);
46  }
47 
53  public function getFormat()
54  {
55  return $this->_get(self::KEY_FORMAT);
56  }
57 
64  public function setFormat($format)
65  {
66  return $this->setData(self::KEY_FORMAT, $format);
67  }
68 
74  public function getQuantity()
75  {
76  return $this->_get(self::KEY_QUANTITY);
77  }
78 
85  public function setQuantity($quantity)
86  {
87  return $this->setData(self::KEY_QUANTITY, $quantity);
88  }
89 
95  public function getLength()
96  {
97  return $this->_get(self::KEY_LENGTH);
98  }
99 
106  public function setLength($length)
107  {
108  return $this->setData(self::KEY_LENGTH, $length);
109  }
110 
116  public function getPrefix()
117  {
118  return $this->_get(self::KEY_PREFIX);
119  }
120 
127  public function setPrefix($prefix)
128  {
129  return $this->setData(self::KEY_PREFIX, $prefix);
130  }
131 
137  public function getSuffix()
138  {
139  return $this->_get(self::KEY_SUFFIX);
140  }
141 
148  public function setSuffix($suffix)
149  {
150  return $this->setData(self::KEY_SUFFIX, $suffix);
151  }
152 
158  public function getDelimiterAtEvery()
159  {
160  return $this->_get(self::KEY_DELIMITER_AT_EVERY);
161  }
162 
169  public function setDelimiterAtEvery($delimiterAtEvery)
170  {
171  return $this->setData(self::KEY_DELIMITER_AT_EVERY, $delimiterAtEvery);
172  }
173 
179  public function getDelimiter()
180  {
181  return $this->_get(self::KEY_DELIMITER);
182  }
183 
190  public function setDelimiter($delimiter)
191  {
192  return $this->setData(self::KEY_DELIMITER, $delimiter);
193  }
194 
200  public function getExtensionAttributes()
201  {
202  return $this->_getExtensionAttributes();
203  }
204 
211  public function setExtensionAttributes(
212  \Magento\SalesRule\Api\Data\CouponGenerationSpecExtensionInterface $extensionAttributes
213  ) {
214  return $this->_setExtensionAttributes($extensionAttributes);
215  }
216 }
_setExtensionAttributes(\Magento\Framework\Api\ExtensionAttributesInterface $extensionAttributes)
$suffix
Definition: name.phtml:27
setExtensionAttributes(\Magento\SalesRule\Api\Data\CouponGenerationSpecExtensionInterface $extensionAttributes)
$prefix
Definition: name.phtml:25
$format
Definition: list.phtml:12
$extensionAttributes
Definition: payment.php:22