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.
      • showQrCode

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

        VoucherChargeback chargeback​(Chargeback chargeback)
        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.
      • getTransactionVisibility

        VoucherTransactionsVisibility getTransactionVisibility​(Voucher voucher)
        Returns how transactions of the given voucher should be visible by the logged user
      • isOnlyOwnTransactions

        boolean isOnlyOwnTransactions()
        Returns whether the logged user is a restricted operator that can only see vouchers redeemed by himself. Note that returning false doesn't mean the logged user can see all redeemed vouchers, but a check on the permission Permission.MY_VOUCHERS_VIEW_TRANSACTIONS is still needed.
      • isVisible

        boolean isVisible​(Voucher voucher)
      • 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
      • shouldMaskToken

        boolean shouldMaskToken​(Voucher voucher)
        Returns whether the voucher token should be masked to display to the logged user
      • showPinOnDetails

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