Plentymarkets interface documentation

Contracts

Core

ElasticSyncMappingFilterRepositoryContract

This interface allows you to get, list, create, update and delete elastic sync mapping filters.

Namespace

Plenty\Modules\ElasticSync\Contracts\Core

Methods
public createSyncMappingFilter($mappingId, $data):void

Create a sync mapping filter.

Parameters

Name

Type

Description

$mappingId

int

The id of the mapping

$data

array

The request data

public getSyncMappingFilter($filterId):void

Get a sync mapping filter.

Parameters

Name

Type

Description

$filterId

int

public listSyncMappingFilters($mappingId, $filters = [], $with = []):void

List sync mapping filters.

Parameters

Name

Type

Description

$mappingId

int

$filters

array

$with

array

public updateSyncMappingFilter($filterId, $data):void

Update a sync mapping filter.

Parameters

Name

Type

Description

$filterId

int

$data

array

public deleteSyncMappingFilter($filterId):void

Delete a sync mapping filter.

Parameters

Name

Type

Description

$filterId

int

public createSyncMappingFilters($mappingId, $data):void

Create sync mapping filters.

Parameters

Name

Type

Description

$mappingId

int

The id of the mapping

$data

array

The request data

public updateSyncMappingFilters($mappingId, $data):void

Update sync mapping filters.

Parameters

Name

Type

Description

$mappingId

int

$data

array

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

ElasticSyncMappingRepositoryContract

This interface allows you to get, list, create, update and delete elastic sync mappings.

Namespace

Plenty\Modules\ElasticSync\Contracts\Core

Methods
public createSyncMapping($syncId, $data):void

Create a sync mapping.

Parameters

Name

Type

Description

$syncId

int

$data

array

The request data

public getSyncMapping($mappingId, $with = []):void

Get a sync mapping.

Parameters

Name

Type

Description

$mappingId

int

$with

array

