AddressInterface.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Quote\Api\Data;
  7. /**
  8. * Interface AddressInterface
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface AddressInterface extends \Magento\Framework\Api\CustomAttributesDataInterface
  13. {
  14. /**#@+
  15. * Constants defined for keys of array, makes typos less likely
  16. */
  17. const KEY_EMAIL = 'email';
  18. const KEY_COUNTRY_ID = 'country_id';
  19. const KEY_ID = 'id';
  20. const KEY_REGION_ID = 'region_id';
  21. const KEY_REGION_CODE = 'region_code';
  22. const KEY_REGION = 'region';
  23. const KEY_CUSTOMER_ID = 'customer_id';
  24. const KEY_STREET = 'street';
  25. const KEY_COMPANY = 'company';
  26. const KEY_TELEPHONE = 'telephone';
  27. const KEY_FAX = 'fax';
  28. const KEY_POSTCODE = 'postcode';
  29. const KEY_CITY = 'city';
  30. const KEY_FIRSTNAME = 'firstname';
  31. const KEY_LASTNAME = 'lastname';
  32. const KEY_MIDDLENAME = 'middlename';
  33. const KEY_PREFIX = 'prefix';
  34. const KEY_SUFFIX = 'suffix';
  35. const KEY_VAT_ID = 'vat_id';
  36. const SAME_AS_BILLING = 'same_as_billing';
  37. const CUSTOMER_ADDRESS_ID = 'customer_address_id';
  38. const SAVE_IN_ADDRESS_BOOK = 'save_in_address_book';
  39. /**#@-*/
  40. /**
  41. * Get id
  42. *
  43. * @return int|null
  44. */
  45. public function getId();
  46. /**
  47. * Set id
  48. *
  49. * @param int $id
  50. * @return $this
  51. */
  52. public function setId($id);
  53. /**
  54. * Get region name
  55. *
  56. * @return string
  57. */
  58. public function getRegion();
  59. /**
  60. * Set region name
  61. *
  62. * @param string $region
  63. * @return $this
  64. */
  65. public function setRegion($region);
  66. /**
  67. * Get region id
  68. *
  69. * @return int
  70. */
  71. public function getRegionId();
  72. /**
  73. * Set region id
  74. *
  75. * @param int $regionId
  76. * @return $this
  77. */
  78. public function setRegionId($regionId);
  79. /**
  80. * Get region code
  81. *
  82. * @return string
  83. */
  84. public function getRegionCode();
  85. /**
  86. * Set region code
  87. *
  88. * @param string $regionCode
  89. * @return $this
  90. */
  91. public function setRegionCode($regionCode);
  92. /**
  93. * Get country id
  94. *
  95. * @return string
  96. */
  97. public function getCountryId();
  98. /**
  99. * Set country id
  100. *
  101. * @param string $countryId
  102. * @return $this
  103. */
  104. public function setCountryId($countryId);
  105. /**
  106. * Get street
  107. *
  108. * @return string[]
  109. */
  110. public function getStreet();
  111. /**
  112. * Set street
  113. *
  114. * @param string|string[] $street
  115. * @return $this
  116. */
  117. public function setStreet($street);
  118. /**
  119. * Get company
  120. *
  121. * @return string|null
  122. */
  123. public function getCompany();
  124. /**
  125. * Set company
  126. *
  127. * @param string $company
  128. * @return $this
  129. */
  130. public function setCompany($company);
  131. /**
  132. * Get telephone number
  133. *
  134. * @return string
  135. */
  136. public function getTelephone();
  137. /**
  138. * Set telephone number
  139. *
  140. * @param string $telephone
  141. * @return $this
  142. */
  143. public function setTelephone($telephone);
  144. /**
  145. * Get fax number
  146. *
  147. * @return string|null
  148. */
  149. public function getFax();
  150. /**
  151. * Set fax number
  152. *
  153. * @param string $fax
  154. * @return $this
  155. */
  156. public function setFax($fax);
  157. /**
  158. * Get postcode
  159. *
  160. * @return string
  161. */
  162. public function getPostcode();
  163. /**
  164. * Set postcode
  165. *
  166. * @param string $postcode
  167. * @return $this
  168. */
  169. public function setPostcode($postcode);
  170. /**
  171. * Get city name
  172. *
  173. * @return string
  174. */
  175. public function getCity();
  176. /**
  177. * Set city name
  178. *
  179. * @param string $city
  180. * @return $this
  181. */
  182. public function setCity($city);
  183. /**
  184. * Get first name
  185. *
  186. * @return string
  187. */
  188. public function getFirstname();
  189. /**
  190. * Set first name
  191. *
  192. * @param string $firstname
  193. * @return $this
  194. */
  195. public function setFirstname($firstname);
  196. /**
  197. * Get last name
  198. *
  199. * @return string
  200. */
  201. public function getLastname();
  202. /**
  203. * Set last name
  204. *
  205. * @param string $lastname
  206. * @return $this
  207. */
  208. public function setLastname($lastname);
  209. /**
  210. * Get middle name
  211. *
  212. * @return string|null
  213. */
  214. public function getMiddlename();
  215. /**
  216. * Set middle name
  217. *
  218. * @param string $middlename
  219. * @return $this
  220. */
  221. public function setMiddlename($middlename);
  222. /**
  223. * Get prefix
  224. *
  225. * @return string|null
  226. */
  227. public function getPrefix();
  228. /**
  229. * Set prefix
  230. *
  231. * @param string $prefix
  232. * @return $this
  233. */
  234. public function setPrefix($prefix);
  235. /**
  236. * Get suffix
  237. *
  238. * @return string|null
  239. */
  240. public function getSuffix();
  241. /**
  242. * Set suffix
  243. *
  244. * @param string $suffix
  245. * @return $this|null
  246. */
  247. public function setSuffix($suffix);
  248. /**
  249. * Get Vat id
  250. *
  251. * @return string|null
  252. */
  253. public function getVatId();
  254. /**
  255. * Set Vat id
  256. *
  257. * @param string $vatId
  258. * @return $this
  259. */
  260. public function setVatId($vatId);
  261. /**
  262. * Get customer id
  263. *
  264. * @return int|null
  265. */
  266. public function getCustomerId();
  267. /**
  268. * Set customer id
  269. *
  270. * @param int $customerId
  271. * @return $this
  272. */
  273. public function setCustomerId($customerId);
  274. /**
  275. * Get billing/shipping email
  276. *
  277. * @return string
  278. */
  279. public function getEmail();
  280. /**
  281. * Set billing/shipping email
  282. *
  283. * @param string $email
  284. * @return $this
  285. */
  286. public function setEmail($email);
  287. /**
  288. * Get same as billing flag
  289. *
  290. * @return int|null
  291. */
  292. public function getSameAsBilling();
  293. /**
  294. * Set same as billing flag
  295. *
  296. * @param int $sameAsBilling
  297. * @return $this
  298. */
  299. public function setSameAsBilling($sameAsBilling);
  300. /**
  301. * Get customer address id
  302. *
  303. * @return int|null
  304. */
  305. public function getCustomerAddressId();
  306. /**
  307. * Set customer address id
  308. *
  309. * @param int|null $customerAddressId
  310. * @return $this
  311. */
  312. public function setCustomerAddressId($customerAddressId);
  313. /**
  314. * Get save in address book flag
  315. *
  316. * @return int|null
  317. */
  318. public function getSaveInAddressBook();
  319. /**
  320. * Set save in address book flag
  321. *
  322. * @param int|null $saveInAddressBook
  323. * @return $this
  324. */
  325. public function setSaveInAddressBook($saveInAddressBook);
  326. /**
  327. * Retrieve existing extension attributes object or create a new one.
  328. *
  329. * @return \Magento\Quote\Api\Data\AddressExtensionInterface|null
  330. */
  331. public function getExtensionAttributes();
  332. /**
  333. * Set an extension attributes object.
  334. *
  335. * @param \Magento\Quote\Api\Data\AddressExtensionInterface $extensionAttributes
  336. * @return $this
  337. */
  338. public function setExtensionAttributes(\Magento\Quote\Api\Data\AddressExtensionInterface $extensionAttributes);
  339. }