Interface VoucherServiceLocal

    • Method Detail

      • block

        void block​(Voucher voucher)
        Sets the voucher status as blocked. The voucher needs to be open. It will be needed to be unblocked in the /voucher app. WARNING: this method is used by scripts only. There's no use case for having it in the public API.
      • chargeback

        VoucherChargeback chargeback​(Payment payment)
        Creates a voucher chargeback for the given chargeback transaction. Returns the voucher chargeback if it was generated, or null if there's no chargeback to perform.
      • countTotalOpenVouchers

        int countTotalOpenVouchers()
        Returns the number of open vouchers for all networks
      • expire

        void expire​(Voucher voucher)
        Expires the given voucher
      • expireActivation

        void expireActivation​(Voucher voucher)
        Expires the activation of the given voucher
      • formatMobilePhone

        String formatMobilePhone​(Voucher voucher)
        Formats the voucher's mobile phone according to the configuration of the owner/buyer first or, if null, from the user who activated the voucher. If the resolved user still is null then the default configuration will be used.
      • hasAmountReservation

        boolean hasAmountReservation​(Voucher voucher)
        Returns whether the given voucher has any reservations, either by pack or by top-ups
      • iterateVouchers

        com.mysema.commons.lang.CloseableIterator<Voucher> iterateVouchers​(VoucherPack voucherPack)
        Iterates all voucher of a voucher pack
      • notifyAboutToExpire

        void notifyAboutToExpire​(Voucher voucher)
        Notifies that a voucher is about to expire
      • showPinOnDetails

        boolean showPinOnDetails​(Voucher v)
        Indicates whether the PIN should be shown in the voucher details
      • showQrCode

        boolean showQrCode​(Voucher voucher)
        Returns if the QrCode of the voucher can be shown (e.g for printing or in the details page)
      • usePin

        boolean usePin​(Voucher voucher)
        The voucher uses PIN if has a defined one and was not switched-off in the voucher configuration.
      • validate

        void validate​(SendVoucherDTO dto)
        Validates a voucher sending parameters