Interface MyPayment

All Superinterfaces:
Customizable<MyPayment>, DomainResource<MyPayment>, Identifiable<MyPayment>, Versioned<MyPayment>

public interface MyPayment extends DomainResource<MyPayment>, Customizable<MyPayment>
MyPayment
Example to create an instance using the builder pattern

     MyPayment myPayment = MyPayment.builder()
             .id("{id}")
             .version(0.3)
             .amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
             .paymentMethodInfo(paymentMethodInfoBuilder -> paymentMethodInfoBuilder)
             .plusTransactions(transactionsBuilder -> transactionsBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Payment.

      Specified by:
      getId in interface DomainResource<MyPayment>
      Specified by:
      getId in interface Identifiable<MyPayment>
      Specified by:
      getId in interface Versioned<MyPayment>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the Payment.

      Specified by:
      getVersion in interface DomainResource<MyPayment>
      Specified by:
      getVersion in interface Versioned<MyPayment>
      Returns:
      version
    • getCustomer

      @Valid @Valid CustomerReference getCustomer()

      Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either customer or anonymousId is present.

      Returns:
      customer
    • getAnonymousId

      String getAnonymousId()

      Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either customer or anonymousId is present.

      Returns:
      anonymousId
    • getAmountPlanned

      @NotNull @Valid @NotNull @Valid CentPrecisionMoney getAmountPlanned()

      Money value the Payment intends to receive from the customer. The value typically matches the Cart or Order gross total.

      Returns:
      amountPlanned
    • getPaymentMethodInfo

      @NotNull @Valid @NotNull @Valid PaymentMethodInfo getPaymentMethodInfo()

      Information regarding the payment interface (for example, a PSP), and the specific payment method used.

      Returns:
      paymentMethodInfo
    • getTransactions

      @NotNull @Valid @NotNull @Valid List<Transaction> getTransactions()

      Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

      Returns:
      transactions
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields defined for the Payment.

      Specified by:
      getCustom in interface Customizable<MyPayment>
      Returns:
      custom
    • setId

      void setId(String id)

      Unique identifier of the Payment.

      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Payment.

      Parameters:
      version - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      Reference to a Customer associated with the Payment. Set automatically with a password flow token. Either customer or anonymousId is present.

      Parameters:
      customer - value to be set
    • setAnonymousId

      void setAnonymousId(String anonymousId)

      Anonymous session associated with the Payment. Set automatically with a token for an anonymous session. Either customer or anonymousId is present.

      Parameters:
      anonymousId - value to be set
    • setAmountPlanned

      void setAmountPlanned(CentPrecisionMoney amountPlanned)

      Money value the Payment intends to receive from the customer. The value typically matches the Cart or Order gross total.

      Parameters:
      amountPlanned - value to be set
    • setPaymentMethodInfo

      void setPaymentMethodInfo(PaymentMethodInfo paymentMethodInfo)

      Information regarding the payment interface (for example, a PSP), and the specific payment method used.

      Parameters:
      paymentMethodInfo - value to be set
    • setTransactions

      void setTransactions(Transaction... transactions)

      Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

      Parameters:
      transactions - values to be set
    • setTransactions

      void setTransactions(List<Transaction> transactions)

      Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

      Parameters:
      transactions - values to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields defined for the Payment.

      Specified by:
      setCustom in interface Customizable<MyPayment>
      Parameters:
      custom - value to be set
    • of

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

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

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

      static MyPaymentBuilder builder()
      builder factory method for MyPayment
      Returns:
      builder
    • builder

      static MyPaymentBuilder builder(MyPayment template)
      create builder for MyPayment instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMyPayment

      default <T> T withMyPayment(Function<MyPayment,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<MyPayment> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference