Skip to content

v4.3.0: Multiple personal coupons creation endpoint, Loyalty related counters and Export Endpoints

Compare
Choose a tag to compare
@altJake altJake released this 14 Dec 22:19
· 34 commits to master since this release
3ce141f

Summary

Management API

Introduce createCouponsForMultipleRecipients

An endpoint/operation to allow creation of multiple coupons of the same configuration for up to 1,000 recipients at once.

Expose our export endpoints as integral part of the SDK

All of our CSV export operations are accessible via the Web Application from the corresponding entity pages (refer to our Help Center for an example regarding Coupons).

Now these are also available operations as part of the SDK (links to our developer docs):

Example code snippet demonstrating consuming and printing the lines of a Customer Loyalty Balance Export using the java.nio.file.Files package:

import java.io.File;
import java.nio.file.Files;

import one.talon.ApiClient;
import one.talon.api.ManagementApi;
import one.talon.model.*;

// ...preparing api client...
// An example could be seen at the repository's README file: https://github.com/talon-one/TalonOneJavaSdk#management-api

try {
    String programID = "1"; // loyalty program identifier
    File response = api.exportLoyaltyBalance(programID);
    List<String> contents = Files.readAllLines(response.toPath());
    System.out.println(contents);
} catch (Exception e) {
    System.out.println(e);
}

Expose destroySession

Expose an already existed endpoint to allow destroying a bearer token used in the context of the management-api.
This endpoint imitates a "logout" operation and will make the attached token invalid for consequent requests.

Introduce loyalty effects related counters on Campaign entities

As part of the newly added budgets to campaigns (see relevant Help Center Section), we now count and expose four new counters on campaigns with regard to loyalty:

  • createdLoyaltyPointsCount : Total number of loyalty points created by rules in this campaign
  • createdLoyaltyPointsEffectCount : Total number of loyalty point creation effects triggered by rules in this campaign
  • redeemedLoyaltyPointsCount : Total number of loyalty points redeemed by rules in this campaign
  • redeemedLoyaltyPointsEffectCount : Total number of loyalty point redemption effects triggered by rules in this campaign

⚠️⚠️ Breaking Change: Fix Campaign's discountCount type from Integer to BigDecimal

Campaign's discountCount counter property was all along calculated as a floating decimal number by our system.

From this release on the returned values will be floating decimals and not cut-off integers:

-**discountCount** | **Integer** | Total amount of discounts redeemed in the campaign. |  [optional]
+**discountCount** | [**BigDecimal**](BigDecimal.md) | Total amount of discounts redeemed in the campaign. |  [optional]

Integration API

⚠️ A reminder of The Deprecation Notice: Integration API@v1 endpoints

The deprecation was introduced already in the last release of the SDK, here is a kind reminder of the deprecation notices for Integration API@v1 endpoints:

These endpoints will be flagged deprecated on 15.07.2021, meaning support for requests to these endpoints will end on that date. We will not remove the endpoints, and they will still be accessible for you to use.

We highly encourage migrating to the correspondent v2 endpoints for easier and more granular integration, as well as new features support (See our developer docs section about API V2.0).

Misc: Bump junit from 4.13 to 4.13.1

As per Pull Request #17, we have bumped the version of the junit library dependency to 4.13.1, after an alert regarding a security vulnerability with the former 4.13.