Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v4.3.0: Multiple personal coupons creation endpoint, Loyalty related …
…counters and Export Endpoints (#18) ## Summary ### Management API #### Introduce [`createCouponsForMultipleRecipients`](https://github.com/talon-one/TalonOneJavaSdk/blob/7d13f26c14b1436376a1608f52f9c8bef96e448b/docs/ManagementApi.md#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](https://help.talon.one/hc/en-us/articles/360010114599-Import-and-Export-Coupons#ExportExistingCodes) for an example regarding Coupons). Now these are also available operations as part of the SDK (links to our developer docs): - [Coupons Export](https://developers.talon.one/Management-API/API-Reference#exportCoupons) - [Customer Sessions Export](https://developers.talon.one/Management-API/API-Reference#exportCustomerSessions) - [Effects Export](https://developers.talon.one/Management-API/API-Reference#exportEffects) - [Customer Loyalty Balance Export](https://developers.talon.one/Management-API/API-Reference#exportLoyaltyBalance) Example code snippet demonstrating consuming and printing the lines of a _Customer Loyalty Balance Export_ using the `java.nio.file.Files` package: ```java 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`](https://github.com/talon-one/TalonOneJavaSdk/blob/7d13f26c14b1436376a1608f52f9c8bef96e448b/docs/ManagementApi.md#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](https://help.talon.one/hc/en-us/articles/360010114779-Campaign-Budget#LoyaltyLimits)), 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: ```diff -**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: - [Update a Customer Session (V1)](https://github.com/talon-one/TalonOneJavaSdk/blob/85dc9bf8acf75cf02f6504af7d0228a049dae569/docs/IntegrationApi.md#updateCustomerSession) - [Update a Customer Profile (V1)](https://github.com/talon-one/TalonOneJavaSdk/blob/85dc9bf8acf75cf02f6504af7d0228a049dae569/docs/IntegrationApi.md#updateCustomerProfile) 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](https://developers.talon.one/Getting-Started/APIV2) about API V2.0). ### Misc: Bump junit from 4.13 to 4.13.1 As per [Pull Request #17](#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`. ## Commit Summary: * Initial Commit * Fix management api export endpoints
- Loading branch information