Interface Product

    • Method Detail

      • getId

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

        int getShopId()
        Get the ID of the product owning shop.
        Returns:
        The owning shop ID.
      • getName

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

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

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

        double getPrice()
        Get the base price of this product.
        Returns:
        The product price.
      • getAmount

        int getAmount()
        Get the default amount of this product.
        Returns:
        The product amount.
      • getDescription

        @NotNull
        @NotNull Optional<String> getDescription()
        Get the optional-wrapped description of this product.
        If a description isn't actually specified, this method will return an empty Optional.
        Returns:
        The optional-wrapped product description.
      • getOldPrice

        @NotNull
        @NotNull OptionalDouble getOldPrice()
        Get the optional-wrapped old price of this product.
        The old price is a good marketing tool :)
        Returns:
        The optional-wrapped product old price.
      • getCategoryId

        @NotNull
        @NotNull OptionalInt getCategoryId()
        Get the optional-wrapped category ID of this product.
        It's useless now because EasyDonate API hasn't categories related methods.
        Returns:
        The optional-wrapped product category ID.
      • getIconImage

        @NotNull
        @NotNull String getIconImage()
        Get the icon image of this product.
        It's always just a direct URL to some image.
        Returns:
        The product icon image.
      • isHidden

        boolean isHidden()
        Check is this product is hidden from the shop web-pages.
        Returns:
        A boolean value: the check result.
      • isOneTimePurchasable

        boolean isOneTimePurchasable()
        Check is this 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 product configured list of commands.
        See Also:
        Payment.getSentCommands()
      • getWithdrawCommands

        @NotNull
        @NotNull List<String> getWithdrawCommands()
        Get the in-game commands for withdraw the purchase after any time.
        If there are no withdraw commands specified then this list will be empty.
        Returns:
        The product configured list of withdraw commands.
      • getWithdrawCommandsDelay

        @NotNull
        @NotNull OptionalInt getWithdrawCommandsDelay()
        Get the optional-wrapped delay for withdraw commands running.
        If this method has return an empty Optional then there are no withdraw commands configured.
        Returns:
        The product withdraw commands running delay.
      • getAdditionalFields

        @NotNull
        @NotNull List<AdditionalField> getAdditionalFields()
        Get the list of additional fields for this product.
        Returns:
        The product configured additional fields.
        See Also:
        AdditionalField
      • getServers

        @NotNull
        @NotNull Optional<ServersList> getServers()
        Get the compatible servers list for this product.
        Returns:
        The product configured servers.
      • getCreatedAt

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

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