Class DealProcessor


  • public class DealProcessor
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      DealProcessor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Deal create​(Deal dealParams, java.lang.String idempotencyKey)
      Creates new Deal entity with certain parameters.
      PaginatedResponse<Deal> findAll​(DealList dealList)
      Receive information about all deals with some filter conditions.
      Deal findById​(java.lang.String dealId)
      Receive information about some Deal by its identifier.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DealProcessor

        public DealProcessor()
    • Method Detail

      • findById

        public Deal findById​(java.lang.String dealId)
        Receive information about some Deal by its identifier.
        Parameters:
        dealId - deal identifier
        Returns:
        deal entity with actual status
        Throws:
        java.lang.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:
        PaginatedResponse
      • create

        public Deal create​(Deal dealParams,
                           java.lang.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:
        java.lang.IllegalArgumentException - if deal parameters is null