Class HubSettingService

java.lang.Object
io.meeds.billing.service.HubSettingService

@Service public class HubSettingService extends Object
  • Constructor Details

    • HubSettingService

      public HubSettingService()
  • Method Details

    • createSettings

      public void createSettings(org.exoplatform.social.core.space.model.Space space, com.stripe.model.Subscription subscription, org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.commons.ObjectAlreadyExistsException
      Save the settings of the billable hub
      Throws:
      org.exoplatform.commons.ObjectAlreadyExistsException
    • updateSettings

      public void updateSettings(HubBillingSettings hubBillingSettings)
      Save the settings of the billable hub
    • getSettingsBySpaceId

      public HubBillingSettings getSettingsBySpaceId(Long spaceId, String authenticatedUser) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Get the billable hub settings
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
    • getSettingsBySubscriptionId

      public HubBillingSettings getSettingsBySubscriptionId(String subscriptionId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Get the billable hub settings
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
    • getSettingsBySpaceId

      public HubBillingSettings getSettingsBySpaceId(String spaceId)
      Get the billable hub settings
    • updateSubscriptionStatus

      public void updateSubscriptionStatus(Long billingHubId, String newSubscriptionStatus)
      Update the subscription status of the billable hub settings
    • updateHuBillingSetting

      public void updateHuBillingSetting(HubBillingSettings hubBillingSettings, com.stripe.model.Subscription subscription, Map<String,Object> previousAttributes)
    • getMeteredHubBillingSettingList

      public List<HubBillingSettings> getMeteredHubBillingSettingList()
      Retrieves all hub billing settings that are associated with a Stripe meter.
      Returns:
      a list of HubBillingSettings objects that have an associated meter ID; an empty list if none are found