Package ru.loolzaaa.youkassa.processors
Class DealProcessor
- java.lang.Object
-
- ru.loolzaaa.youkassa.processors.DealProcessor
-
public class DealProcessor extends java.lang.Object
Processor forDeal
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 newDeal
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 someDeal
by its identifier.
-
-
-
Method Detail
-
findById
public Deal findById(java.lang.String dealId)
Receive information about someDeal
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 newDeal
entity with certain parameters.Generate random idempotency key if corresponding argument is null.
- Parameters:
dealParams
- parameters for new dealidempotencyKey
- idempotency key- Returns:
- new deal entity with actual status
- Throws:
java.lang.IllegalArgumentException
- if deal parameters is null
-
-