You are here

interface QueueInterface in Payment 8.2

Defines a payment queue.

Hierarchy

Expanded class hierarchy of QueueInterface

All classes that implement QueueInterface

5 files declare their use of QueueInterface
PaymentReference.php in modules/payment_reference/src/Element/PaymentReference.php
PaymentReferenceBaseTest.php in tests/src/Unit/Element/PaymentReferenceBaseTest.php
PaymentReferenceTest.php in modules/payment_reference/tests/src/Unit/PaymentReferenceTest.php
PaymentReferenceTest.php in modules/payment_reference/tests/src/Unit/Element/PaymentReferenceTest.php
PaymentReferenceTest.php in modules/payment_reference/tests/src/Unit/Plugin/Field/FieldType/PaymentReferenceTest.php

File

src/QueueInterface.php, line 8

Namespace

Drupal\payment
View source
interface QueueInterface {

  /**
   * Saves a payment available for referencing.
   *
   * @param string $category_id
   *   The ID of the category the payment falls in.
   * @param integer $payment_id
   */
  public function save($category_id, $payment_id);

  /**
   * Claims a payment available for referencing through a field instance.
   *
   * After a payment has been claimed, it can be definitely acquired with
   * self::acquirePayment().
   *
   * @param integer $payment_id
   *
   * @return string|false
   *   An acquisition code to acquire the payment with on success, or FALSE if
   *   the payment could not be claimed.
   */
  public function claimPayment($payment_id);

  /**
   * Releases a claimed payment.
   *
   * @param integer $payment_id
   * @param string $acquisition_code
   *   The code that was received from self::claim().
   */
  public function releaseClaim($payment_id, $acquisition_code);

  /**
   * Acquires a payment and removes if from the queue.
   *
   * @param integer $payment_id
   * @param string $acquisition_code
   *   The code that was received from self::claimPayment().
   *
   * @return bool
   *   Whether the acquisition was successful.
   */
  public function acquirePayment($payment_id, $acquisition_code);

  /**
   * Loads the IDs of payments available for referencing through an instance.
   *
   * @param string $category_id
   *   The ID of the field instance to load payment IDs for.
   * @param integer $owner_id
   *   The UID of the user for whom the payment should be available.
   *
   * @return array
   */
  public function loadPaymentIds($category_id, $owner_id);

  /**
   * Deletes a payment from the queue by payment ID.
   *
   * @param integer $payment_id
   */
  public function deleteByPaymentId($payment_id);

  /**
   * Deletes payments from the queue by category ID.
   *
   * @param string $category_id
   */
  public function deleteByCategoryId($category_id);

  /**
   * Deletes payments from the queue by category ID prefix.
   *
   * @param string $category_id_prefix
   */
  public function deleteByCategoryIdPrefix($category_id_prefix);

}

Members

Namesort descending Modifiers Type Description Overrides
QueueInterface::acquirePayment public function Acquires a payment and removes if from the queue. 1
QueueInterface::claimPayment public function Claims a payment available for referencing through a field instance. 1
QueueInterface::deleteByCategoryId public function Deletes payments from the queue by category ID. 1
QueueInterface::deleteByCategoryIdPrefix public function Deletes payments from the queue by category ID prefix. 1
QueueInterface::deleteByPaymentId public function Deletes a payment from the queue by payment ID. 1
QueueInterface::loadPaymentIds public function Loads the IDs of payments available for referencing through an instance. 1
QueueInterface::releaseClaim public function Releases a claimed payment. 1
QueueInterface::save public function Saves a payment available for referencing. 1