PendingAuthorizationInterface.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <?php
  2. /**
  3. * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License").
  6. * You may not use this file except in compliance with the License.
  7. * A copy of the License is located at
  8. *
  9. * http://aws.amazon.com/apache2.0
  10. *
  11. * or in the "license" file accompanying this file. This file is distributed
  12. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied. See the License for the specific language governing
  14. * permissions and limitations under the License.
  15. */
  16. namespace Amazon\Payment\Api\Data;
  17. use Amazon\Payment\Model\ResourceModel\PendingAuthorization as PendingAuthorizationResourceModel;
  18. use Exception;
  19. use Magento\Sales\Api\Data\OrderInterface;
  20. /**
  21. * @api
  22. */
  23. interface PendingAuthorizationInterface
  24. {
  25. const ID = 'entity_id';
  26. const AUTHORIZATION_ID = 'authorization_id';
  27. const CAPTURE_ID = 'capture_id';
  28. const ORDER_ID = 'order_id';
  29. const PAYMENT_ID = 'payment_id';
  30. const CREATED_AT = 'created_at';
  31. const UPDATED_AT = 'updated_at';
  32. const PROCESSED = 'processed';
  33. const CAPTURE = 'capture';
  34. /**
  35. * Get pending authorization id
  36. *
  37. * @return integer
  38. */
  39. public function getId();
  40. /**
  41. * Get order id
  42. *
  43. * @return string
  44. */
  45. public function getOrderId();
  46. /**
  47. * Set order id
  48. *
  49. * @param string $orderId
  50. *
  51. * @return $this
  52. */
  53. public function setOrderId($orderId);
  54. /**
  55. * Get authorization id
  56. *
  57. * @return string
  58. */
  59. public function getAuthorizationId();
  60. /**
  61. * Set authorization id
  62. *
  63. * @param string $authorizationId
  64. *
  65. * @return $this
  66. */
  67. public function setAuthorizationId($authorizationId);
  68. /**
  69. * Get capture id
  70. *
  71. * @return string
  72. */
  73. public function getCaptureId();
  74. /**
  75. * Set capture id
  76. *
  77. * @param string $captureId
  78. *
  79. * @return $this
  80. */
  81. public function setCaptureId($captureId);
  82. /**
  83. * Get payment id
  84. *
  85. * @return integer
  86. */
  87. public function getPaymentId();
  88. /**
  89. * Set payment id
  90. *
  91. * @param integer $paymentId
  92. *
  93. * @return $this
  94. */
  95. public function setPaymentId($paymentId);
  96. /**
  97. * Is processed
  98. *
  99. * @return boolean
  100. */
  101. public function isProcessed();
  102. /**
  103. * Set processed
  104. *
  105. * @param boolean $processed
  106. *
  107. * @return $this
  108. */
  109. public function setProcessed($processed);
  110. /**
  111. * Is capture
  112. *
  113. * @return boolean
  114. */
  115. public function isCapture();
  116. /**
  117. * Set capture
  118. *
  119. * @param boolean $capture
  120. *
  121. * @return $this
  122. */
  123. public function setCapture($capture);
  124. /**
  125. * Get created at
  126. *
  127. * @return string
  128. */
  129. public function getCreatedAt();
  130. /**
  131. * Set created at
  132. *
  133. * @param string $createdAt
  134. *
  135. * @return $this
  136. */
  137. public function setCreatedAt($createdAt);
  138. /**
  139. * Get updated at
  140. *
  141. * @return string
  142. */
  143. public function getUpdatedAt();
  144. /**
  145. * Set created at
  146. *
  147. * @param string $updatedAt
  148. *
  149. * @return $this
  150. */
  151. public function setUpdatedAt($updatedAt);
  152. /**
  153. * Set order
  154. *
  155. * @param OrderInterface $order
  156. *
  157. * @return $this
  158. */
  159. public function setOrder(OrderInterface $order);
  160. /**
  161. * Save pending authorization
  162. *
  163. * @return $this
  164. * @throws Exception
  165. */
  166. public function save();
  167. /**
  168. * Delete pending authorization
  169. *
  170. * @return $this
  171. * @throws Exception
  172. */
  173. public function delete();
  174. /**
  175. * Load pending authorization data
  176. *
  177. * @param integer $modelId
  178. * @param null|string $field
  179. *
  180. * @return $this
  181. */
  182. public function load($modelId, $field = null);
  183. /**
  184. * Set whether to lock db record on load
  185. *
  186. * @param boolean $lockOnLoad
  187. *
  188. * @return $this
  189. */
  190. public function setLockOnLoad($lockOnLoad);
  191. /**
  192. * Get whether to lock db record on load
  193. *
  194. * @return boolean
  195. */
  196. public function hasLockOnLoad();
  197. /**
  198. * Retrieve model resource
  199. *
  200. * @return PendingAuthorizationResourceModel
  201. */
  202. public function getResource();
  203. }