Skip to content

Commit 0af71f9

Browse files
authored
update to version 12.0.0 (#74)
1 parent 0c47688 commit 0af71f9

File tree

639 files changed

+6888
-5880
lines changed

Some content is hidden

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

639 files changed

+6888
-5880
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
- name: Install dependencies
3535
run: |
3636
sudo apt-get install jq curl
37+
- name: Set Release version env variable
38+
run: |
39+
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
3740
- name: Run example
3841
run: |
3942
echo "running example";
@@ -78,7 +81,7 @@ jobs:
7881
7982
echo "maven install";
8083
mvn clean install;
81-
export CLASSPATH=.:./src/main/java:./target/lib/gson-2.8.9.jar:./target/talon-one-client-11.0.0.jar:./target/lib/okio-1.17.2.jar:./target/lib/okhttp-3.14.7.jar:./target/lib/threetenbp-1.4.3.jar:./target/lib/gson-fire-1.8.4.jar;
84+
export CLASSPATH=.:./src/main/java:./target/lib/gson-2.8.9.jar:./target/talon-one-client-${{ env.RELEASE_VERSION }}.jar:./target/lib/okio-1.17.2.jar:./target/lib/okhttp-3.14.7.jar:./target/lib/threetenbp-1.4.3.jar:./target/lib/gson-fire-1.8.4.jar;
8285
8386
echo "java compile";
8487
javac -d . Example.java;

Example.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static void main(String[] args) throws Exception {
2424
CartItem cartItem = new CartItem();
2525
cartItem.setName("Hawaiian Pizza");
2626
cartItem.setSku("pizza-x");
27-
cartItem.setQuantity(1);
27+
cartItem.setQuantity(1L);
2828
cartItem.setPrice(new java.math.BigDecimal("5.5"));
2929

3030
// Creating a customer session of V2
@@ -35,12 +35,12 @@ public static void main(String[] args) throws Exception {
3535

3636
// Initiating integration request wrapping the customer session update
3737
IntegrationRequest request = new IntegrationRequest()
38-
.customerSession(customerSession)
39-
// Optional parameter of requested information to be present on the response related to the customer session update
40-
.responseContent(Arrays.asList(
41-
IntegrationRequest.ResponseContentEnum.CUSTOMERSESSION,
42-
IntegrationRequest.ResponseContentEnum.CUSTOMERPROFILE
43-
));
38+
.customerSession(customerSession)
39+
// Optional parameter of requested information to be present on the response
40+
// related to the customer session update
41+
.responseContent(Arrays.asList(
42+
IntegrationRequest.ResponseContentEnum.CUSTOMERSESSION,
43+
IntegrationRequest.ResponseContentEnum.CUSTOMERPROFILE));
4444

4545
// Flag to communicate whether the request is a "dry run"
4646
Boolean dryRun = false;
@@ -49,14 +49,15 @@ public static void main(String[] args) throws Exception {
4949
IntegrationStateV2 is = iApi.updateCustomerSessionV2("deetdoot", request, dryRun, null);
5050
System.out.println(is.toString());
5151

52-
// Parsing the returned effects list, please consult https://developers.talon.one/Integration-API/handling-effects-v2 for the full list of effects and their corresponding properties
52+
// Parsing the returned effects list, please consult
53+
// https://developers.talon.one/Integration-API/handling-effects-v2 for the full
54+
// list of effects and their corresponding properties
5355
for (Effect eff : is.getEffects()) {
5456
if (eff.getEffectType().equals("addLoyaltyPoints")) {
5557
// Typecasting according to the specific effect type
5658
AddLoyaltyPointsEffectProps props = gson.fromJson(
57-
gson.toJson(eff.getProps()),
58-
AddLoyaltyPointsEffectProps.class
59-
);
59+
gson.toJson(eff.getProps()),
60+
AddLoyaltyPointsEffectProps.class);
6061
// Access the specific effect's properties
6162
System.out.println(props.getName());
6263
System.out.println(props.getProgramId());
@@ -65,9 +66,8 @@ public static void main(String[] args) throws Exception {
6566
if (eff.getEffectType().equals("acceptCoupon")) {
6667
// Typecasting according to the specific effect type
6768
AcceptCouponEffectProps props = gson.fromJson(
68-
gson.toJson(eff.getProps()),
69-
AcceptCouponEffectProps.class
70-
);
69+
gson.toJson(eff.getProps()),
70+
AcceptCouponEffectProps.class);
7171
// work with AcceptCouponEffectProps' properties
7272
// ...
7373
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Add this dependency to your project's POM:
3535
<dependency>
3636
<groupId>one.talon</groupId>
3737
<artifactId>talon-one-client</artifactId>
38-
<version>11.0.0</version>
38+
<version>12.0.0</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
```
@@ -45,7 +45,7 @@ Add this dependency to your project's POM:
4545
Add this dependency to your project's build file:
4646

4747
```groovy
48-
compile "one.talon:talon-one-client:11.0.0"
48+
compile "one.talon:talon-one-client:12.0.0"
4949
```
5050

5151
### Others

0 commit comments

Comments
 (0)