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(int $mappingId, array $data):void

Create a sync mapping filter.

Parameters
int $mappingId The id of the mapping
array $data The request data
public getSyncMappingFilter(int $filterId):void

Get a sync mapping filter.

Parameters
int $filterId
public listSyncMappingFilters(int $mappingId, array $filters = [], array $with = []):void

List sync mapping filters.

Parameters
int $mappingId
array $filters
array $with
public updateSyncMappingFilter(int $filterId, array $data):void

Update a sync mapping filter.

Parameters
int $filterId
array $data
public deleteSyncMappingFilter(int $filterId):void

Delete a sync mapping filter.

Parameters
int $filterId
public createSyncMappingFilters(int $mappingId, array $data):void

Create sync mapping filters.

Parameters
int $mappingId The id of the mapping
array $data The request data
public updateSyncMappingFilters(int $mappingId, array $data):void

Update sync mapping filters.

Parameters
int $mappingId
array $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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $syncId, array $data):void

Create a sync mapping.

Parameters
int $syncId
array $data The request data
public getSyncMapping(int $mappingId, array $with = []):void

Get a sync mapping.

Parameters
int $mappingId
array $with
public listSyncMappings(int $syncId, int $page = 1, int $itemsPerPage = 50, int $paginate = 1, array $filters = [], array $with = []):PaginatedResult

List sync mappings.

Parameters
int $syncId
int $page
int $itemsPerPage
int $paginate
array $filters
array $with
public updateSyncMapping(int $mappingId, array $data):void

Update a sync mapping.

Parameters
int $mappingId
array $data
public deleteSyncMapping(int $mappingId):void

Delete a sync mapping.

Parameters
int $mappingId
public deleteSyncMappings(array $mappingIds):void

Delete one or more mappings.

Parameters
array $mappingIds
public copySyncMapping(array $mappingIds):array

Copy sync mapping.

Parameters
array $mappingIds
public mappingValues(string $sync_type):array

Get the mapping values.

Parameters
string $sync_type
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(string $syncType):array

Get the model key to field value key.

Parameters
string $syncType
public filterLabelList():array

Get the label list for mapping filtration.

public mappingValuesTree(array $data):array

Get the mapping values tree.

Parameters
array $data
public csvColumns(int $syncId):array

Get the csv columns of a sync.

Parameters
int $syncId
public rowCsv(int $syncId):array

Get the csv rows.

Parameters
int $syncId
public getPlentyFieldsValueMap(string $syncDataType):array

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

Parameters
string $syncDataType
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $mappingId, array $data):void

Create a sync mapping row.

Parameters
int $mappingId The id of the mapping
array $data The request data
public getSyncMappingRow(int $rowId):void

Get a sync mapping row.

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

List sync mapping rows.

Parameters
int $mappingId
array $filters
array $with
int $page
int $itemsPerPage
public updateSyncMappingRow(int $rowId, array $data):void

Update a sync mapping row.

Parameters
int $rowId
array $data
public deleteSyncMappingRow(int $rowId):void

Delete a sync mapping row.

Parameters
int $rowId
public updateSyncMappingRows(int $mappingId, array $data):void

Update sync mapping rows.

Parameters
int $mappingId
array $data
public createSyncMappingRows(int $mappingId, array $data):void

Create sync mapping rows.

Parameters
int $mappingId The id of the mapping
array $data 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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $syncId, array $data):void

Create a sync matching.

Parameters
int $syncId The id of the sync
array $data The request data
public getSyncMatching(int $matchingId):void

Get a sync matching.

Parameters
int $matchingId
public listSyncMatches(int $syncId, array $filters = [], array $with = []):void

List sync matches.

Parameters
int $syncId
array $filters
array $with
public updateSyncMatching(int $matchingId, array $data):void

Update a sync matching.

Parameters
int $matchingId
array $data
public deleteSyncMatching(int $matchingId):void

