apidocs / com.srv4pos.server.api.product / ProductService

ProductService

class ProductService

For reaching Product entity.

User: Kirill, Date: 05.08.13 18:00.

Constructors

<init>

ProductService(url: URL, credentials: Credentials?, transport: Transport)

For reaching Product entity.

Functions

create

fun create(version: Int, productInfo: ProductInfo): IdentifierInfo

Create product on the server.

delete

fun delete(version: Int, identifier: String): Unit

Delete entity from the server.

deletePicture

fun deletePicture(version: Int, productIdentifier: String, pictureFilename: String): Unit

Deletes specified picture.

get

operator fun get(version: Int?, identifier: String): ProductInfo?

Returns an entity.

getPicture

fun getPicture(version: Int?, productIdentifier: String, pictureFilename: String): InputStream?

Returns body of the picture.

getPictureFromHistory

fun getPictureFromHistory(pictureVersion: Int?, productIdentifier: String, pictureFilename: String): InputStream?

Returns body of the picture for particular version number.

getPicturePath

fun getPicturePath(version: Int?, productIdentifier: String): List<String>

Returns list of picture relative paths .

list

fun list(version: Int?, firstResult: Int? = null, maxResults: Int? = null, like: String? = null, orderBy: ProductInfo.Fields? = null, orderDesc: Boolean? = null): List<ProductInfo>?

Returns list of entities.

listAdvanced

fun listAdvanced(version: Int?, firstResult: Int?, maxResults: Int?, like: String?, orderBy: ProductInfo.Fields?, orderDesc: Boolean?): List<ProductAdvancedInfo>?

Returns list of advanced entities.

listDiff

fun listDiff(versionFrom: Int, versionTo: Int): List<ProductInfo>

Returns list of item changes between two versions.

listDiffPicture

fun listDiffPicture(versionFrom: Int, versionTo: Int): List<ProductPictureInfo>

Returns list of product pictures changes between two versions.

put

fun put(version: Int, productInfo: ProductInfo): Unit

Put product to the server.

putPicture

fun putPicture(version: Int, productIdentifier: String, pictureFilename: String, picture: InputStream, contentType: String): Unit

Send picture to the server.

stats

fun stats(period: String?, cashRegisterName: String?): ProductsStatsInfo?

Returns stats by products.