Interface UsageUserApi

    • Method Detail

      • recordRolledUpUsage

        void recordRolledUpUsage​(SubscriptionUsageRecord usage,
                                 CallContext context)
                          throws UsageApiException
        Bulk usage API when the external system (or the meter module) rolls-up usage data.

        Parameters:
        usage - the usage for a given period of time associated with a subscription
        context - tenant context
        Throws:
        UsageApiException
      • getUsageForSubscription

        RolledUpUsage getUsageForSubscription​(UUID subscriptionId,
                                              String unitType,
                                              org.joda.time.DateTime startDate,
                                              org.joda.time.DateTime endDate,
                                              Iterable<PluginProperty> properties,
                                              TenantContext context)
        Get usage information for a given subscription.
        Parameters:
        subscriptionId - subscription id
        unitType - unit type for this usage
        startDate - start date of the usage period (with respect to the account timezone)
        endDate - end date of the usage period (with respect to the account timezone)
        properties - plugin specific properties
        context - tenant context
        Returns:
        usage data (rolled-up)
      • getAllUsageForSubscription

        List<RolledUpUsage> getAllUsageForSubscription​(UUID subscriptionId,
                                                       List<org.joda.time.DateTime> transitionDates,
                                                       Iterable<PluginProperty> properties,
                                                       TenantContext context)
        Get usage information for a given subscription.
        Parameters:
        subscriptionId - subscription id
        properties - plugin specific properties
        context - tenant context
        Returns:
        usage data (rolled-up)