Delete a sync matching.

Parameters
int $matchingId
public getEntity(int $syncId):array

Get an entity.

Parameters
int $syncId
public matchingFields(string $syncType):array

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

Parameters
string $syncType
public createSyncMatches(int $syncId, array $data):void

Create sync matches.

Parameters
int $syncId The id of the sync
array $data The request data
public updateSyncMatches(int $syncId, array $data):void

Update sync matches.

Parameters
int $syncId
array $data
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $syncId, array $data):void

Create a sync option.

Parameters
int $syncId The sync id
array $data The request data
public getSyncOption(int $optionId):void

Get a sync option.

Parameters
int $optionId
public listSyncOptions(int $syncId, array $filters = [], array $with = []):void

List sync options.

Parameters
int $syncId The sync id
array $filters
array $with
public updateSyncOption(int $optionId, array $data):void

Update a sync option.

Parameters
int $optionId
array $data
public deleteSyncOption(int $optionId):void

Delete a sync option.

Parameters
int $optionId
public createSyncOptions(int $syncId, array $data):void

Create sync options.

Parameters
int $syncId The sync id
array $data The request data
public updateSyncOptions(int $syncId, array $data):void

Update sync options.

Parameters
int $syncId
array $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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(array $data):void

Create a sync.

Parameters
array $data The request data
public getSync(int $syncId, array $with = []):array

Get a sync.

Parameters
int $syncId
array $with
public listSyncs(int $page = 1, int $itemsPerPage = 50, int $paginate = 1, array $filters = [], array $with = []):PaginatedResult

Get all syncs

Parameters
int $page
int $itemsPerPage
int $paginate
array $filters
array $with
public updateSync(int $syncId, array $data):void

Update a sync.

Parameters
int $syncId
array $data
public deleteSync(int $syncId):void

Delete a sync.

Parameters
int $syncId
public deleteSyncs(array $syncIds):void

Delete syncs.

Parameters
array $syncIds
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(array $syncIds):array

Export the syncs.

Parameters
array $syncIds
public copy(array $syncIds):array

Copy the syncs.

Parameters
array $syncIds
public resetCache():array

Reset the cache.

public sourcePreview(int $syncId):array

Preview the syncs.

Parameters
int $syncId
public scheduleTimes():string

Get schedule times.

public getReportLogs(int $page = 1, int $itemsPerPage = 50, int $paginate = 1, array $filters = [], array $with = []):PaginatedResult

Check Report Log.

Parameters
int $page
int $itemsPerPage
int $paginate
array $filters
array $with
public saveCsvToS3(array $data):void

Save the CSV on S3.

Parameters
array $data
public importSyncDifferent(array $data):void

Import the sync with different plentyId.

Parameters
array $data
public getPreviewValues(int $syncId):array

Get preview of csv values.

Parameters
int $syncId
public run(int $syncId, array $data):void

Execute the run procedure.

Parameters
int $syncId
array $data
public newRun(int $syncId, array $data):array

Execute the new run procedure.

Parameters
int $syncId
array $data
public report($id):array

Get Log by ID

Parameters
$id
public reportAvailable(int $page = 1, int $itemsPerPage = 50, int $paginate = 1, array $filters = [], array $with = []):array

Check Report Log.

Parameters
int $page
int $itemsPerPage
int $paginate
array $filters
array $with
public exportSync(int $syncId):array

Export the sync.

Parameters
int $syncId
public syncStatus():array

Get syncs status.

public updateCsvSync(array $data):void

Update the Csv of a Sync.

Parameters
array $data
public importSyncJson(array $data):void

Save the CSV on S3.

Parameters
array $data
public importSyncJsonDifferent(array $data):void

Import the sync with different plentyId.

Parameters
array $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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(string $modelClassName):array
Parameters
string $modelClassName

Report

ElasticSyncReportOptionRepositoryContract

This interface provides methods to CRUD report options

