Codeunit 18122324 EOS004 Subscription

Codeunit 18122324 EOS004 Subscription

Methods

Initialize

procedure Initialize(AppId: Guid)

Initialize this instance for the given app.

Parameters / Return Value

  • AppId Guid

    The ID of the app.


InitializeForCaller

procedure InitializeForCaller()

Initialize this instance for the app calling this method.


Initialize

procedure Initialize(mi: ModuleInfo)

Initialize this instance for the given app.

Parameters / Return Value

  • mi ModuleInfo

    The module info of the app.


IsActive

procedure IsActive(): Boolean

Returns true if the subscription is active.

Parameters / Return Value

  • Returns Boolean

    true if the subscription is active.


AssertIsActive

procedure AssertIsActive()

Checks if a subscription is active. If not, an error is thrown.


IsExpiring

procedure IsExpiring(): Boolean

Returns true if the subscription is expiring within the next 14 days.

Parameters / Return Value

  • Returns Boolean

    true if the subscription is expiring within the next 14 days.


IsExpired

procedure IsExpired(): Boolean

Returns true if the subscription is expired.

Parameters / Return Value

  • Returns Boolean

    true if the subscription is expired.


IsTrial

procedure IsTrial(): Boolean

Returns true if the subscription is a trial subscription.

Parameters / Return Value

  • Returns Boolean

    true if the subscription is a trial subscription.


GetRemainingDays

procedure GetRemainingDays(): Integer

Returns the remaining number of days for the subscription.

Parameters / Return Value

  • Returns Integer

    The number of days.


SendNotifications

procedure SendNotifications(): Boolean

Send subscription notifications to the user (expired, expiring or trial). This will not send a notification if no subscription is active.

Parameters / Return Value

  • Returns Boolean

    true if any notification was sent.


SendNotifications

procedure SendNotifications(WarnIfNoSubscription: Boolean): Boolean

Send subscription notifications to the user (expired, expiring, trial or none active).

Parameters / Return Value

  • WarnIfNoSubscription Boolean

    Set this to true if you want to send a notification when no subscription is active.

  • Returns Boolean

    true if any notification was sent.



EOS Labs -