接口 PaymentService

  • 所有已知实现类:
    BackupSubscription, VaultSubscription

    public interface PaymentService
    The payment service provides users with the way to purchase a paid vault or backup service, such as to subscribe to a new vault or backup with paid pricing plan or extend the purchased subscription service.
    • 方法概要

      所有方法 实例方法 抽象方法 
      修饰符和类型 方法 说明
      java.util.concurrent.CompletableFuture<Order> getOrder​(int orderId)
      Obtain the order detail according to the given order id.
      java.util.concurrent.CompletableFuture<java.util.List<Order>> getOrderList()
      Obtain all the list of order detail.
      java.util.concurrent.CompletableFuture<Receipt> getReceipt​(int orderId)
      Obtain the receipt detail according to the order id.
      java.util.concurrent.CompletableFuture<java.util.List<Receipt>> getReceipts()
      Obtain the receipt of the vault.
      java.util.concurrent.CompletableFuture<java.lang.String> getVersion()
      Obtain the version of the payment module.
      java.util.concurrent.CompletableFuture<Order> placeOrder​(java.lang.String planName)
      Place an order for new subscription or extending the existing subscription service.
      java.util.concurrent.CompletableFuture<Receipt> settleOrder​(int orderId)
      Pay for the order with a given id.
    • 方法详细资料

      • placeOrder

        java.util.concurrent.CompletableFuture<Order> placeOrder​(java.lang.String planName)
        Place an order for new subscription or extending the existing subscription service.
        参数:
        planName - the name of the pricing plan
        返回:
        return the new order detail when the request successfully was received by back-end node, otherwise return the specific exception.
      • getOrder

        java.util.concurrent.CompletableFuture<Order> getOrder​(int orderId)
        Obtain the order detail according to the given order id.
        参数:
        orderId - order id
        返回:
        return the order detail in case there is a order with order id existing. otherwise, return the specific exception.
      • getOrderList

        java.util.concurrent.CompletableFuture<java.util.List<Order>> getOrderList()
        Obtain all the list of order detail.
        返回:
        return the list of order detail on success, otherwise, return the specific exception.
      • settleOrder

        java.util.concurrent.CompletableFuture<Receipt> settleOrder​(int orderId)
        Pay for the order with a given id.
        参数:
        orderId - order id of the payment contract
        返回:
        return the receipt detail in case the payment was accepted by hive node, otherwise return the specific exception.
      • getReceipt

        java.util.concurrent.CompletableFuture<Receipt> getReceipt​(int orderId)
        Obtain the receipt detail according to the order id.
        参数:
        orderId - order id.
        返回:
        return the receipt detail in case there is a receipt existing, otherwise, return the specific exception.
      • getReceipts

        java.util.concurrent.CompletableFuture<java.util.List<Receipt>> getReceipts()
        Obtain the receipt of the vault.
        返回:
        return the receipt detail in case there is a receipt existing, otherwise, return the specific exception.
      • getVersion

        java.util.concurrent.CompletableFuture<java.lang.String> getVersion()
        Obtain the version of the payment module.
        返回:
        return the version, otherwise, return the specific exception.