AddressInterface.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Customer\Api\Data;
  8. /**
  9. * Customer address interface.
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface AddressInterface extends \Magento\Framework\Api\CustomAttributesDataInterface
  14. {
  15. /**#@+
  16. * Constants for keys of data array. Identical to the name of the getter in snake case
  17. */
  18. const ID = 'id';
  19. const CUSTOMER_ID = 'customer_id';
  20. const REGION = 'region';
  21. const REGION_ID = 'region_id';
  22. const COUNTRY_ID = 'country_id';
  23. const STREET = 'street';
  24. const COMPANY = 'company';
  25. const TELEPHONE = 'telephone';
  26. const FAX = 'fax';
  27. const POSTCODE = 'postcode';
  28. const CITY = 'city';
  29. const FIRSTNAME = 'firstname';
  30. const LASTNAME = 'lastname';
  31. const MIDDLENAME = 'middlename';
  32. const PREFIX = 'prefix';
  33. const SUFFIX = 'suffix';
  34. const VAT_ID = 'vat_id';
  35. const DEFAULT_BILLING = 'default_billing';
  36. const DEFAULT_SHIPPING = 'default_shipping';
  37. /**#@-*/
  38. /**
  39. * Get ID
  40. *
  41. * @return int|null
  42. */
  43. public function getId();
  44. /**
  45. * Set ID
  46. *
  47. * @param int $id
  48. * @return $this
  49. */
  50. public function setId($id);
  51. /**
  52. * Get customer ID
  53. *
  54. * @return int|null
  55. */
  56. public function getCustomerId();
  57. /**
  58. * Set customer ID
  59. *
  60. * @param int $customerId
  61. * @return $this
  62. */
  63. public function setCustomerId($customerId);
  64. /**
  65. * Get region
  66. *
  67. * @return \Magento\Customer\Api\Data\RegionInterface|null
  68. */
  69. public function getRegion();
  70. /**
  71. * Set region
  72. *
  73. * @param \Magento\Customer\Api\Data\RegionInterface $region
  74. * @return $this
  75. */
  76. public function setRegion(RegionInterface $region = null);
  77. /**
  78. * Get region ID
  79. *
  80. * @return int|null
  81. */
  82. public function getRegionId();
  83. /**
  84. * Set region ID
  85. *
  86. * @param int $regionId
  87. * @return $this
  88. */
  89. public function setRegionId($regionId);
  90. /**
  91. * Two-letter country code in ISO_3166-2 format
  92. *
  93. * @return string|null
  94. */
  95. public function getCountryId();
  96. /**
  97. * Set country id
  98. *
  99. * @param string $countryId
  100. * @return $this
  101. */
  102. public function setCountryId($countryId);
  103. /**
  104. * Get street
  105. *
  106. * @return string[]|null
  107. */
  108. public function getStreet();
  109. /**
  110. * Set street
  111. *
  112. * @param string[] $street
  113. * @return $this
  114. */
  115. public function setStreet(array $street);
  116. /**
  117. * Get company
  118. *
  119. * @return string|null
  120. */
  121. public function getCompany();
  122. /**
  123. * Set company
  124. *
  125. * @param string $company
  126. * @return $this
  127. */
  128. public function setCompany($company);
  129. /**
  130. * Get telephone number
  131. *
  132. * @return string|null
  133. */
  134. public function getTelephone();
  135. /**
  136. * Set telephone number
  137. *
  138. * @param string $telephone
  139. * @return $this
  140. */
  141. public function setTelephone($telephone);
  142. /**
  143. * Get fax number
  144. *
  145. * @return string|null
  146. */
  147. public function getFax();
  148. /**
  149. * Set fax number
  150. *
  151. * @param string $fax
  152. * @return $this
  153. */
  154. public function setFax($fax);
  155. /**
  156. * Get postcode
  157. *
  158. * @return string|null
  159. */
  160. public function getPostcode();
  161. /**
  162. * Set postcode
  163. *
  164. * @param string $postcode
  165. * @return $this
  166. */
  167. public function setPostcode($postcode);
  168. /**
  169. * Get city name
  170. *
  171. * @return string|null
  172. */
  173. public function getCity();
  174. /**
  175. * Set city name
  176. *
  177. * @param string $city
  178. * @return $this
  179. */
  180. public function setCity($city);
  181. /**
  182. * Get first name
  183. *
  184. * @return string|null
  185. */
  186. public function getFirstname();
  187. /**
  188. * Set first name
  189. *
  190. * @param string $firstName
  191. * @return $this
  192. */
  193. public function setFirstname($firstName);
  194. /**
  195. * Get last name
  196. *
  197. * @return string|null
  198. */
  199. public function getLastname();
  200. /**
  201. * Set last name
  202. *
  203. * @param string $lastName
  204. * @return $this
  205. */
  206. public function setLastname($lastName);
  207. /**
  208. * Get middle name
  209. *
  210. * @return string|null
  211. */
  212. public function getMiddlename();
  213. /**
  214. * Set middle name
  215. *
  216. * @param string $middleName
  217. * @return $this
  218. */
  219. public function setMiddlename($middleName);
  220. /**
  221. * Get prefix
  222. *
  223. * @return string|null
  224. */
  225. public function getPrefix();
  226. /**
  227. * Set prefix
  228. *
  229. * @param string $prefix
  230. * @return $this
  231. */
  232. public function setPrefix($prefix);
  233. /**
  234. * Get suffix
  235. *
  236. * @return string|null
  237. */
  238. public function getSuffix();
  239. /**
  240. * Set suffix
  241. *
  242. * @param string $suffix
  243. * @return $this
  244. */
  245. public function setSuffix($suffix);
  246. /**
  247. * Get Vat id
  248. *
  249. * @return string|null
  250. */
  251. public function getVatId();
  252. /**
  253. * Set Vat id
  254. *
  255. * @param string $vatId
  256. * @return $this
  257. */
  258. public function setVatId($vatId);
  259. /**
  260. * Get if this address is default shipping address.
  261. *
  262. * @return bool|null
  263. */
  264. public function isDefaultShipping();
  265. /**
  266. * Set if this address is default shipping address.
  267. *
  268. * @param bool $isDefaultShipping
  269. * @return $this
  270. */
  271. public function setIsDefaultShipping($isDefaultShipping);
  272. /**
  273. * Get if this address is default billing address
  274. *
  275. * @return bool|null
  276. */
  277. public function isDefaultBilling();
  278. /**
  279. * Set if this address is default billing address
  280. *
  281. * @param bool $isDefaultBilling
  282. * @return $this
  283. */
  284. public function setIsDefaultBilling($isDefaultBilling);
  285. /**
  286. * Retrieve existing extension attributes object or create a new one.
  287. *
  288. * @return \Magento\Customer\Api\Data\AddressExtensionInterface|null
  289. */
  290. public function getExtensionAttributes();
  291. /**
  292. * Set an extension attributes object.
  293. *
  294. * @param \Magento\Customer\Api\Data\AddressExtensionInterface $extensionAttributes
  295. * @return $this
  296. */
  297. public function setExtensionAttributes(\Magento\Customer\Api\Data\AddressExtensionInterface $extensionAttributes);
  298. }