Interface PurchasedProduct

    • Method Detail

      • getId

        int getId()
        Get the ID of this purchase.
        Returns:
        The purchase ID.
      • getProductId

        int getProductId()
        Get the ID of the purchased product.
        Returns:
        The purchased product ID.
      • getPaymentId

        int getPaymentId()
        Get the ID of the related payment.
        Returns:
        The purchase payment ID.
      • getName

        @NotNull
        @NotNull String getName()
        Get the name of the purchased product.
        Returns:
        The purchased product name.
      • getType

        @NotNull
        @NotNull ProductType getType()
        Get the type of the purchased product.
        Returns:
        The purchased product type.
        See Also:
        ProductType
      • getTypeRaw

        @NotNull
        @NotNull String getTypeRaw()
        Get the raw type of the purchased product.
        Can be used when the getType() method has returned the unknown constant.
        Returns:
        The raw purchased product type.
        See Also:
        getType()
      • getPrice

        double getPrice()
        Get the price of this purchase.
        Returns:
        The purchase price.
      • getDefaultAmount

        long getDefaultAmount()
        Get the default amount of the purchased product.
        Returns:
        The purchased product default amount.
      • getBoughtAmount

        long getBoughtAmount()
        Get the actual bought amount of the purchased product.
        Returns:
        The purchased product amount.
      • getDescription

        @NotNull
        @NotNull Optional<String> getDescription()
        Get the optional-wrapped description of the purchased product.
        Returns:
        The optional-wrapped purchased product description.
      • getOldPrice

        @NotNull
        @NotNull OptionalDouble getOldPrice()
        Get the optional-wrapped old price of the purchased product.
        Returns:
        The optional-wrapped purchased product old price.
      • getIconImage

        @NotNull
        @NotNull String getIconImage()
        Get the icon image of the purchased product.
        Usually it's just a direct link to image hosted by platform servers.
        Returns:
        The purchased product icon image.
      • isOneTimePurchasable

        boolean isOneTimePurchasable()
        Check is the purchased product may be purchased only one time or not.
        After the first purchase of this product will be hidden from the shop.
        Returns:
        A boolean value: the check result.
      • getCommands

        @NotNull
        @NotNull List<String> getCommands()
        Get the in-game commands that will be sent after purchase of this product.
        Returns:
        The purchased product configured list of commands.
        See Also:
        Payment.getSentCommands()
      • getAdditionalFields

        @NotNull
        @NotNull List<FilledAdditionalField> getAdditionalFields()
        Get the list of filled additional fields for this purchase.
        Returns:
        The purchased product filled additional fields.
        See Also:
        FilledAdditionalField
      • getDiscounts

        @NotNull
        @NotNull Optional<Discounts> getDiscounts()
        Get the optional-wrapped applied discounts of this purchase.
        Sometimes a coupon discount or a mass sale discount may be here.
        Returns:
        The optional-wrapped purchase discounts.
        See Also:
        Discounts, CouponDiscount, MassSaleDiscount
      • getCreatedAt

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

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