Skip to content

Commit 95778cc

Browse files
committed
javadoc cleanup
1 parent 056dfe6 commit 95778cc

20 files changed

+98
-94
lines changed

core/src/main/java/io/snabble/sdk/CustomerCardInfo.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ data class CustomerCardInfo(
88
* Unique id of the customer card type
99
**/
1010
val cardId: String,
11+
1112
/**
1213
* True if the customer card is required for checkout, false otherwise
1314
*/

core/src/main/java/io/snabble/sdk/Environment.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ enum class Environment(domain: String) {
1212
* Get the base url used for every request made from the sdk
1313
*/
1414
val baseUrl: String = "https://api.$domain"
15+
1516
/**
1617
* Get a wildcard url, for certificate pinning
1718
*/

core/src/main/java/io/snabble/sdk/FulfillmentState.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import com.google.gson.annotations.SerializedName
44
import io.snabble.sdk.FulfillmentState
55

66
/**
7-
* Enum class describing the state of a fulfillment.
7+
* Enum class describing the state of a fulfillment
88
*/
99
enum class FulfillmentState {
1010
@SerializedName("open")
@@ -38,7 +38,7 @@ enum class FulfillmentState {
3838
}
3939

4040
/**
41-
* Returns true if the current fulfillment has failed. This state is final.
41+
* Returns true if the current fulfillment has failed. This state is final
4242
*/
4343
val isFailure: Boolean
4444
get() = when(this) {
@@ -50,7 +50,7 @@ enum class FulfillmentState {
5050
}
5151

5252
/**
53-
* Returns true if the current fulfillment is closed, successful or not. This state is final.
53+
* Returns true if the current fulfillment is closed, successful or not. This state is final
5454
*/
5555
val isClosed: Boolean
5656
get() = when(this) {

core/src/main/java/io/snabble/sdk/PaymentMethod.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import androidx.annotation.Nullable
44
import com.google.gson.annotations.SerializedName
55

66
/**
7-
* Enum class describing payment methods.
7+
* Enum class describing payment methods
88
*/
99
enum class PaymentMethod(
1010
/**

core/src/main/java/io/snabble/sdk/PriceFormatter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import java.math.BigDecimal
77
import java.text.NumberFormat
88

99
/**
10-
* A price formatter for formatting prices using the provided currency information.
10+
* A price formatter for formatting prices using the provided currency information
1111
*
1212
*/
1313
class PriceFormatter(private val project: Project) {
@@ -22,7 +22,7 @@ class PriceFormatter(private val project: Project) {
2222
}
2323

2424
/**
25-
* Format a price.
25+
* Format a price
2626
*/
2727
@JvmOverloads
2828
fun format(price: Int, allowZeroPrice: Boolean = true): String {

core/src/main/java/io/snabble/sdk/Product.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class Product implements Serializable, Parcelable {
2727
public enum Type {
2828
/**
29-
* A basic product with price information.
29+
* A basic product with price information
3030
*/
3131
Article(0),
3232

@@ -224,14 +224,14 @@ public int getListPrice() {
224224
}
225225

226226
/**
227-
* Gets the subtitle of the product. Most of the time it is the Brand name of the product.
227+
* Gets the subtitle of the product. Most of the time it is the Brand name of the product
228228
*/
229229
public String getSubtitle() {
230230
return subtitle;
231231
}
232232

233233
/**
234-
* Gets the discounted price, or the default price if this product has no discounted price,
234+
* Gets the discounted price, or the default price if this product has no discounted price
235235
*/
236236
public int getDiscountedPrice() {
237237
return discountedPrice == 0 ? getListPrice() : discountedPrice;
@@ -301,14 +301,14 @@ public String getBasePrice() {
301301
}
302302

303303
/**
304-
* @return The {@link Type} of the product.
304+
* @return The {@link Type} of the product
305305
*/
306306
public Type getType() {
307307
return type;
308308
}
309309

310310
/**
311-
* @return The [@link SaleRestriction} of the product.
311+
* @return The [@link SaleRestriction} of the product
312312
*/
313313
public SaleRestriction getSaleRestriction() {
314314
return saleRestriction;
@@ -386,14 +386,14 @@ public Product.Code getPrimaryCode() {
386386
}
387387

388388
/**
389-
* Returns true if this product should not be available for sale anymore.
389+
* Returns true if this product should not be available for sale anymore
390390
*/
391391
public boolean getSaleStop() {
392392
return saleStop;
393393
}
394394

395395
/**
396-
* Returns true if this product is not for sale.
396+
* Returns true if this product is not for sale
397397
*/
398398
public boolean getNotForSale() {
399399
return notForSale;
@@ -412,7 +412,7 @@ public String getScanMessage() {
412412
}
413413

414414
/**
415-
* Returns the price for a given quantity. Get encoded into its encoding unit, if required.
415+
* Returns the price for a given quantity. Get encoded into its encoding unit, if required
416416
*/
417417
public int getPriceForQuantity(int quantity, ScannedCode scannedCode, RoundingMode roundingMode) {
418418
return getPriceForQuantity(quantity, scannedCode, roundingMode, null);

core/src/main/java/io/snabble/sdk/Project.kt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import java.util.concurrent.CopyOnWriteArrayList
2828
*/
2929
class Project internal constructor(jsonObject: JsonObject) {
3030
/**
31-
* The unique identifier of the Project.
31+
* The unique identifier of the Project
3232
*/
3333
lateinit var id: String
3434
private set
@@ -55,7 +55,7 @@ class Project internal constructor(jsonObject: JsonObject) {
5555
private set
5656

5757
/**
58-
* The roundingMode which should be used when doing offline calculations.
58+
* The roundingMode which should be used when doing offline calculations
5959
*/
6060
var roundingMode: RoundingMode = RoundingMode.HALF_UP
6161
private set
@@ -67,13 +67,13 @@ class Project internal constructor(jsonObject: JsonObject) {
6767
private set
6868

6969
/**
70-
* The locale in which this currency is used.
70+
* The locale in which this currency is used
7171
*/
7272
lateinit var currencyLocale: Locale
7373
private set
7474

7575
/**
76-
* The number of used currency fractions digits.
76+
* The number of used currency fractions digits
7777
*/
7878
var currencyFractionDigits = -1
7979
get() =
@@ -90,27 +90,27 @@ class Project internal constructor(jsonObject: JsonObject) {
9090

9191
/**
9292
* Parameters in which codes used for offline processing
93-
* (for example: Checkout using a QR-Code) should be encoded.
93+
* (for example: Checkout using a QR-Code) should be encoded
9494
*/
9595
var encodedCodesOptions: EncodedCodesOptions? = null
9696
private set
9797

9898
/**
9999
* List of supported barcode formats used by this retailer. The scanner should restrict its
100-
* scanning to include only those formats.
100+
* scanning to include only those formats
101101
*/
102102
var supportedBarcodeFormats = emptyList<BarcodeFormat>()
103103
private set
104104

105105
/**
106-
* Indicator if prices should be displayed using the net price instead of the gross price.
106+
* Indicator if prices should be displayed using the net price instead of the gross price
107107
*/
108108
var isDisplayingNetPrice = false
109109
private set
110110

111111
/**
112112
* List of payment method descriptors indicating which
113-
* payment methods and providers are available in the Project.
113+
* payment methods and providers are available in the Project
114114
*/
115115
var paymentMethodDescriptors: List<PaymentMethodDescriptor> = emptyList()
116116
private set
@@ -126,7 +126,7 @@ class Project internal constructor(jsonObject: JsonObject) {
126126
private set
127127

128128
/**
129-
* Returns the possible accepted cards and if a customer card is required.
129+
* Returns the possible accepted cards and if a customer card is required
130130
*/
131131
var customerCardInfo = emptyList<CustomerCardInfo>()
132132
private set
@@ -141,7 +141,7 @@ class Project internal constructor(jsonObject: JsonObject) {
141141
private set
142142

143143
/**
144-
* Sets the customer card number for user identification with the backend.
144+
* Sets the customer card number for user identification with the backend
145145
*/
146146
var customerCardId: String? = null
147147
set(value) {
@@ -171,13 +171,13 @@ class Project internal constructor(jsonObject: JsonObject) {
171171

172172
/**
173173
* List of code templates that are used when supplying an existing Product with a different
174-
* barcode which contains a reduced price.
174+
* barcode which contains a reduced price
175175
*/
176176
var priceOverrideTemplates = emptyList<PriceOverrideTemplate>()
177177
private set
178178

179179
/**
180-
* List of code templates that are searchable using the barcode search functionality.
180+
* List of code templates that are searchable using the barcode search functionality
181181
*/
182182
var searchableTemplates = emptyList<String>()
183183
private set
@@ -198,7 +198,7 @@ class Project internal constructor(jsonObject: JsonObject) {
198198
private set
199199

200200
/**
201-
* Url to retrieve authentication tokens.
201+
* Url to retrieve authentication tokens
202202
*/
203203
var tokensUrl: String? = null
204204
private set
@@ -301,13 +301,13 @@ class Project internal constructor(jsonObject: JsonObject) {
301301
private set
302302

303303
/**
304-
* The primary product database of this project.
304+
* The primary product database of this project
305305
*/
306306
lateinit var productDatabase: ProductDatabase
307307
private set
308308

309309
/**
310-
* Event logger which ships logging data to the snabble backend.
310+
* Event logger which ships logging data to the snabble backend
311311
*/
312312
lateinit var events: Events
313313
private set
@@ -323,7 +323,7 @@ class Project internal constructor(jsonObject: JsonObject) {
323323
}
324324

325325
/**
326-
* Parse a json definition of a Project.
326+
* Parse a json definition of a Project
327327
*/
328328
fun parse(jsonObject: JsonObject) {
329329
id = requireNotNull(jsonObject["id"]?.asString) { "Project has no id" }
@@ -563,7 +563,7 @@ class Project internal constructor(jsonObject: JsonObject) {
563563
}
564564

565565
/**
566-
* List of payment methods that should be available to the user.
566+
* List of payment methods that should be available to the user
567567
*/
568568
val availablePaymentMethods
569569
get() = paymentMethodDescriptors.map { it.paymentMethod }
@@ -589,22 +589,22 @@ class Project internal constructor(jsonObject: JsonObject) {
589589
}
590590

591591
/**
592-
* Get text included in the metadata.
592+
* Get text included in the metadata
593593
*/
594594
@JvmOverloads
595595
fun getText(key: String, defaultValue: String? = null) =
596596
texts[key] ?: defaultValue
597597

598598
/**
599-
* Logs a event tagged with error to the snabble Backend.
599+
* Logs a event tagged with error to the snabble Backend
600600
*/
601601
fun logErrorEvent(format: String?, vararg args: Any?) {
602602
Logger.e(format, *args)
603603
events.logError(format, *args)
604604
}
605605

606606
/**
607-
* Logs a event to the snabble Backend.
607+
* Logs a event to the snabble Backend
608608
*/
609609
fun logEvent(format: String?, vararg args: Any?) {
610610
Logger.e(format, *args)

core/src/main/java/io/snabble/sdk/Receipts.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Receipts internal constructor() {
6666
}
6767

6868
/**
69-
* Downloads a receipts pdf and stores it in the projects internal storage directory.
69+
* Downloads a receipts pdf and stores it in the projects internal storage directory
7070
*/
7171
fun download(receiptInfo: ReceiptInfo, callback: ReceiptDownloadCallback?) {
7272
if (receiptInfo.pdfUrl == null) {

core/src/main/java/io/snabble/sdk/ShoppingCart.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import io.snabble.sdk.utils.GsonHolder;
3232

3333
/**
34-
* Class representing the snabble shopping cart.
34+
* Class representing the snabble shopping cart
3535
*/
3636
public class ShoppingCart implements Iterable<ShoppingCart.Item> {
3737
public static final int MAX_QUANTITY = 99999;
@@ -128,7 +128,7 @@ void initWithProject(Project project) {
128128
}
129129

130130
/**
131-
* The id used to identify this cart session.
131+
* The id used to identify this cart session
132132
*/
133133
public String getId() {
134134
return id;

0 commit comments

Comments
 (0)