Class DealProcessor

java.lang.Object
ru.loolzaaa.youkassa.processors.DealProcessor

public class DealProcessor extends Object
Processor for Deal entity.

A Safe Deal is a YooKassa solution that allows you to accept payment from one participant in a transaction and transfer it to another participant at the time the terms of the transaction are fulfilled.

Using the API, you can create a deal and get up-to-date information about it.

Use ApiClient for API server communication.

API Note:
Only for those using Safe Deal.
  • Constructor Details

    • DealProcessor

      public DealProcessor()
  • Method Details

    • findById

      public Deal findById(String dealId)
      Receive information about some Deal by its identifier.
      Parameters:
      dealId - deal identifier
      Returns:
      deal entity with actual status
      Throws:
      IllegalArgumentException - if deal id is null or empty
    • findAll

      public PaginatedResponse<Deal> findAll(DealList dealList)
      Receive information about all deals with some filter conditions.
      Parameters:
      dealList - collection with filter conditions
      Returns:
      listed deal entities
      See Also:
    • create

      public Deal create(Deal dealParams, String idempotencyKey)
      Creates new Deal entity with certain parameters.

      Generate random idempotency key if corresponding argument is null.

      Parameters:
      dealParams - parameters for new deal
      idempotencyKey - idempotency key
      Returns:
      new deal entity with actual status
      Throws:
      IllegalArgumentException - if deal parameters is null