Class PaymentMethodProcessor

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

public class PaymentMethodProcessor extends Object
Processor for PaymentMethod entity.

The API allows you to create and save payment methods, as well as receive information about them.

Use ApiClient for API server communication.

  • Constructor Details

    • PaymentMethodProcessor

      public PaymentMethodProcessor()
  • Method Details

    • findById

      public PaymentMethod findById(String paymentMethodId)
      Receive information about some PaymentMethod by its identifier.
      Parameters:
      paymentMethodId - payment method identifier
      Returns:
      payment entity with actual status
      Throws:
      IllegalArgumentException - if payment method id is null or empty
    • create

      public PaymentMethod create(PaymentMethod paymentMethodParams, String idempotencyKey)
      Creates new PaymentMethod entity with certain parameters.

      Generate random idempotency key if corresponding argument is null.

      Parameters:
      paymentMethodParams - parameters for new payment
      idempotencyKey - idempotency key
      Returns:
      new payment method entity with actual status
      Throws:
      IllegalArgumentException - if payment parameters is null