Skip to content

Commit b2e104b

Browse files
committed
support finalCode for ikea code
1 parent 394c8bf commit b2e104b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.16.1]
5+
6+
### Changed
7+
- Support finalCode for ikea code
8+
49
## [0.16.0]
510

611
### Changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ allprojects {
2323
}
2424

2525
project.ext {
26-
sdkVersion='0.16.0'
26+
sdkVersion='0.16.1'
2727
versionCode=1
2828

2929
compileSdkVersion=28

core/src/main/java/io/snabble/sdk/encodedcodes/EncodedCodesOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ public static EncodedCodesOptions fromJsonObject(Project project, JsonObject jso
136136
String separator = JsonUtils.getStringOpt(jsonObject, "separator", "\n");
137137
int maxCodes = JsonUtils.getIntOpt(jsonObject, "maxCodes", EncodedCodesOptions.DEFAULT_MAX_CODES);
138138
int maxChars = JsonUtils.getIntOpt(jsonObject, "maxChars", EncodedCodesOptions.DEFAULT_MAX_CHARS);
139+
String finalCode = JsonUtils.getStringOpt(jsonObject, "finalCode", "");
139140

140141
switch (format) {
141142
case "csv":
@@ -171,6 +172,7 @@ public static EncodedCodesOptions fromJsonObject(Project project, JsonObject jso
171172
.prefix(0, prefixWithCustomerCard)
172173
.separator("\u001d240")
173174
.suffix("")
175+
.finalCode(finalCode)
174176
.maxCodes(maxCodes)
175177
.maxChars(maxChars)
176178
.build();
@@ -182,7 +184,7 @@ public static EncodedCodesOptions fromJsonObject(Project project, JsonObject jso
182184
.separator(separator)
183185
.maxCodes(maxCodes)
184186
.maxChars(maxChars)
185-
.finalCode(JsonUtils.getStringOpt(jsonObject, "finalCode", ""))
187+
.finalCode(finalCode)
186188
.nextCode(JsonUtils.getStringOpt(jsonObject, "nextCode", ""))
187189
.nextCodeWithCheck(JsonUtils.getStringOpt(jsonObject, "nextCodeWithCheck", ""))
188190
.maxSizeMm(JsonUtils.getIntOpt(jsonObject, "maxSizeMM", -1))

0 commit comments

Comments
 (0)