Search Results for

    Show / Hide Table of Contents

    Release notes for v4020

    List all products and their properties

    We have added a new method that allows you to get a list of all your products and their properties. For example, you can see all the associated data objects, feature definitions, etc. It can be called as shown below:

    public void TestGetProducts()
    {
        var auth = AccessToken.AccessToken.ProductMethods;
        var result = ProductMethods.GetProducts(token: auth, parameters: new RequestModel());
    
        Assert.IsNotNull(result);
        Assert.IsTrue(result.Result == ResultType.Success);
    }
    

    Record Usage

    If you want to record usage for a certain subscription (in our recurring billing module), you can use the RecordUsage method, which will call Stripe's API and register the usage for a subscription item associated with the license key. It can be called as shown below:

    public void TestRecordUsage()
    {
        var auth = AccessToken.AccessToken.SubscriptionMethods;
        var res = Subscription.RecordUsage(auth, new RecordUsageModel { Amount = 1, ProductId = 3349, Key = "CMXKC-GUQRW-EJUGS-RRPUR" });
    
        Assert.IsTrue(res != null && res.Result == ResultType.Success);
    }
    
    • Edit this page
    In this article
    Back to top Copyright © Cryptolens AB