Skip to content

Commit 3ce141f

Browse files
authored
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
1 parent 6815663 commit 3ce141f

File tree

103 files changed

+5480
-2181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+5480
-2181
lines changed

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Add this dependency to your project's POM:
4949
<dependency>
5050
<groupId>one.talon</groupId>
5151
<artifactId>talon-one-client</artifactId>
52-
<version>4.2.0</version>
52+
<version>4.3.0</version>
5353
<scope>compile</scope>
5454
</dependency>
5555
```
@@ -59,7 +59,7 @@ Add this dependency to your project's POM:
5959
Add this dependency to your project's build file:
6060

6161
```groovy
62-
compile "one.talon:talon-one-client:4.2.0"
62+
compile "one.talon:talon-one-client:4.3.0"
6363
```
6464

6565
### Others
@@ -72,13 +72,12 @@ mvn clean package
7272

7373
Then manually install the following JARs:
7474

75-
* `target/talon-one-client-4.2.0.jar`
75+
* `target/talon-one-client-4.3.0.jar`
7676
* `target/lib/*.jar`
7777

7878
## Getting Started
7979

8080
Please follow the [installation](#installation) instruction and execute the following Java code:
81-
8281
### Integration API
8382

8483
#### V2
@@ -267,6 +266,7 @@ Class | Method | HTTP request | Description
267266
*ManagementApi* | [**createAttribute**](docs/ManagementApi.md#createAttribute) | **POST** /v1/attributes | Define a new custom attribute
268267
*ManagementApi* | [**createCampaign**](docs/ManagementApi.md#createCampaign) | **POST** /v1/applications/{applicationId}/campaigns | Create a Campaign
269268
*ManagementApi* | [**createCoupons**](docs/ManagementApi.md#createCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create Coupons
269+
*ManagementApi* | [**createCouponsForMultipleRecipients**](docs/ManagementApi.md#createCouponsForMultipleRecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create Coupons for Multiple Recipients
270270
*ManagementApi* | [**createPasswordRecoveryEmail**](docs/ManagementApi.md#createPasswordRecoveryEmail) | **POST** /v1/password_recovery_emails | Request a password reset
271271
*ManagementApi* | [**createRuleset**](docs/ManagementApi.md#createRuleset) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | Create a Ruleset
272272
*ManagementApi* | [**createSession**](docs/ManagementApi.md#createSession) | **POST** /v1/sessions | Create a Session
@@ -275,6 +275,11 @@ Class | Method | HTTP request | Description
275275
*ManagementApi* | [**deleteCoupons**](docs/ManagementApi.md#deleteCoupons) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Delete Coupons
276276
*ManagementApi* | [**deleteReferral**](docs/ManagementApi.md#deleteReferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete one Referral
277277
*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
278283
*ManagementApi* | [**getAccessLogs**](docs/ManagementApi.md#getAccessLogs) | **GET** /v1/applications/{applicationId}/access_logs | Get access logs for application (with total count)
279284
*ManagementApi* | [**getAccessLogsWithoutTotalCount**](docs/ManagementApi.md#getAccessLogsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/access_logs/no_total | Get access logs for application
280285
*ManagementApi* | [**getAccount**](docs/ManagementApi.md#getAccount) | **GET** /v1/accounts/{accountId} | Get Account Details
@@ -296,6 +301,7 @@ Class | Method | HTTP request | Description
296301
*ManagementApi* | [**getApplications**](docs/ManagementApi.md#getApplications) | **GET** /v1/applications | List Applications
297302
*ManagementApi* | [**getAttribute**](docs/ManagementApi.md#getAttribute) | **GET** /v1/attributes/{attributeId} | Get a custom attribute
298303
*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
299305
*ManagementApi* | [**getCampaign**](docs/ManagementApi.md#getCampaign) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId} | Get a Campaign
300306
*ManagementApi* | [**getCampaignAnalytics**](docs/ManagementApi.md#getCampaignAnalytics) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/analytics | Get analytics of campaigns
301307
*ManagementApi* | [**getCampaignByAttributes**](docs/ManagementApi.md#getCampaignByAttributes) | **POST** /v1/applications/{applicationId}/campaigns_search | Get a list of all campaigns that match the given attributes
@@ -314,7 +320,6 @@ Class | Method | HTTP request | Description
314320
*ManagementApi* | [**getCustomersByAttributes**](docs/ManagementApi.md#getCustomersByAttributes) | **POST** /v1/customer_search/no_total | Get a list of the customer profiles that match the given attributes
315321
*ManagementApi* | [**getEventTypes**](docs/ManagementApi.md#getEventTypes) | **GET** /v1/event_types | List Event Types
316322
*ManagementApi* | [**getExports**](docs/ManagementApi.md#getExports) | **GET** /v1/exports | Get Exports
317-
*ManagementApi* | [**getImports**](docs/ManagementApi.md#getImports) | **GET** /v1/imports | Get Imports
318323
*ManagementApi* | [**getLoyaltyPoints**](docs/ManagementApi.md#getLoyaltyPoints) | **GET** /v1/loyalty_programs/{programID}/profile/{integrationID} | get the Loyalty Ledger for this integrationID
319324
*ManagementApi* | [**getLoyaltyProgram**](docs/ManagementApi.md#getLoyaltyProgram) | **GET** /v1/loyalty_programs/{programID} | Get a loyalty program
320325
*ManagementApi* | [**getLoyaltyPrograms**](docs/ManagementApi.md#getLoyaltyPrograms) | **GET** /v1/loyalty_programs | List all loyalty Programs
@@ -387,7 +392,6 @@ Class | Method | HTTP request | Description
387392
- [CampaignSetLeafNode](docs/CampaignSetLeafNode.md)
388393
- [CampaignSetNode](docs/CampaignSetNode.md)
389394
- [CartItem](docs/CartItem.md)
390-
- [CartItemAdjustment](docs/CartItemAdjustment.md)
391395
- [Change](docs/Change.md)
392396
- [ChangeProfilePassword](docs/ChangeProfilePassword.md)
393397
- [CodeGeneratorSettings](docs/CodeGeneratorSettings.md)
@@ -428,7 +432,6 @@ Class | Method | HTTP request | Description
428432
- [FeedNotification](docs/FeedNotification.md)
429433
- [FuncArgDef](docs/FuncArgDef.md)
430434
- [FunctionDef](docs/FunctionDef.md)
431-
- [ImportCoupons](docs/ImportCoupons.md)
432435
- [InlineResponse200](docs/InlineResponse200.md)
433436
- [InlineResponse2001](docs/InlineResponse2001.md)
434437
- [InlineResponse20010](docs/InlineResponse20010.md)
@@ -499,13 +502,13 @@ Class | Method | HTTP request | Description
499502
- [NewCampaignGroup](docs/NewCampaignGroup.md)
500503
- [NewCampaignSet](docs/NewCampaignSet.md)
501504
- [NewCoupons](docs/NewCoupons.md)
505+
- [NewCouponsForMultipleRecipients](docs/NewCouponsForMultipleRecipients.md)
502506
- [NewCustomerProfile](docs/NewCustomerProfile.md)
503507
- [NewCustomerSession](docs/NewCustomerSession.md)
504508
- [NewCustomerSessionV2](docs/NewCustomerSessionV2.md)
505509
- [NewEvent](docs/NewEvent.md)
506510
- [NewEventType](docs/NewEventType.md)
507511
- [NewFeatureFlags](docs/NewFeatureFlags.md)
508-
- [NewImport](docs/NewImport.md)
509512
- [NewInvitation](docs/NewInvitation.md)
510513
- [NewInviteEmail](docs/NewInviteEmail.md)
511514
- [NewLoyaltyProgram](docs/NewLoyaltyProgram.md)
@@ -519,6 +522,7 @@ Class | Method | HTTP request | Description
519522
- [NewUser](docs/NewUser.md)
520523
- [NewWebhook](docs/NewWebhook.md)
521524
- [Notification](docs/Notification.md)
525+
- [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md)
522526
- [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md)
523527
- [Referral](docs/Referral.md)
524528
- [ReferralCreatedEffectProps](docs/ReferralCreatedEffectProps.md)
@@ -528,7 +532,9 @@ Class | Method | HTTP request | Description
528532
- [Role](docs/Role.md)
529533
- [RoleAssign](docs/RoleAssign.md)
530534
- [RoleMembership](docs/RoleMembership.md)
535+
- [RollbackAddedLoyaltyPointsEffectProps](docs/RollbackAddedLoyaltyPointsEffectProps.md)
531536
- [RollbackCouponEffectProps](docs/RollbackCouponEffectProps.md)
537+
- [RollbackDeductedLoyaltyPointsEffectProps](docs/RollbackDeductedLoyaltyPointsEffectProps.md)
532538
- [RollbackDiscountEffectProps](docs/RollbackDiscountEffectProps.md)
533539
- [Rule](docs/Rule.md)
534540
- [Ruleset](docs/Ruleset.md)

0 commit comments

Comments
 (0)