Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Products Namespace / SubscriptionPlan Class / Generate Method / Generate(Int32,Int32,Boolean) Method
ID of the order item for the purchase of this subscription.
ID of the user who has purchased the subscription.
Indicates whether the subscription should be activated when it is generated.
In This Topic
    Generate(Int32,Int32,Boolean) Method
    In This Topic
    Create a subscription for this plan for the given customer.
    Syntax
    public virtual Subscription Generate( 
       int orderItemId,
       int userId,
       bool activate
    )

    Parameters

    orderItemId
    ID of the order item for the purchase of this subscription.
    userId
    ID of the user who has purchased the subscription.
    activate
    Indicates whether the subscription should be activated when it is generated.

    Return Value

    The subscription created
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also