PendingCaptureInterface.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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\PendingCapture as PendingCaptureResourceModel;
  18. use Exception;
  19. /**
  20. * @api
  21. */
  22. interface PendingCaptureInterface
  23. {
  24. const ID = 'entity_id';
  25. const CAPTURE_ID = 'capture_id';
  26. const ORDER_ID = 'order_id';
  27. const PAYMENT_ID = 'payment_id';
  28. const CREATED_AT = 'created_at';
  29. /**
  30. * Get pending capture id
  31. *
  32. * @return integer
  33. */
  34. public function getId();
  35. /**
  36. * Get capture id
  37. *
  38. * @return string
  39. */
  40. public function getCaptureId();
  41. /**
  42. * Set capture id
  43. *
  44. * @param string $captureId
  45. *
  46. * @return $this
  47. */
  48. public function setCaptureId($captureId);
  49. /**
  50. * Get payment id
  51. *
  52. * @return integer
  53. */
  54. public function getPaymentId();
  55. /**
  56. * Set payment id
  57. *
  58. * @param integer $paymentId
  59. *
  60. * @return $this
  61. */
  62. public function setPaymentId($paymentId);
  63. /**
  64. * Get order id
  65. *
  66. * @return integer
  67. */
  68. public function getOrderId();
  69. /**
  70. * Set order id
  71. *
  72. * @param integer $orderId
  73. *
  74. * @return $this
  75. */
  76. public function setOrderId($orderId);
  77. /**
  78. * Get created at
  79. *
  80. * @return string
  81. */
  82. public function getCreatedAt();
  83. /**
  84. * Set created at
  85. *
  86. * @param string $createdAt
  87. *
  88. * @return $this
  89. */
  90. public function setCreatedAt($createdAt);
  91. /**
  92. * Save pending capture
  93. *
  94. * @return $this
  95. * @throws Exception
  96. */
  97. public function save();
  98. /**
  99. * Delete pending capture
  100. *
  101. * @return $this
  102. * @throws Exception
  103. */
  104. public function delete();
  105. /**
  106. * Load pending capture data
  107. *
  108. * @param integer $modelId
  109. * @param null|string $field
  110. *
  111. * @return $this
  112. */
  113. public function load($modelId, $field = null);
  114. /**
  115. * Set whether to lock db record on load
  116. *
  117. * @param boolean $lockOnLoad
  118. *
  119. * @return $this
  120. */
  121. public function setLockOnLoad($lockOnLoad);
  122. /**
  123. * Get whether to lock db record on load
  124. *
  125. * @return boolean
  126. */
  127. public function hasLockOnLoad();
  128. /**
  129. * Retrieve model resource
  130. *
  131. * @return PendingCaptureResourceModel
  132. */
  133. public function getResource();
  134. }