Package-level declarations

Types

Link copied to clipboard
open class AccessibleLiveData<T> : LiveData<T>

LiveData with the current (possible not yet published) value. You can observe changes like with regular LiveData. You can write from any thread the value it will be posted on the main thread and published there when called from a background thread.

Link copied to clipboard
open class Assets
Class for accessing image assets from the snabble backend.
Link copied to clipboard

Enum describing a barcode format

Link copied to clipboard
data class Brand(val id: String, val name: String) : Comparable<Brand>
Link copied to clipboard
object ColorUtils
Link copied to clipboard
data class Company(val city: String?, val country: String?, val name: String?, val street: String?, val zip: String?)

Class describing a company

Link copied to clipboard
data class Config(var endpointBaseUrl: String = Environment.PRODUCTION.baseUrl, var appId: String? = null, var secret: String? = null, var bundledMetadataAssetPath: String? = null, var bundledMetadataRawResId: Int = 0, var generateSearchIndex: Boolean = false, var maxProductDatabaseAge: Long = TimeUnit.HOURS.toMillis(1), var maxShoppingCartAge: Long = TimeUnit.HOURS.toMillis(4), var disableCertificatePinning: Boolean = false, var initialSQL: List<String> = emptyList(), var vibrateToConfirmCartFilled: Boolean = false, var loadActiveShops: Boolean = false, var checkInRadius: Float = 500.0f, var checkOutRadius: Float = 1000.0f, var lastSeenThreshold: Long = TimeUnit.MINUTES.toMillis(15), var networkInterceptor: Interceptor? = null, var manualProductDatabaseUpdates: Boolean = false)

Configuration of the snabble SDK.

Link copied to clipboard
data class CustomerCardInfo(val cardId: String, val isRequired: Boolean)

Class describing customer cards

Link copied to clipboard

Enum describing a group of units

Link copied to clipboard

Enum describing the environment the app is using

Link copied to clipboard

Enum class describing the state of a fulfillment

Link copied to clipboard

Enum class describing the current initialization state of the SDK

Link copied to clipboard
object InterceptorSerializer : JsonSerializer<Interceptor?> , JsonDeserializer<Interceptor?>
Link copied to clipboard
data class Link(val href: String)

Data class for a link

Link copied to clipboard

Mutable LiveData with the current (possible not yet published) value. You can observe changes like with regular MutableLiveData, just not inherited. You can write from any thread the value it will be posted on the main thread and published there when called from a background thread.

Link copied to clipboard

Interface for product api calls

Link copied to clipboard

Enum class describing payment methods

Link copied to clipboard
data class PaymentMethodDescriptor(val id: String, val links: Map<String, Link>?, val providerName: String, val acceptedOriginTypes: List<String>?)

A class describing a payment method

Link copied to clipboard
class PriceFormatter(project: Project)

A price formatter for formatting prices using the provided currency information

Link copied to clipboard
Class that holds all of the product information.
Link copied to clipboard
open class ProductDatabase
Class for interfacing with the local product database
Link copied to clipboard
class Project

A project contains configuration information and backend api urls needed for a retailer.

Link copied to clipboard
data class ReceiptInfo(val id: String, val projectId: String, val timestamp: Long, val pdfUrl: String?, val shopName: String, val price: String)

Class containing information about a order

Link copied to clipboard
class Receipts

Class to download user receipts in pdf format to internal storage.

Link copied to clipboard
open class ReceiptsApi
Class for interfacing with the snabble Receipts API
Link copied to clipboard
Class representing a shop
Link copied to clipboard
open class ShoppingCart : Iterable<T>
Class representing the snabble shopping cart
Link copied to clipboard
data class ShoppingCartData @JvmOverloads constructor(var id: String = UUID.randomUUID().toString(), var uuid: String? = UUID.randomUUID().toString(), var lastModificationTime: Long = 0, var items: MutableList<ShoppingCart.Item> = mutableListOf(), var violationNotifications: MutableList<ViolationNotification> = mutableListOf(), var modCount: Int = 0, var addCount: Int = 0, var onlineTotalPrice: Int? = null, var invalidProducts: List<Product>? = null, var taxation: ShoppingCart.Taxation = ShoppingCart.Taxation.UNDECIDED, var hasRaisedMaxCheckoutLimit: Boolean = false, var hasRaisedMaxOnlinePaymentLimit: Boolean = false, var invalidDepositReturnVoucher: Boolean = false, var backupTimestamp: Long = 0)
Link copied to clipboard
object Snabble

The heart of the snabble SDK. Initialization and object access is provided via this facade.

Link copied to clipboard
Tagging subclass to avoid clashes with misbehaving libraries
Link copied to clipboard

Initializer for the snabble SDK using androidx.startup

Link copied to clipboard
data class TermsOfService(val updatedAt: String, val version: String, val variants: List<TermsOfService.Variant> = emptyList())

Class for describing our terms of service.

Link copied to clipboard
enum Unit
Enum describing different units and thier conversions to each other
Link copied to clipboard

Class managing local user preferences

Link copied to clipboard
class Users

Class managing per-user settings of the backend

Link copied to clipboard
data class ViolationNotification(val name: String?, val refersTo: String?, val type: String? = null, val fallbackMessage: String? = null)

A notification that a violation occurred

Functions

Link copied to clipboard
@JvmName(name = "bindArgs")
fun String.bindSqlArgs(args: Array<String>?): String

Binds the strings in args to ocurrences of '?' in a sql string

Link copied to clipboard
Link copied to clipboard
fun Properties.getFloat(key: String, default: Float): Float
Link copied to clipboard
fun Properties.getLong(key: String, default: Long): Long