You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
*ManagementApi* | [**deleteReferral**](docs/ManagementApi.md#deleteReferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete one Referral
277
277
*ManagementApi* | [**deleteRuleset**](docs/ManagementApi.md#deleteRuleset) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Delete a Ruleset
278
+
*ManagementApi* | [**destroySession**](docs/ManagementApi.md#destroySession) | **DELETE** /v1/sessions | Destroy a Session
279
+
*ManagementApi* | [**exportCoupons**](docs/ManagementApi.md#exportCoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export Coupons to a CSV file.
280
+
*ManagementApi* | [**exportCustomerSessions**](docs/ManagementApi.md#exportCustomerSessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export Customer Sessions to a CSV file.
281
+
*ManagementApi* | [**exportEffects**](docs/ManagementApi.md#exportEffects) | **GET** /v1/applications/{applicationId}/export_effects | Export triggered Effects to a CSV file.
282
+
*ManagementApi* | [**exportLoyaltyBalance**](docs/ManagementApi.md#exportLoyaltyBalance) | **GET** /v1/loyalty_programs/{programID}/export_customer_balance | Export customer loyalty balance to a CSV file
278
283
*ManagementApi* | [**getAccessLogs**](docs/ManagementApi.md#getAccessLogs) | **GET** /v1/applications/{applicationId}/access_logs | Get access logs for application (with total count)
279
284
*ManagementApi* | [**getAccessLogsWithoutTotalCount**](docs/ManagementApi.md#getAccessLogsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/access_logs/no_total | Get access logs for application
280
285
*ManagementApi* | [**getAccount**](docs/ManagementApi.md#getAccount) | **GET** /v1/accounts/{accountId} | Get Account Details
*ManagementApi* | [**getApplications**](docs/ManagementApi.md#getApplications) | **GET** /v1/applications | List Applications
297
302
*ManagementApi* | [**getAttribute**](docs/ManagementApi.md#getAttribute) | **GET** /v1/attributes/{attributeId} | Get a custom attribute
298
303
*ManagementApi* | [**getAttributes**](docs/ManagementApi.md#getAttributes) | **GET** /v1/attributes | List custom attributes
304
+
*ManagementApi* | [**getAudiences**](docs/ManagementApi.md#getAudiences) | **GET** /v1/audiences | Get all audiences
299
305
*ManagementApi* | [**getCampaign**](docs/ManagementApi.md#getCampaign) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId} | Get a Campaign
300
306
*ManagementApi* | [**getCampaignAnalytics**](docs/ManagementApi.md#getCampaignAnalytics) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/analytics | Get analytics of campaigns
301
307
*ManagementApi* | [**getCampaignByAttributes**](docs/ManagementApi.md#getCampaignByAttributes) | **POST** /v1/applications/{applicationId}/campaigns_search | Get a list of all campaigns that match the given attributes
*ManagementApi* | [**getCustomersByAttributes**](docs/ManagementApi.md#getCustomersByAttributes) | **POST** /v1/customer_search/no_total | Get a list of the customer profiles that match the given attributes
315
321
*ManagementApi* | [**getEventTypes**](docs/ManagementApi.md#getEventTypes) | **GET** /v1/event_types | List Event Types
316
322
*ManagementApi* | [**getExports**](docs/ManagementApi.md#getExports) | **GET** /v1/exports | Get Exports
317
-
*ManagementApi* | [**getImports**](docs/ManagementApi.md#getImports) | **GET** /v1/imports | Get Imports
318
323
*ManagementApi* | [**getLoyaltyPoints**](docs/ManagementApi.md#getLoyaltyPoints) | **GET** /v1/loyalty_programs/{programID}/profile/{integrationID} | get the Loyalty Ledger for this integrationID
319
324
*ManagementApi* | [**getLoyaltyProgram**](docs/ManagementApi.md#getLoyaltyProgram) | **GET** /v1/loyalty_programs/{programID} | Get a loyalty program
320
325
*ManagementApi* | [**getLoyaltyPrograms**](docs/ManagementApi.md#getLoyaltyPrograms) | **GET** /v1/loyalty_programs | List all loyalty Programs
0 commit comments