Namespace

Plenty\Modules\ElasticSync\Contracts\Report

Methods

public create(array $data):RunReportOption

Creates a run report option

Parameters
array $data
public get(int $id):RunReportOption

Gets a run report option

Parameters
int $id
public update(int $id, array $data):RunReportOption

Updates a run report option

Parameters
int $id
array $data
public delete(int $id):void

Deletes a run report option

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

Sets a run report option

Parameters
$report
string $name
string $value
string $type
public getOptionByName($report, string $name):void

Gets the option of a report by name

Parameters
$report
string $name
public getValueByName($report, string $name):void

Gets the value of a report option

Parameters
$report
string $name
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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(int $id):RunReport

Gets a run report

Parameters
int $id
public getRunReportLog(int $id):void

Gets a run report log

Parameters
int $id
public cancelRun(int $id):void

Cancels a run

Parameters
int $id
public listRunReports(int $page = 1, int $itemsPerPage = 50, array $filters = []):PaginatedResult

Lists run reports

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

Lists job reports for a specific run

Parameters
int $reportId
int $page
int $itemsPerPage
array $filters
public listJobs(int $reportId):array
Parameters
int $reportId
public listOutcomes(int $reportId, string $job):array
Parameters
int $reportId
string $job
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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

Type Name Description
int id The ID of the elastic sync mapping
int syncId The ID of the elastic sync sync
string name The name of the elastic sync mapping
int position The position of the elastic sync mapping
bool active 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

Type Name Description
int id The ID of the elastic sync mapping filter
int mappingId The ID of the elastic sync mapping
string type The type of the elastic sync mapping filter
string operator The operator of the elastic sync mapping filter
string source The source of the elastic sync mapping filter
string value 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

Type Name Description
int id The ID of the elastic sync mapping row
int mappingId The ID of the elastic sync mapping
string targetModel The target model of the elastic sync mapping row
string targetAttribute The target attribute of the elastic sync mapping row
bool active The state of the elastic sync mapping row
string entityType The entity type of the elastic sync mapping row (array values: 'ownValue', 'ownAssignment', 'regularExpression', 'csvColumn')
string value The value of the elastic sync mapping row
string settings The settings of the elastic sync mapping row
string identifiers 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

Type Name Description
int id The ID of the elastic sync matching
int syncId The ID of the elastic sync sync
string target The target of the elastic sync matching
string source The source of the elastic sync matching
string additionalValue 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

Type Name Description
int id The ID of the elastic sync option
int syncId The ID of the elastic sync sync
string optionIdentifier The option identifier of the elastic sync option
string key The key of the elastic sync option
string value 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

Type Name Description
int id The ID of the elastic sync sync
string name The name of the elastic sync sync
string syncType The type of the elastic sync sync
string sourceType The source type of the elastic sync sync
string sourceDataType 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
Collection matching The matching relation
Collection options The options relation
Collection mappings The mapping relation
Collection reports 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

Type Name Description
int id The ID of the run report
int sync_id The ID of the sync
int jobs_total The total number of jobs
int jobs_completed The number of completed jobs
int errors The number of errors
string children_identifier The identifier used by children job reports
string report_filename The name of the S3 report counterpart
int rows The number of rows in the file
int rows_successful The number of successful rows in the file
string date 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

Type Name Description
int id The ID of the run report option
int run_report_id The ID of the run report
string name The name
string value The value
string type The type

Methods

public toArray()

Returns this model as an array.

Sync

Mapping

The mapping model.

Namespace

Plenty\Modules\ElasticSync\Models\Sync

Properties

Type Name Description
int id The ID of the mapping
string data 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

Type Name Description
int id The ID of the sync
string data 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

Type Name Description
int id The ID of the synclog
int syncId The syncId of the synclog
string syncHash The syncHash of the synclog
string jobHash The jobHash of the synclog
string hashDate 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.