Interface Payment

All Superinterfaces:
BaseResource, Customizable<Payment>, DomainResource<Payment>, Identifiable<Payment>, PaymentMixin, Referencable<Payment>, ResourceIdentifiable<Payment>, Versioned<Payment>, WithKey

Payment
Example to create an instance using the builder pattern

     Payment payment = Payment.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
             .paymentMethodInfo(paymentMethodInfoBuilder -> paymentMethodInfoBuilder)
             .paymentStatus(paymentStatusBuilder -> paymentStatusBuilder)
             .plusTransactions(transactionsBuilder -> transactionsBuilder)
             .plusInterfaceInteractions(interfaceInteractionsBuilder -> interfaceInteractionsBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Payment.

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

      @NotNull @NotNull Long getVersion()

      Current version of the Payment.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<Payment>
      Specified by:
      getVersion in interface Versioned<Payment>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the Payment was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Payment was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      createdBy
    • getCustomer

      @Valid @Valid CustomerReference getCustomer()

      Reference to a Customer associated with the Payment.

      Returns:
      customer
    • getAnonymousId

      String getAnonymousId()

      Anonymous session associated with the Payment.

      Returns:
      anonymousId
    • getInterfaceId

      String getInterfaceId()

      Identifier used by the payment service that processes the Payment (for example, a PSP). The combination of interfaceId and the paymentInterface field on PaymentMethodInfo must be unique.

      Returns:
      interfaceId
    • 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
    • getPaymentStatus

      @NotNull @Valid @NotNull @Valid PaymentStatus getPaymentStatus()

      Current status of the Payment.

      Returns:
      paymentStatus
    • getTransactions

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

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

      Returns:
      transactions
    • getInterfaceInteractions

      @NotNull @Valid @NotNull @Valid List<CustomFields> getInterfaceInteractions()

      Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

      Returns:
      interfaceInteractions
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields for the Payment.

      Specified by:
      getCustom in interface Customizable<Payment>
      Returns:
      custom
    • getKey

      String getKey()

      User-defined unique identifier of the Payment.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setId

      void setId(String id)

      Unique identifier of the Payment.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Payment.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the Payment was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the Payment was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      createdBy - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      Reference to a Customer associated with the Payment.

      Parameters:
      customer - value to be set
    • setAnonymousId

      void setAnonymousId(String anonymousId)

      Anonymous session associated with the Payment.

      Parameters:
      anonymousId - value to be set
    • setInterfaceId

      void setInterfaceId(String interfaceId)

      Identifier used by the payment service that processes the Payment (for example, a PSP). The combination of interfaceId and the paymentInterface field on PaymentMethodInfo must be unique.

      Parameters:
      interfaceId - 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
    • setPaymentStatus

      void setPaymentStatus(PaymentStatus paymentStatus)

      Current status of the Payment.

      Parameters:
      paymentStatus - 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
    • setInterfaceInteractions

      void setInterfaceInteractions(CustomFields... interfaceInteractions)

      Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

      Parameters:
      interfaceInteractions - values to be set
    • setInterfaceInteractions

      void setInterfaceInteractions(List<CustomFields> interfaceInteractions)

      Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

      Parameters:
      interfaceInteractions - values to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields for the Payment.

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

      void setKey(String key)

      User-defined unique identifier of the Payment.

      Parameters:
      key - value to be set
    • of

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

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

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

      static PaymentBuilder builder()
      builder factory method for Payment
      Returns:
      builder
    • builder

      static PaymentBuilder builder(Payment template)
      create builder for Payment instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPayment

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

      static ReferenceTypeId referenceTypeId()
    • typeReference

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