Interface PaymentMethodInfo

All Superinterfaces:
PaymentMethodInfoMixin

public interface PaymentMethodInfo extends PaymentMethodInfoMixin

Represents a snapshot of the PaymentMethod data used for a Payment.


Example to create an instance using the builder pattern

     PaymentMethodInfo paymentMethodInfo = PaymentMethodInfo.builder()
             .build()
 
  • Method Details

    • getPaymentInterface

      String getPaymentInterface()

      Payment service that processes the Payment—for example, a PSP. The combination of paymentInterface and the interfaceId of a Payment is unique.

      Specified by:
      getPaymentInterface in interface PaymentMethodInfoMixin
      Returns:
      paymentInterface
    • getMethod

      String getMethod()

      Payment method used—for example, a credit card or direct debit.

      Specified by:
      getMethod in interface PaymentMethodInfoMixin
      Returns:
      method
    • getName

      @Valid @Valid LocalizedString getName()

      Name of the Payment Method.

      Specified by:
      getName in interface PaymentMethodInfoMixin
      Returns:
      name
    • getToken

      @Valid @Valid PaymentMethodToken getToken()

      Tokenized representation of the Payment Method used by the payment interface.

      Specified by:
      getToken in interface PaymentMethodInfoMixin
      Returns:
      token
    • getInterfaceAccount

      String getInterfaceAccount()

      Account or instance of the payment interface when multiple accounts are used (per interface).

      Specified by:
      getInterfaceAccount in interface PaymentMethodInfoMixin
      Returns:
      interfaceAccount
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields of the PaymentMethodInfo.

      Specified by:
      getCustom in interface PaymentMethodInfoMixin
      Returns:
      custom
    • setPaymentInterface

      void setPaymentInterface(String paymentInterface)

      Payment service that processes the Payment—for example, a PSP. The combination of paymentInterface and the interfaceId of a Payment is unique.

      Parameters:
      paymentInterface - value to be set
    • setMethod

      void setMethod(String method)

      Payment method used—for example, a credit card or direct debit.

      Parameters:
      method - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the Payment Method.

      Parameters:
      name - value to be set
    • setToken

      void setToken(PaymentMethodToken token)

      Tokenized representation of the Payment Method used by the payment interface.

      Parameters:
      token - value to be set
    • setInterfaceAccount

      void setInterfaceAccount(String interfaceAccount)

      Account or instance of the payment interface when multiple accounts are used (per interface).

      Parameters:
      interfaceAccount - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields of the PaymentMethodInfo.

      Parameters:
      custom - value to be set
    • of

      static PaymentMethodInfo of()
      factory method
      Returns:
      instance of PaymentMethodInfo
    • of

      static PaymentMethodInfo of(PaymentMethodInfo template)
      factory method to create a shallow copy PaymentMethodInfo
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      PaymentMethodInfo copyDeep()
    • deepCopy

      @Nullable static PaymentMethodInfo deepCopy(@Nullable PaymentMethodInfo template)
      factory method to create a deep copy of PaymentMethodInfo
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static PaymentMethodInfoBuilder builder()
      builder factory method for PaymentMethodInfo
      Returns:
      builder
    • builder

      static PaymentMethodInfoBuilder builder(PaymentMethodInfo template)
      create builder for PaymentMethodInfo instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPaymentMethodInfo

      default <T> T withPaymentMethodInfo(Function<PaymentMethodInfo,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<PaymentMethodInfo> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference