Plentymarkets interface documentation

PriceCalculation

Contracts

PriceCalculationErrorRepositoryContract

The repository contract for the price calculation errors

Namespace

Plenty\Modules\PriceCalculation\Contracts

Methods
public get($id, $page, $itemsPerPage, $variationIds = null):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Parameters

Name

Type

Description

$id

string

$page

int

$itemsPerPage

int

$variationIds

string

public getAll($columns = [], $page = 1, $itemsPerPage = 50, $variationIds = null):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Parameters

Name

Type

Description

$columns

array

$page

int

$itemsPerPage

int

$variationIds

string

public create($variationId, $formulaId, $uuid, $reason):void
Parameters

Name

Type

Description

$variationId

int

$formulaId

int

$uuid

string

$reason

string

public delete($ids):void
Parameters

Name

Type

Description

$ids

array

PriceCalculationRepositoryContract

The repository contract for the new price calculations

Namespace

Plenty\Modules\PriceCalculation\Contracts

Methods
public createOrUpdate($id, $body):array

Creates or updates a price calculation

Parameters

Name

Type

Description

$id

string

$body

string

public get($id, $with = []):array

Gets a price calculation by the specified UUID

Parameters

Name

Type

Description

$id

string

$with

array

public getList():void

Gets a list of price calculations

public delete($id):Plenty\Repositories\Models\DeleteResponse
Return type: DeleteResponse

Deletes a price calculation with the specified UUID

Parameters

Name

Type

Description

$id

string

public uses($id, $type, $key):bool

Check if type & key are used in the price calculation.

Parameters

Name

Type

Description

$id

string

$type

string

$key

string

public usesAny($id, $type, $keys):bool

Check if type & any (at least one) of the keys are used in the price calculation.

Parameters

Name

Type

Description

$id

string

$type

string

$keys

array

public getVariationsByPriceCalculationId($priceCalculationId):array

Gets variations which use the specified price calculation. The price calculation UUID is required.

Parameters

Name

Type

Description

$priceCalculationId

string

Models

PriceCalculation

The price calculation model

Namespace

Plenty\Modules\PriceCalculation\Models

Properties
Name Type Description

id

string

The id of a price calculation

name

string

The name of the a price calculation

dataHash

string

The md5 hash created by the content of data

placeholder

array

The used placeholder of every formula collected and unique

createdAt

string

ISO8601 timestamp represents creation date

updatedAt

string

ISO8601 timestamp represents last update date

ranAt

string

ISO8601 timestamp represents last full run

data

array

contains core information for formulas

Methods
public toArray()

Returns this model as an array.