Package io.meeds.billing.service
Class HubSettingService
java.lang.Object
io.meeds.billing.service.HubSettingService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateSettings(org.exoplatform.social.core.space.model.Space space, com.stripe.model.Subscription subscription, org.exoplatform.social.core.identity.model.Identity identity) Save the settings of the billable hubRetrieves all hub billing settings that are associated with a Stripe meter.getSettingsBySpaceId(Long spaceId, String authenticatedUser) Get the billable hub settingsgetSettingsBySpaceId(String spaceId) Get the billable hub settingsgetSettingsBySubscriptionId(String subscriptionId) Get the billable hub settingsRetrieves all hub billing settings associated with a tiered graduated Stripe plan.voidupdateHuBillingSetting(HubBillingSettings hubBillingSettings, com.stripe.model.Subscription subscription, Map<String, Object> previousAttributes) voidupdateSettings(HubBillingSettings hubBillingSettings) Save the settings of the billable hubvoidupdateSubscriptionStatus(Long billingHubId, String newSubscriptionStatus) Update the subscription status of the billable hub settings
-
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
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.ObjectNotFoundExceptionIllegalAccessException
-
getSettingsBySubscriptionId
public HubBillingSettings getSettingsBySubscriptionId(String subscriptionId) throws org.exoplatform.commons.exception.ObjectNotFoundException Get the billable hub settings- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
getSettingsBySpaceId
Get the billable hub settings -
updateSubscriptionStatus
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
Retrieves all hub billing settings that are associated with a Stripe meter.- Returns:
- a list of
HubBillingSettingsobjects that have an associated meter ID; an empty list if none are found
-
getTieredGraduatedBillingSettingList
Retrieves all hub billing settings associated with a tiered graduated Stripe plan.- Returns:
- a list of
HubBillingSettingsobjects that have an associated tiered graduated Stripe plan; an empty list if none are found
-