SourceInterface.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventoryApi\Api\Data;
  8. /**
  9. * Represents physical storage, i.e. brick and mortar store or warehouse
  10. *
  11. * Used fully qualified namespaces in annotations for proper work of WebApi request parser
  12. *
  13. * @api
  14. */
  15. interface SourceInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  16. {
  17. /**
  18. * Constants for keys of data array. Identical to the name of the getter in snake case
  19. */
  20. const SOURCE_CODE = 'source_code';
  21. const NAME = 'name';
  22. const CONTACT_NAME = 'contact_name';
  23. const EMAIL = 'email';
  24. const ENABLED = 'enabled';
  25. const DESCRIPTION = 'description';
  26. const LATITUDE = 'latitude';
  27. const LONGITUDE = 'longitude';
  28. const COUNTRY_ID = 'country_id';
  29. const REGION_ID = 'region_id';
  30. const REGION = 'region';
  31. const CITY = 'city';
  32. const STREET = 'street';
  33. const POSTCODE = 'postcode';
  34. const PHONE = 'phone';
  35. const FAX = 'fax';
  36. const USE_DEFAULT_CARRIER_CONFIG = 'use_default_carrier_config';
  37. const CARRIER_LINKS = 'carrier_links';
  38. /**
  39. * Get source code
  40. *
  41. * @return string|null
  42. */
  43. public function getSourceCode(): ?string;
  44. /**
  45. * Set source code
  46. *
  47. * @param string|null $sourceCode
  48. * @return void
  49. */
  50. public function setSourceCode(?string $sourceCode): void;
  51. /**
  52. * Get source name
  53. *
  54. * @return string|null
  55. */
  56. public function getName(): ?string;
  57. /**
  58. * Set source name
  59. *
  60. * @param string|null $name
  61. * @return void
  62. */
  63. public function setName(?string $name): void;
  64. /**
  65. * Get source email
  66. *
  67. * @return string|null
  68. */
  69. public function getEmail(): ?string;
  70. /**
  71. * Set source email
  72. *
  73. * @param string|null $email
  74. * @return void
  75. */
  76. public function setEmail(?string $email): void;
  77. /**
  78. * Get source contact name
  79. *
  80. * @return string|null
  81. */
  82. public function getContactName(): ?string;
  83. /**
  84. * Set source contact name
  85. *
  86. * @param string|null $contactName
  87. * @return void
  88. */
  89. public function setContactName(?string $contactName): void;
  90. /**
  91. * Check if source is enabled. For new entity can be null
  92. *
  93. * @return bool|null
  94. */
  95. public function isEnabled(): ?bool;
  96. /**
  97. * Enable or disable source
  98. *
  99. * @param bool|null $enabled
  100. * @return void
  101. */
  102. public function setEnabled(?bool $enabled): void;
  103. /**
  104. * Get source description
  105. *
  106. * @return string|null
  107. */
  108. public function getDescription(): ?string;
  109. /**
  110. * Set source description
  111. *
  112. * @param string|null $description
  113. * @return void
  114. */
  115. public function setDescription(?string $description): void;
  116. /**
  117. * Get source latitude
  118. *
  119. * @return float|null
  120. */
  121. public function getLatitude(): ?float;
  122. /**
  123. * Set source latitude
  124. *
  125. * @param float|null $latitude
  126. * @return void
  127. */
  128. public function setLatitude(?float $latitude): void;
  129. /**
  130. * Get source longitude
  131. *
  132. * @return float|null
  133. */
  134. public function getLongitude(): ?float;
  135. /**
  136. * Set source longitude
  137. *
  138. * @param float|null $longitude
  139. * @return void
  140. */
  141. public function setLongitude(?float $longitude): void;
  142. /**
  143. * Get source country id
  144. *
  145. * @return string|null
  146. */
  147. public function getCountryId(): ?string;
  148. /**
  149. * Set source country id
  150. *
  151. * @param string|null $countryId
  152. * @return void
  153. */
  154. public function setCountryId(?string $countryId): void;
  155. /**
  156. * Get region id if source has registered region.
  157. *
  158. * @return int|null
  159. */
  160. public function getRegionId(): ?int;
  161. /**
  162. * Set region id if source has registered region.
  163. *
  164. * @param int|null $regionId
  165. * @return void
  166. */
  167. public function setRegionId(?int $regionId): void;
  168. /**
  169. * Get region title if source has custom region
  170. *
  171. * @return string|null
  172. */
  173. public function getRegion(): ?string;
  174. /**
  175. * Set source region title
  176. *
  177. * @param string|null $region
  178. * @return void
  179. */
  180. public function setRegion(?string $region): void;
  181. /**
  182. * Get source city
  183. *
  184. * @return string|null
  185. */
  186. public function getCity(): ?string;
  187. /**
  188. * Set source city
  189. *
  190. * @param string|null $city
  191. * @return void
  192. */
  193. public function setCity(?string $city): void;
  194. /**
  195. * Get source street name
  196. *
  197. * @return string|null
  198. */
  199. public function getStreet(): ?string;
  200. /**
  201. * Set source street name
  202. *
  203. * @param string|null $street
  204. * @return void
  205. */
  206. public function setStreet(?string $street): void;
  207. /**
  208. * Get source post code
  209. *
  210. * @return string|null
  211. */
  212. public function getPostcode(): ?string;
  213. /**
  214. * Set source post code
  215. *
  216. * @param string|null $postcode
  217. * @return void
  218. */
  219. public function setPostcode(?string $postcode): void;
  220. /**
  221. * Get source phone number
  222. *
  223. * @return string|null
  224. */
  225. public function getPhone(): ?string;
  226. /**
  227. * Set source phone number
  228. *
  229. * @param string|null $phone
  230. * @return void
  231. */
  232. public function setPhone(?string $phone): void;
  233. /**
  234. * Get source fax
  235. *
  236. * @return string|null
  237. */
  238. public function getFax(): ?string;
  239. /**
  240. * Set source fax
  241. *
  242. * @param string|null $fax
  243. * @return void
  244. */
  245. public function setFax(?string $fax): void;
  246. /**
  247. * Check is need to use default config
  248. *
  249. * @return bool|null
  250. */
  251. public function isUseDefaultCarrierConfig(): ?bool;
  252. /**
  253. * @param bool|null $useDefaultCarrierConfig
  254. * @return void
  255. */
  256. public function setUseDefaultCarrierConfig(?bool $useDefaultCarrierConfig): void;
  257. /**
  258. * @return \Magento\InventoryApi\Api\Data\SourceCarrierLinkInterface[]|null
  259. */
  260. public function getCarrierLinks(): ?array;
  261. /**
  262. * @param \Magento\InventoryApi\Api\Data\SourceCarrierLinkInterface[]|null $carrierLinks
  263. * @return void
  264. */
  265. public function setCarrierLinks(?array $carrierLinks): void;
  266. /**
  267. * Retrieve existing extension attributes object
  268. *
  269. * @return \Magento\InventoryApi\Api\Data\SourceExtensionInterface|null
  270. */
  271. public function getExtensionAttributes(): ?\Magento\InventoryApi\Api\Data\SourceExtensionInterface;
  272. /**
  273. * Set an extension attributes object
  274. *
  275. * @param \Magento\InventoryApi\Api\Data\SourceExtensionInterface $extensionAttributes
  276. * @return void
  277. */
  278. public function setExtensionAttributes(
  279. \Magento\InventoryApi\Api\Data\SourceExtensionInterface $extensionAttributes
  280. ): void;
  281. }