public listSyncMappings($syncId, $page = 1, $itemsPerPage = 50, $paginate = 1, $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List sync mappings.

Parameters

Name

Type

Description

$syncId

int

$page

int

$itemsPerPage

int

$paginate

int

$filters

array

$with

array

public updateSyncMapping($mappingId, $data):void

Update a sync mapping.

Parameters

Name

Type

Description

$mappingId

int

$data

array

public deleteSyncMapping($mappingId):void

Delete a sync mapping.

Parameters

Name

Type

Description

$mappingId

int

public deleteSyncMappings($mappingIds):void

Delete one or more mappings.

Parameters

Name

Type

Description

$mappingIds

array

public copySyncMapping($mappingIds):array

Copy sync mapping.

Parameters

Name

Type

Description

$mappingIds

array

public mappingValues($sync_type):array

Get the mapping values.

Parameters

Name

Type

Description

$sync_type

string

public fieldValuesMap():array
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Get the field value map for all sync types.

public listVariationMatched():array

Get a list with variation matches.

public modelKeyToFieldValueKey($syncType):array

Get the model key to field value key.

Parameters

Name

Type

Description

$syncType

string

public filterLabelList():array

Get the label list for mapping filtration.

public mappingValuesTree($data):array

Get the mapping values tree.

Parameters

Name

Type

Description

$data

array

public csvColumns($syncId):array

Get the csv columns of a sync.

Parameters

Name

Type

Description

$syncId

int

public rowCsv($syncId):array

Get the csv rows.

Parameters

Name

Type

Description

$syncId

int

public getPlentyFieldsValueMap($syncDataType):array

Get the plenty fields value map for a particular sync type.

Parameters

Name

Type

Description

$syncDataType

string

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

ElasticSyncMappingRowRepositoryContract

This interface allows you to get, list, create, update and delete elastic sync mapping rows.

Namespace

Plenty\Modules\ElasticSync\Contracts\Core

Methods
public createSyncMappingRow($mappingId, $data):void

Create a sync mapping row.

Parameters

Name

Type

Description

$mappingId

int

The id of the mapping

$data

array

The request data

public getSyncMappingRow($rowId):void

Get a sync mapping row.

Parameters

Name

Type

Description

$rowId

int

public listSyncMappingRows($mappingId, $filters = [], $with = [], $page = 1, $itemsPerPage = 25):void

List sync mapping rows.

Parameters

Name

Type

Description

$mappingId

int

$filters

array

$with

array

$page

int

$itemsPerPage

int

public updateSyncMappingRow($rowId, $data):void

Update a sync mapping row.

Parameters

Name

Type

Description

$rowId

int

$data

array

public deleteSyncMappingRow($rowId):void

Delete a sync mapping row.

Parameters

Name

Type

Description

$rowId

int

public updateSyncMappingRows($mappingId, $data):void

Update sync mapping rows.

Parameters

Name

Type

Description

$mappingId

int

$data

array

public createSyncMappingRows($mappingId, $data):void

Create sync mapping rows.

Parameters

Name

Type

Description

$mappingId

int

The id of the mapping

$data

array

The request data

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

ElasticSyncMatchingRepositoryContract

This interface allows you to get, list, create, update and delete elastic sync matches.

Namespace

Plenty\Modules\ElasticSync\Contracts\Core

Methods
public createSyncMatching($syncId, $data):void

Create a sync matching.

Parameters

Name

Type

Description

$syncId

int

The id of the sync

$data

array

The request data

public getSyncMatching($matchingId):void

Get a sync matching.

Parameters

Name

Type

Description

$matchingId

int

public listSyncMatches($syncId, $filters = [], $with = []):void

List sync matches.

Parameters

Name

Type

Description

$syncId

int

$filters

array

$with

array

public updateSyncMatching($matchingId, $data):void

Update a sync matching.

Parameters

Name

Type

Description

$matchingId

int

$data

array

public deleteSyncMatching($matchingId):void

Delete a sync matching.

Parameters

Name

Type

Description

$matchingId

int

public getEntity($syncId):array

Get an entity.

Parameters

Name

Type

Description

$syncId

int

public matchingFields($syncType):array

Get a list of all mappings for a particular sync type.

Parameters

Name

Type

Description

$syncType

string

public createSyncMatches($syncId, $data):void

Create sync matches.

Parameters

Name

Type

Description

$syncId

int

The id of the sync

$data

array

The request data

public updateSyncMatches($syncId, $data):void

Update sync matches.

Parameters

Name

Type

Description

$syncId

int

$data

array

public listDecimals():array

Get list of decimals.

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

ElasticSyncOptionRepositoryContract

This interface allows you to get, list, create, update and delete elastic sync options.

Namespace

Plenty\Modules\ElasticSync\Contracts\Core

Methods
public createSyncOption($syncId, $data):void

Create a sync option.

Parameters

Name

Type

Description

$syncId

int

The sync id

$data

array

The request data

public getSyncOption($optionId):void

Get a sync option.

Parameters

Name

Type

Description

$optionId

int

public listSyncOptions($syncId, $filters = [], $with = []):void

List sync options.

Parameters

Name

Type

Description

$syncId

int

The sync id

$filters

array

$with

array

public updateSyncOption($optionId, $data):void

Update a sync option.

Parameters

Name

Type

Description

$optionId

int

$data

array

public deleteSyncOption($optionId):void

Delete a sync option.

Parameters

Name

Type

Description

$optionId

int

public createSyncOptions($syncId, $data):void

Create sync options.

Parameters

Name

Type

Description

$syncId

int

The sync id

$data

array

The request data

public updateSyncOptions($syncId, $data):void

Update sync options.

Parameters

Name

Type

Description

$syncId

int

$data

array

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

ElasticSyncSyncRepositoryContract

This interface allows you to get, list, create, update and delete elastic sync syncs.

Namespace

Plenty\Modules\ElasticSync\Contracts\Core

Methods
public createSync($data):void

Create a sync.

Parameters

Name

Type

Description

$data

array

The request data

public getSync($syncId, $with = []):array

Get a sync.

Parameters

Name

Type

Description

$syncId

int

$with

array

public listSyncs($page = 1, $itemsPerPage = 50, $paginate = 1, $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get all syncs

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$paginate

int

$filters

array

$with

array

public updateSync($syncId, $data):void

Update a sync.

Parameters

Name

Type

Description

$syncId

int

$data

array

public deleteSync($syncId):void

Delete a sync.

Parameters

Name

Type

Description

$syncId

int

public deleteSyncs($syncIds):void

Delete syncs.

Parameters

Name

Type

Description

$syncIds

array

public getListTypes():array

Get list of sync types.

public getListIntervals():array

Get list of sync intervals.

public getListDecimals():array

Get list of sync decimals.

public export($syncIds):array

Export the syncs.

Parameters

Name

Type

Description

$syncIds

array

public copy($syncIds):array

Copy the syncs.

Parameters

Name

Type

Description

$syncIds

array

public resetCache():array

Reset the cache.

public sourcePreview($syncId):array

Preview the syncs.

Parameters

Name

Type

Description

$syncId

int

public scheduleTimes():string

Get schedule times.

public getReportLogs($page = 1, $itemsPerPage = 50, $paginate = 1, $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Return type: PaginatedResult

Check Report Log.

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$paginate

int

$filters

array

$with

array

public saveCsvToS3($data):void

Save the CSV on S3.

Parameters

Name

Type

Description

$data

array

public importSyncDifferent($data):void

Import the sync with different plentyId.

Parameters

Name

Type

Description

$data

array

public getPreviewValues($syncId):array

Get preview of csv values.

Parameters

Name

Type

Description

$syncId

int

public run($syncId, $data):void

Execute the run procedure.

Parameters

Name

Type

Description

$syncId

int

$data

array

public newRun($syncId, $data):array

Execute the new run procedure.

Parameters

Name

Type

Description

$syncId

int

$data

array

public report($id):array
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Get Log by ID

Parameters

Name

Type

Description

$id

public reportAvailable($page = 1, $itemsPerPage = 50, $paginate = 1, $filters = [], $with = []):array
Deprecated!

This method will not be supported in the future. Please refrain from using it as soon as possible.

Check Report Log.

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$paginate

int

$filters

array

$with

array

public exportSync($syncId):array

Export the sync.

Parameters

Name

Type

Description

$syncId

int

public syncStatus():array

Get syncs status.

public updateCsvSync($data):void

Update the Csv of a Sync.

Parameters

Name

Type

Description

$data

array

public importSyncJson($data):void

Save the CSV on S3.

Parameters

Name

Type

Description

$data

array

public importSyncJsonDifferent($data):void

Import the sync with different plentyId.

Parameters

Name

Type

Description

$data

array

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

Mapper

PropertyDescriptor

describes properties of a Model

Namespace

Plenty\Modules\ElasticSync\Contracts\Mapper

Methods
public getPropertyInformation($modelClassName):array
Parameters

Name

Type

Description

$modelClassName

string

Report

ElasticSyncReportOptionRepositoryContract

This interface provides methods to CRUD report options

Namespace

Plenty\Modules\ElasticSync\Contracts\Report

Methods
public create($data):Plenty\Modules\ElasticSync\Models\Report\RunReportOption
Return type: RunReportOption

Creates a run report option

Parameters

Name

Type

Description

$data

array

public get($id):Plenty\Modules\ElasticSync\Models\Report\RunReportOption
Return type: RunReportOption

Gets a run report option

Parameters

Name

Type

Description

$id

int

public update($id, $data):Plenty\Modules\ElasticSync\Models\Report\RunReportOption
Return type: RunReportOption

Updates a run report option

Parameters

Name

Type

Description

$id

int

$data

array

public delete($id):void

Deletes a run report option

Parameters

Name

Type

Description

$id

int

public set($report, $name, $value = null, $type = "string"):void

Sets a run report option

Parameters

Name

Type

Description

$report

$name

string

$value

string

$type

string

public getOptionByName($report, $name):void

Gets the option of a report by name

Parameters

Name

Type

Description

$report

$name

string

public getValueByName($report, $name):void

Gets the value of a report option

Parameters

Name

Type

Description

$report

$name

string

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

ElasticSyncReportRepositoryContract

This interface provides methods to list reports

Namespace

Plenty\Modules\ElasticSync\Contracts\Report

Methods
public getRunReport($id):Plenty\Modules\ElasticSync\Models\Report\RunReport
Return type: RunReport

Gets a run report

Parameters

Name

Type

Description

$id

int

public getRunReportLog($id):void

Gets a run report log

Parameters

Name

Type

Description

$id

int

public cancelRun($id):void

Cancels a run

Parameters

Name

Type

Description

$id

int

public listRunReports($page = 1, $itemsPerPage = 50, $filters = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Lists run reports

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$filters

array

public listJobReports($reportId, $page = 1, $itemsPerPage = 50, $filters = []):array

Lists job reports for a specific run

Parameters

Name

Type

Description

$reportId

int

$page

int

$itemsPerPage

int

$filters

array

public listJobs($reportId):array
Parameters

Name

Type

Description

$reportId

int

public listOutcomes($reportId, $job):array
Parameters

Name

Type

Description

$reportId

int

$job

string

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

Models

Core

ElasticSyncMapping

The elastic sync mapping model.

Namespace

Plenty\Modules\ElasticSync\Models\Core

Properties
Name Type Description

id

int

The ID of the elastic sync mapping

syncId

int

The ID of the elastic sync sync

name

string

The name of the elastic sync mapping

position

int

The position of the elastic sync mapping

active

bool

The state of the elastic sync mapping

Methods
public toArray()

Returns this model as an array.

ElasticSyncMappingFilter

The elastic sync mapping filter model.

Namespace

Plenty\Modules\ElasticSync\Models\Core

Properties
Name Type Description

id

int

The ID of the elastic sync mapping filter

mappingId

int

The ID of the elastic sync mapping

type

string

The type of the elastic sync mapping filter

operator

string

The operator of the elastic sync mapping filter

source

string

The source of the elastic sync mapping filter

value

string

The value of the elastic sync mapping filter

Methods
public toArray()

Returns this model as an array.

ElasticSyncMappingRow

The elastic sync mapping row model.

Namespace

Plenty\Modules\ElasticSync\Models\Core

Properties
Name Type Description

id

int

The ID of the elastic sync mapping row

mappingId

int

The ID of the elastic sync mapping

targetModel

string

The target model of the elastic sync mapping row

targetAttribute

string

The target attribute of the elastic sync mapping row

active

bool

The state of the elastic sync mapping row

entityType

string

The entity type of the elastic sync mapping row (array values: 'ownValue', 'ownAssignment', 'regularExpression', 'csvColumn')

value

string

The value of the elastic sync mapping row

settings

string

The settings of the elastic sync mapping row

identifiers

string

The identifiers of the elastic sync mapping row

Methods
public toArray()

Returns this model as an array.

ElasticSyncMatching

The elastic sync matching model.

Namespace

Plenty\Modules\ElasticSync\Models\Core

Properties
Name Type Description

id

int

The ID of the elastic sync matching

syncId

int

The ID of the elastic sync sync

target

string

The target of the elastic sync matching

source

string

The source of the elastic sync matching

additionalValue

string

The additional value of the elastic sync matching

Methods
public toArray()

Returns this model as an array.

ElasticSyncOption

The elastic sync option model.

Namespace

Plenty\Modules\ElasticSync\Models\Core

Properties
Name Type Description

id

int

The ID of the elastic sync option

syncId

int

The ID of the elastic sync sync

optionIdentifier

string

The option identifier of the elastic sync option

key

string

The key of the elastic sync option

value

string

The value of the elastic sync option

createdAt

The date when the elastic sync option was created

updatedAt

The date when the elastic sync option was last updated

Methods
public toArray()

Returns this model as an array.

ElasticSyncSync

The elastic sync sync model.

Namespace

Plenty\Modules\ElasticSync\Models\Core

Properties
Name Type Description

id

int

The ID of the elastic sync sync

name

string

The name of the elastic sync sync

syncType

string

The type of the elastic sync sync

sourceType

string

The source type of the elastic sync sync

sourceDataType

string

The source data type of the elastic sync sync

lastRun

The date when elastic sync sync was last run

createdAt

The date when the elastic sync sync was created

updatedAt

The date when the elastic sync sync was last updated

matching

Collection

The matching relation

options

Collection

The options relation

mappings

Collection

The mapping relation

reports

Collection

The reports relation

Methods
public toArray()

Returns this model as an array.

DataProvider

PropertyInformation

property information

Namespace

Plenty\Modules\ElasticSync\Models\DataProvider

Methods
public getType():string
public getName():string
public getDescription():string

Report

RunReport

The run report model.

Namespace

Plenty\Modules\ElasticSync\Models\Report

Properties
Name Type Description

id

int

The ID of the run report

sync_id

int

The ID of the sync

jobs_total

int

The total number of jobs

jobs_completed

int

The number of completed jobs

errors

int

The number of errors

sync_type

string

The type of the sync

children_identifier

string

The identifier used by children job reports

report_filename

string

The name of the S3 report counterpart

rows

int

The number of rows in the file

rows_successful

int

The number of successful rows in the file

date

string

The date when this report was created

Methods
public toArray()

Returns this model as an array.

RunReportOption

The run report option model.

Namespace

Plenty\Modules\ElasticSync\Models\Report

Properties
Name Type Description

id

int

The ID of the run report option

run_report_id

int

The ID of the run report

name

string

The name

value

string

The value

type

string

The type

Methods
public toArray()

Returns this model as an array.

Sync

Mapping

The mapping model.

Namespace

Plenty\Modules\ElasticSync\Models\Sync

Properties
Name Type Description

id

int

The ID of the mapping

data

string

The data of the mapping

createdAt

The date when the mapping was created

updatedAt

The date when the mapping was last updated

mapping

Mapping

The mapping from ElasticSync.

Methods
public toArray()

Returns this model as an array.

Sync

The sync model.

Namespace

Plenty\Modules\ElasticSync\Models\Sync

Properties
Name Type Description

id

int

The ID of the sync

data

string

The data of the sync

createdAt

The date when the sync was created

updatedAt

The date when the sync was last updated

sync

Sync

The sync from ElasticSync.

Methods
public toArray()

Returns this model as an array.

SyncLog

The synclog model.

Namespace

Plenty\Modules\ElasticSync\Models\Sync

Properties
Name Type Description

id

int

The ID of the synclog

syncId

int

The syncId of the synclog

syncHash

string

The syncHash of the synclog

jobHash

string

The jobHash of the synclog

hashDate

string

The hashDate of the synclog

createdAt

The date when the synclog was created

updatedAt

The date when the synclog was last updated

syncLog

SyncLog

The sync log from ElasticSync.

Methods
public toArray()

Returns this model as an array.