Interface Payment

  • All Superinterfaces:
    PrettyPrintable

    public interface Payment
    extends PrettyPrintable
    The interface that represents a payment and contains all related data.
    Author:
    soknight
    • Method Detail

      • getId

        int getId()
        Get the unique ID of this payment.
        Returns:
        The payment ID.
      • getShopId

        int getShopId()
        Get the ID of the payment owning shop.
        Returns:
        The owning shop ID.
      • getCustomer

        @NotNull
        @NotNull String getCustomer()
        Get the customer of this payment.
        Returns:
        The payment customer.
      • getEmail

        @NotNull
        @NotNull Optional<String> getEmail()
        Get the optional-wrapped email of the customer of this payment.
        If an email wasn't actually specified by the customer, this method will return an empty Optional.
        Returns:
        The optional-wrapped payment customer's email.
      • getStatusRaw

        int getStatusRaw()
        Get the raw status of this payment.
        Can be used when the getStatus() method has returned the unknown constant.
        Returns:
        The raw payment status.
        See Also:
        getStatus()
      • getPurchaseCost

        double getPurchaseCost()
        Get the purchase cost of this payment.
        Returns:
        The payment purchase cost.
      • getEnrolledAmount

        double getEnrolledAmount()
        Get the enrolled amount.
        It's an amount that has been added to yours real shop balance.
        Returns:
        The enrolled amount.
      • getServiceComission

        double getServiceComission()
        Get the EasyDonate platform comission.
        It's an amount that has been withdrawn by the EasyDonate aggregator.
        Returns:
        The service comission.
      • getPaymentSystem

        @NotNull
        @NotNull PaymentSystem getPaymentSystem()
        Get the used payment system of this payment.
        Returns:
        The used payment system.
        See Also:
        PaymentSystem
      • getPaymentSystemRaw

        @NotNull
        @NotNull String getPaymentSystemRaw()
        Get the raw used payment system of this payment.
        Can be used when the getPaymentSystem() method has returned the unknown constant.
        Returns:
        The raw used payment system.
        See Also:
        getPaymentSystem()
      • getPaymentType

        @NotNull
        @NotNull PaymentType getPaymentType()
        Get the used payment type of this payment.
        Returns:
        The used payment type.
        See Also:
        PaymentType
      • getPaymentTypeRaw

        @NotNull
        @NotNull String getPaymentTypeRaw()
        Get the raw used payment type of this payment.
        Can be used when the getPaymentType() method has returned the unknown constant.
        Returns:
        The raw used payment type.
        See Also:
        getPaymentType()
      • getServerId

        int getServerId()
        Get the ID of the connected server related to this payment.
        Returns:
        The payment server ID.
      • getDeliveryType

        @NotNull
        @NotNull DeliveryModeType getDeliveryType()
        Get the delivery mode used for this payment.
        Returns:
        The payment delivery mode.
        See Also:
        DeliveryModeType
      • getDeliveryTypeRaw

        @NotNull
        @NotNull String getDeliveryTypeRaw()
        Get the raw delivery mode type.
        Can be used when the getDeliveryType() method has returned the unknown constant.
        Returns:
        The raw payment delivery mode.
        See Also:
        getDeliveryType()
      • getErrorMessage

        @NotNull
        @NotNull Optional<String> getErrorMessage()
        Get the optional-wrapped error message for this payment.
        If any error was occurred then this error message stored here.
        Returns:
        The optional-wrapped payment error message.
      • getHandleAttempts

        int getHandleAttempts()
        Get the amount of attempts to handle this payment on the server side.
        If this shop uses the plugin delivery mode then this counter means an amount of attempts to run all commands of purchased products.
        Returns:
        The amount of attempts to handle this payment.
        See Also:
        DeliveryModeType.PLUGIN
      • wasSent

        boolean wasSent()
        Check is all commands from the payment related purchased products was successfully sent to the connected game server.
        Returns:
        A boolean value: the check result.
      • getRating

        @NotNull
        @NotNull OptionalInt getRating()
        Get the optional-wrapped rating value.
        When a customer returns to the shop after the payment completion, this customer can rate the payment process upon his user experience.
        Returns:
        The payment process rating from a customer.
      • getProducts

        @NotNull
        @NotNull List<PurchasedProduct> getProducts()
        Get the list of all purchased products of this payment.
        Returns:
        The list of all purchased products.
        See Also:
        PurchasedProduct
      • getServer

        @NotNull
        @NotNull Server getServer()
        Get the target game server describing object.
        Returns:
        The target game server.
        See Also:
        Server
      • getCreatedAt

        @NotNull
        @NotNull LocalDateTime getCreatedAt()
        Get the creation date of this payment.
        Returns:
        The payment creation date.
      • getUpdatedAt

        @NotNull
        @NotNull LocalDateTime getUpdatedAt()
        Get the date of last update of this payment.
        Returns:
        The last payment update date.