Report

Contracts

RawDataRepositoryContract

This interface allows you to get a list of generated raw data files

Namespace

Plenty\Modules\Report\Contracts

Methods

public searchRawData(string $dataName, int $createdAtTimestamp, string $processStatus, int $itemsPerPage = 20, string $sortOrder = "asc", string $after = ""):RawDataSearchResult

Get list of raw data. Valid filter combinations: (dataName), (dataName & processStatus), (createdAtTimestamp)

Parameters
string $dataName Filter that restricts the search result to raw data files.
int $createdAtTimestamp Timestamp from when daily generated raw data are to be filtered. The maximum distance may not exceed one year.
string $processStatus Process status after which filtering is to take place
int $itemsPerPage The number of raw data files to be returned. The default number of files is 20 and the maximum is 100.
string $sortOrder Defines the sort order, possible values are: asc, desc. With simultaneous filtering to dataName, only the current result is sorted.
string $after The last evaluated key as base64, provide that as the starting point for the next query (pagination).
public getRawDataFile(string $path):void

Get a raw data file from the storage, the storage path of the file must be specified.

Parameters
string $path The raw data file path
public getRawDataCreatorModels():array

Get list of all raw data creators

public getRawDataConfigs():RawDataConfigs

Returns list of all saved configurations

public updateRawDataConfigs(array $data):RawDataConfigs

Resets all saved raw data configurations with given data

Parameters
array $data The configs data

Models

RawDataConfig

The report raw data config model

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string dataName The raw data name
int active If active, raw data is generated daily
int deleteRawDataAfterDays

Methods

public toArray()

Returns this model as an array.

RawData

The report raw model

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string id The raw data id
int createdAtTimestamp Unix timestamp of creation of this raw data file
string plentyIdHash The plentymarkets system id hash
string dataName The raw data name
string dataNameProcessStatus Composite index of dataName#processStatus#
string processStatusPlentyIdHash Composite index of processStatus#plentyIdHash#
string path Storage path to raw data file

Methods

public toArray()

Returns this model as an array.

KeyFigureFilter

The key figure filter model is the base class of all key figure filter classes. Each KeyFigure class needs a filter class, which defines the allowed fields to be filtered.

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
array filters List of allowed filter names

Methods

public toArray()

Returns this model as an array.

RawDataCreator

The report raw data creator model

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string dataName Exclusive identifier for this raw data.
string fileFormat File format
int limitPage Number of data rows to be queried maximum per request.
int limitDay Number of data rows to be queried maximum per day.
string earliestPossibleDataDate Earliest possible date from which data should be requested.
int deleteRawDataAfterDaysMinimum Minimum number of days after the generated raw data is deleted
int deleteRawDataAfterDaysMaximum Maximum number of days after the generated raw data is deleted
string filterType Defines how this raw data is filtered.
string dataUpdatedAtColumnName Name of the column that contains the date of the last change to a data row.
bool defaultActive If true, then these raw data are collected independently of the user configuration.
string interval Interval in which this creator runs through
bool shouldProcessed Internal param

Methods

public toArray()

Returns this model as an array.

RawDataSearchResult

The report raw data search result model

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string after The last evaluated key as base64, provide that as the starting point for the next query (pagination).
array searchResult The raw data search result

Methods

public toArray()

Returns this model as an array.

KeyFigureResult

Represents a key figure result

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string keyFigureConfigId Id of key figure config
int scaleBasisTime Scale basis time
string keyFigure Key figure name
string plentyIdHash System id hash
string resultData
string updatedAt

Methods

public toArray()

Returns this model as an array.

KeyFigureConfig

The key figure config model represents the configuration of a key figure.

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string id Id of this configuration
string plentyIdHash The plentymarkets system id hash
string keyFigure Key figure name
string keyFigureName User defined name
KeyFigureFilter filter Filter for calculating key this key figure
int calculateAt Time of last calculation (Unixtime)
string updatedAt Time of last change
string createdAt Time of creation

Methods

public toArray()

Returns this model as an array.

RawDataConfigs

List of all saved raw data configurations

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string plentyIdHash The plentymarkets system id hash
array configs List of all saved configurations

Methods

public toArray()

Returns this model as an array.

Report

Represents the configuration of a report and its key figures.

Namespace

Plenty\Modules\Report\Models

Properties

Type Name Description
string id Id of this report
string plentyIdHash The plentymarkets system id hash
string reportName Name of this report
string updatedAt Time of last change
string createdAt Time of creation

Methods

public toArray()

Returns this model as an array.