Plentymarkets interface documentation

Address

Contracts

AddressContactRelationRepositoryContract

The AddressContactRelationRepositoryContract is the interface for the address contact relation repository.

Namespace

Plenty\Modules\Account\Address\Contracts

Methods
public createAddressContactRelation($data):array

Creates address contact relations.

Parameters

Name

Type

Description

$data

array

The address data as associative array

public updateAddressContactRelation($data):array

Updates address contact relations.

Parameters

Name

Type

Description

$data

array

The data as associative array

public findAddressContactRelation($addressContactRelationId):Plenty\Modules\Account\Address\Models\AddressContactRelation
Return type: AddressContactRelation

Gets address contact relation by ID.

Parameters

Name

Type

Description

$addressContactRelationId

int

The ID of the address contact relation

public deleteAddressContactRelation($addressContactRelationId):bool

Deletes an address contact relation.

Parameters

Name

Type

Description

$addressContactRelationId

int

The ID of the address contact relation

public listAddressContactRelations($filter = [], $with = [], $columns = [], $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Lists address contact relations.

Parameters

Name

Type

Description

$filter

array

Filter that restricts the search result

$with

array

An array with child instances to be loaded

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

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.

AddressParamConfigurationRepositoryContract

The AddressParamConfigurationRepositoryContract is the interface for the address param configuration repository. This interface allows to create, update, delete, list and get address relation types and address option types.

Namespace

Plenty\Modules\Account\Address\Contracts

Methods
public createAddressRelationType($data):Plenty\Modules\Account\Address\Models\AddressRelationType
Return type: AddressRelationType

Creates a new address relation type.

Parameters

Name

Type

Description

$data

array

public updateAddressRelationType($data, $addressRelationTypeId):Plenty\Modules\Account\Address\Models\AddressRelationType
Return type: AddressRelationType

Updates an existing address relation type.

Parameters

Name

Type

Description

$data

array

The address relation data as associative array

$addressRelationTypeId

int

public deleteAddressRelationType($addressRelationTypeId):bool

Deletes an address relation type by the given ID.

Parameters

Name

Type

Description

$addressRelationTypeId

int

The ID of the address relation type

public findAddressRelationTypeById($addressRelationTypeId):Plenty\Modules\Account\Address\Models\AddressRelationType
Return type: AddressRelationType

Gets an existing address relation type by the given ID.

Parameters

Name

Type

Description

$addressRelationTypeId

int

The ID of the address relation type

public allAddressRelationTypes($columns = [], $perPage = 50):void

Gets a list of address relation types.

Parameters

Name

Type

Description

$columns

array

The columns to retrieve

$perPage

int

The number of items to list per page

public createAddressOptionType($data):Plenty\Modules\Account\Address\Models\AddressOptionType
Return type: AddressOptionType

Creates an address option type.

Parameters

Name

Type

Description

$data

array

public updateAddressOptionType($data, $addressOptionTypeId):Plenty\Modules\Account\Address\Models\AddressOptionType
Return type: AddressOptionType

Updates an existing address option type.

Parameters

Name

Type

Description

$data

array

$addressOptionTypeId

int

The ID of the address option type

public deleteAddressOptionType($addressOptionTypeId):bool

Deletes an address option type by the given ID.

Parameters

Name

Type

Description

$addressOptionTypeId

int

The ID of the address option type

public findAddressOptionTypeById($addressOptionTypeId):Plenty\Modules\Account\Address\Models\AddressOptionType
Return type: AddressOptionType

Finds an existing address option type by the given ID.

Parameters

Name

Type

Description

$addressOptionTypeId

int

The ID of the address option type

public allAddressOptionType($columns = [], $perPage = 50):void

Gets a list of address option types.

Parameters

Name

Type

Description

$columns

array

The columns to retrieve

$perPage

int

The number of items to list per page

AddressPosRelationRepositoryContract

The AddressPosRelationRepositoryContract is the interface for the address POS relation repository.

Namespace

Plenty\Modules\Account\Address\Contracts

Methods
public createAddressPosRelation($data):Plenty\Modules\Account\Address\Models\AddressPosRelation
Return type: AddressPosRelation

Creates an address POS relation.

Parameters

Name

Type

Description

$data

array

The address data as associative array

public updateAddressPosRelation($addressPosRelationId, $data):Plenty\Modules\Account\Address\Models\AddressPosRelation
Return type: AddressPosRelation

Updates an address POS relation.

Parameters

Name

Type

Description

$addressPosRelationId

int

The ID of the address POS relation

$data

array

The data as associative array

public findAddressPosRelation($addressPosRelationId):Plenty\Modules\Account\Address\Models\AddressPosRelation
Return type: AddressPosRelation

Lists address POS relations.

Parameters

Name

Type

Description

$addressPosRelationId

int

The ID of the address POS relation

public deleteAddressPosRelation($addressPosRelationId):void

Deletes an address POS relation.

Parameters

Name

Type

Description

$addressPosRelationId

int

The ID of the address POS relation

public listAddressPosRelations($filter = [], $with = [], $columns = [], $page = 1, $itemsPerPage = 50):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Lists address POS relations.

Parameters

Name

Type

Description

$filter

array

Filter that restricts the search result

$with

array

An array with child instances to be loaded

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

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.

AddressRepositoryContract

The AddressRepositoryContract is the interface for the address repository contract. This interface allows to get, update, create and delete addresses and address options.

Namespace

Plenty\Modules\Account\Address\Contracts

Methods
public findAddressById($addressId, $with = []):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Gets an address. The ID of the address must be specified.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$with

array

Optional: The relationships that should be eager loaded.

public updateAddress($data, $addressId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Updates an address. The ID of the address must be specified.

Parameters

Name

Type

Description

$data

array

The address data as associative array

$addressId

int

The ID of the address

public createAddress($data):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Creates an address.

Parameters

Name

Type

Description

$data

array

The address data as associative array

public deleteAddress($addressId):bool

Deletes an address. The ID of the address must be specified.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

public getAddressesOfWarehouse($warehouseId, $relationTypeId = null, $columns = [], $perPage = 50):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of addresses linked with a warehouse.

Parameters

Name

Type

Description

$warehouseId

int

The ID of the warehouse

$relationTypeId

int

The ID of the relation type

$columns

array

The columns to retrieve

$perPage

int

The quantity of the result

public createAddressOfWarehouse($data):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Creates an address and immediately links it with a warehouse.

Parameters

Name

Type

Description

$data

array

The data to save

public findAddressOptions($addressId, $typeId):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of address options of an address.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$typeId

int

(Optional) The ID of an address option type

public createAddressOptions($addressData, $addressId):Illuminate\Database\Eloquent\Collection
Return type: Collection

Creates address options for an address and returns all options of the address.

Parameters

Name

Type

Description

$addressData

array

The address option data as associative array. Multiple options are possible.

$addressId

int

The ID of the address

public updateAddressOptions($addressData, $addressId):Illuminate\Database\Eloquent\Collection
Return type: Collection

Updates address options for an address and returns all options of the address.

Parameters

Name

Type

Description

$addressData

array

The address option data as associative array. Multiple options are possible.

$addressId

int

The ID of the address

public deleteAddressOptions($addressId):void

Deletes all address options of an address. The ID of the address must be specified.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

public getAddressOption($optionId):Plenty\Modules\Account\Address\Models\AddressOption
Return type: AddressOption

Gets an address option. The ID of the option must be specified.

Parameters

Name

Type

Description

$optionId

int

The ID of the address option

public updateAddressOption($optionData, $optionId):Plenty\Modules\Account\Address\Models\AddressOption
Return type: AddressOption

Updates an address option. The ID of the address option must be specified.

Parameters

Name

Type

Description

$optionData

array

The option data as associative array

$optionId

int

The ID of the address option

public deleteAddressOption($optionId):bool

Deletes an address option. The ID of the option must be specified. Returns true if deletion was successful. Returns false if deletion was not successful.

Parameters

Name

Type

Description

$optionId

int

The ID of the address option

public findAddressRelationTypes($application, $lang):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of address relation types by a specific application and language. The collection may be empty.

Parameters

Name

Type

Description

$application

string

The application type

$lang

string

The language as ISO 639-1 code (e.g. en for english).

public findAddressDataByAddressId($addressId, $orderIds):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Find address data by address id

Parameters

Name

Type

Description

$addressId

int

$orderIds

string

public findExistingAddress($addressData):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Find an existing address

Parameters

Name

Type

Description

$addressData

array

The address data as associative 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.

Models

Address

The address model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address

gender

string

The gender ("female", "male" or "diverse")

name1

string

The name 1 field (defaults to: company name)

name2

string

The name 2 field (defaults to: first name)

name3

string

The name 3 field (defaults to: last name)

name4

string

The name 4 field (defaults to: c/o)

address1

string

The address 1 field (defaults to: street

'PACKSTATION'

'POSTFILIALE')

address2

string

The address 2 field (defaults to: houseNumber

packstationNo)

address3

string

The address 3 field (defaults to: additional)

address4

string

The address 4 field is currently undefined and can be freely used.

postalCode

string

The postcode

town

string

The town

countryId

int

The ID of the country

stateId

int

The ID of the state

readOnly

bool

Flag that indicates if the data record is read only

companyName

string

The company name (alias for name1, <i>read only</i>)

firstName

string

The first name (alias for name2, <i>read only</i>)

lastName

string

The last name (alias for name3, <i>read only</i>)

careOf

string

The c/o (alias for name4, <i>read only</i>)

street

string

The street (alias for address1, <i>read only</i>)

houseNumber

string

The house number (alias for address2, <i>read only</i>)

additional

string

The additional address information (alias for address3, <i>read only</i>)

checkedAt

The time the address was checked as unix timestamp

createdAt

The time the address was created as unix timestamp

updatedAt

The time the address was last updated as unix timestamp

taxIdNumber

string

The taxIdNumber option (alias for option with typeId 1, <i>read only</i>)

externalId

string

The externalId option (alias for option with typeId 2, <i>read only</i>)

entryCertificate

bool

The entryCertificate option (alias for option with typeId 3, <i>read only</i>)

phone

string

The phone option (alias for option with typeId 4, <i>read only</i>)

email

string

The email option (alias for option with typeId 5, <i>read only</i>)

postident

string

The PostIdent option (alias for option with typeId 6, <i>read only</i>)

personalNumber

string

The personal number option (alias for option with typeId 7, <i>read only</i>)

fsk

string

The age rating option (alias for option with typeId 8, <i>read only</i>)

birthday

string

The birthday option (alias for option with typeId 9, <i>read only</i>)

title

string

The title option (alias for option with typeId 11, <i>read only</i>)

sessionId

string

The fronetnd session ID that was used when the address was created (alias for option with typeId 10, <i>read only</i>)

contactPerson

string

The contact person option (alias for option with typeId 12, <i>read only</i>)

externalCustomerId

string

The external customer ID option (alias for option with typeId 13, <i>read only</i>)

packstationNo

string

The packstation number (alias for houseNumber and address2, <i>read only</i>)

isPackstation

bool

Flag that indicates if the address is a packstation

isPostfiliale

bool

Flag that indicates if the address is a postfiliale (post office)

options

Collection

A collection of address options. Standard plentymarkets address option types: <ul> <li>1: tax id number (VAT number)</li> <li>2: external ID</li> <li>3: entry certificate (bool)</li> <li>4: phone number</li> <li>5: email</li> <li>6: post number</li> <li>7: personal ID</li> <li>8: BBFC/FSK</li> <li>9: birthday</li> <li>10: frontend session ID</li> <li>11: title (salutation)</li> <li>12: contact person</li> <li>13: external customer ID</li> </ul>

contacts

Collection

A collection of contacts that are linked with the address record

orders

Collection

A collection of orders that are linked with the address record

country

Country

The address country

state

CountryState

The address state

contactRelations

Collection

A collection of relations to linked contacts

orderRelations

Collection

A collection of relations to linked orders

warehouseRelations

Collection

A collection of relations to linked warehouses

reorderRelations

Collection

A collection of relations to linked reorders

schedulerRelations

Collection

A collection of relations to linked schedulers

Methods
public toArray()

Returns this model as an array.

AddressContactRelation

The address contact relation model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address contact relation

contactId

int

The ID of the contact

typeId

int

The type ID of the address. Possible values: <ul> <li>Invoice address = 1</li> <li>Delivery address = 2</li> </ul>

addressId

int

The ID of the address

isPrimary

bool

Flag that indicates if the address is primary

address

Address

The address of the relation

contact

Contact

The contact of the relation

Methods
public toArray()

Returns this model as an array.

AddressOption

The address options model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address option

addressId

int

The ID of the address

typeId

int

The ID of the address option type

value

string

The option value

position

int

The position for sorting

createdAt

The time the option was created as unix timestamp

updatedAt

The time the option was last updated as unix timestamp

address

Address

The address the option belongs to

type

AddressOptionType

The option type of the address option

Methods
public toArray()

Returns this model as an array.

AddressOptionType

The AddressOptionType model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address option type. It is possible to define individual types. The following types are available by default: <ul> <li>1 = VAT number</li> <li>2 = External address ID</li> <li>3 = Entry certificate</li> <li>4 = Telephone</li> <li>5 = Email</li> <li>6 = Post number</li> <li>7 = Personal id</li> <li>8 = BBFC (age rating)</li> <li>9 = Birthday</li> <li>10 = Session ID</li> <li>11 = Title</li> <li>12 = Contact person</li> <li>13 = External customer ID</li> </ul>

position

int

The position for sorting

nonErasable

int

Flag that indicates if the type can be deleted

names

Collection

A collection of address option type names

options

Collection

A collection of all address options of the type

Methods
public toArray()

Returns this model as an array.

AddressOptionTypeName

The AddressOptionTypeName model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address option type name

typeId

int

The ID of the address option type

lang

string

The language of the name

name

string

The name

type

AddressOptionType

The address option type that belongs to the name

Methods
public toArray()

Returns this model as an array.

AddressOrderRelation

address order relation model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address order relation

orderId

int

The ID of the order

typeId

int

The ID of the address type <ul> <li>Billing address = 1</li> <li>Delivery address = 2</li> <li>Sender address = 3</li> <li>Return address = 4</li> <li>Client address = 5</li> <li>Contractor address = 6</li> <li>Warehouse address = 7</li> </ul>

addressId

int

The ID of the address

address

Address

The address of the relation

order

Order

The order of the relation

type

AddressRelationType

The address relation type

Methods
public toArray()

Returns this model as an array.

AddressPosRelation

The address POS relation model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address POS relation

posBaseId

string

The ID of the POS base

addressId

string

The ID of the address

typeId

int

The ID of the relation type

Methods
public toArray()

Returns this model as an array.

AddressRelationType

The contact address type model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address relation type. The following types are available by default and cannot be deleted: <ul> <li>1 = Billing address</li> <li>2 = Delivery address</li> <li>3 = Sender address</li> <li>4 = Return address</li> <li>5 = Client address</li> <li>6 = Contractor address</li> <li>7 = Warehouse address</li> <li>8 = POS address</li> </ul>

position

int

The position for sorting

nonErasable

int

Flag that indicates if the type can be deleted

names

Collection

A collection of AddressRelationTypeName objects

application

AddressRelationTypeApplication

The address relation type application

Methods
public toArray()

Returns this model as an array.

AddressRelationTypeApplication

The AddressRelationTypeApplication model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address relation type name

typeId

int

The ID of the relation type

application

string

The application type. Allowed values: contact, order, warehouse.

position

int

The position for sorting

type

AddressRelationType

The type of the address relation

Methods
public toArray()

Returns this model as an array.

AddressRelationTypeName

The AddressRelationTypeName model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address relation type name

typeId

int

The ID of the relation type

lang

string

The language of the name

name

string

The name

type

AddressRelationType

The type of the address relation

Methods
public toArray()

Returns this model as an array.

AddressSchedulerRelation

The AddressSchedulerRelation model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address order relation

schedulerId

int

The ID of the scheduler

typeId

int

The ID of the address type

addressId

int

The ID of the address

scheduler

OrderScheduler

The scheduler of the order

Methods
public toArray()

Returns this model as an array.

AddressWarehouseRelation

The AddressWarehouseRelation model

Namespace

Plenty\Modules\Account\Address\Models

Properties
Name Type Description

id

int

The ID of the address warehouse relation

warehouseId

int

The ID of the warehouse

typeId

int

The ID of the type

addressId

int

The ID of the address

address

Address

The address of the relation

Methods
public toArray()

Returns this model as an array.

ContactEvent

Contracts

ContactEventRepositoryContract

The ContactEventRepositoryContract is the interface for the contact event repository. This interface allows to list contact events.

Namespace

Plenty\Modules\Account\Contact\ContactEvent\Contracts

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

Lists contact events identified by the contact that is currently logged into the system.

Parameters

Name

Type

Description

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

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

Lists contact events by the contact ID.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

public createEvent($data):Plenty\Modules\Account\Contact\ContactEvent\Models\ContactEvent
Return type: ContactEvent

Adds an entry to the table customer events by the contact ID.

Parameters

Name

Type

Description

$data

array

public updateEvent($contactEventId, $data):Plenty\Modules\Account\Contact\ContactEvent\Models\ContactEvent
Return type: ContactEvent

Updates an entry of the table customer events by the contact event ID.

Parameters

Name

Type

Description

$contactEventId

int

The ID of the contact event

$data

array

public deleteEvent($contactEventId):void

Deletes an entry of the table customer events by the contact event ID.

Parameters

Name

Type

Description

$contactEventId

int

The ID of the contact event

public getEventTypesPreview():array

Get the contact event types as key/pair array

Models

ContactEvent

The contact event model.

Namespace

Plenty\Modules\Account\Contact\ContactEvent\Models

Properties
Name Type Description

eventId

int

The ID of the event

contactId

int

The ID of the contact this event belongs to

userId

int

The ID of the user this event belongs to

eventDuration

int

The duration of the event in seconds

eventType

string

The type of the event. Possible values are call, ticket, email, meeting, webinar, development and design.

orderRowId

int

eventInfo

string

Informational text about the event

billable

bool

Billable if set to 1

eventInsertedAt

string

The date the event was created at as unix timestamp

eventBilledAt

string

The date the event was billed at as unix timestamp

eventProvisionPaidAt

string

The date the provision was paid at as unix timestamp

eventCreditValue

float

The credit value of the event

Methods
public toArray()

Returns this model as an array.

Contact

Contracts

ContactAccessDataRepositoryContract

The ContactAccessDataRepositoryContract is the interface for the contact access data repository. This interface allows to reset and change contact password, get a login URL and unblock users.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public updatePassword($contactId, $data):void

Updates the password for a contact.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$data

array

The data as associative array

public sendNewCustomerPassword($contactId):void

Sends a new password to the contact.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

public unblockUser($contactId):void

Unblocks the user.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

public getLoginURL($contactId):void

Gets the login URL.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

ContactAccountRepositoryContract

The ContactAccountRepositoryContract is the interface for the contact account repository. This interface allows to get, create, update and delete accounts. An account contains company-related data.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public findAccount($accountId, $contactId):Plenty\Modules\Account\Models\Account
Return type: Account

Returns an account by an ID only if it is associated with the given contact ID.

Parameters

Name

Type

Description

$accountId

int

The ID of the account

$contactId

int

The ID of the contact

public createAccount($data, $contactId):Plenty\Modules\Account\Models\Account
Return type: Account

Creates an account and associates it immediately with the given ID of the contact.

Parameters

Name

Type

Description

$data

array

The account data as associative array

$contactId

int

The ID of the contact to associate this to

public updateAccount($data, $accountId, $contactId):Plenty\Modules\Account\Models\Account
Return type: Account

Updates an account. If not already associated, it will associate the account with the given contact ID.

Parameters

Name

Type

Description

$data

array

The account data as associative array

$accountId

int

The ID of the account

$contactId

int

The ID of the contact

public deleteAccount($accountId, $contactId):bool

Deletes the given account of the given contact ID. Returns true if the deletion was successful. Returns false if the deletion was not successful.

Parameters

Name

Type

Description

$accountId

int

The ID of the account

$contactId

int

The ID of the contact

ContactAddressRepositoryContract

The ContactAddressRepositoryContract is the interface for the contact address repository. * This interface allows to list, get, create, update, add and delete addresses of the contact.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public getPrimaryOrLastCreatedContactAddresses($contactId):array

Returns primary or last created contact addresses

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

public findContactAddressByTypeId($contactId, $typeId, $last = true):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Returns an address of a given contact for the given type.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$typeId

int

The ID of the address type

$last

bool

Return the last created billing address

public createAddress($data, $contactId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Creates an address, associates it immediately with the given contact ID with the given type and returns the new address.

Parameters

Name

Type

Description

$data

array

The address data as associative array

$contactId

int

The ID of the contact

$typeId

int

The ID of the address type

public updateAddress($data, $addressId, $contactId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Updates the existing address of a given contact and type and returns it.

Parameters

Name

Type

Description

$data

array

The address data as associative array

$addressId

int

The ID of the address to update

$contactId

int

The ID of the contact

$typeId

int

The ID of the address type

public getAddress($addressId, $contactId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Returns the address of a given contact and type.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$contactId

int

The ID of the contact

$typeId

int

The ID of the address type

public getAddresses($contactId, $typeId = null):array

Gets all addresses for the given contact of the given type.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$typeId

int

The address type (default: all / null)

public addAddress($addressId, $contactId, $typeId):Plenty\Modules\Account\Address\Models\Address
Return type: Address

Adds the address to the given contact as the given type.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$contactId

int

The ID of the contact

$typeId

int

The ID of the address type

public setPrimaryAddress($addressId, $contactId, $addressTypeId):Plenty\Modules\Account\Address\Models\AddressContactRelation
Return type: AddressContactRelation

Sets a contact address per address type as the primary address.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$contactId

int

The ID of the contact

$addressTypeId

int

The ID of the address type

public resetPrimaryAddress($addressId, $contactId, $addressTypeId):Plenty\Modules\Account\Address\Models\AddressContactRelation
Return type: AddressContactRelation

Resets a contact primary address.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$contactId

int

The ID of the contact

$addressTypeId

int

The ID of the address type

public hasPrimaryAddress($contactId, $addressTypeId):bool

Returns true if contact has primary address of type

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$addressTypeId

int

The ID of the address type

public deleteAddress($addressId, $contactId, $typeId):bool

Deletes an existing address of a given contact and type. Returns true if deletion was successful.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

$contactId

int

The ID of the contact

$typeId

int

The ID of the address type

ContactClassConfigRepositoryContract

The ContactClassConfigRepositoryContract is the interface * for managing the contact classes. This interface allows to list, delete, create, * update or get a contact class.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public getContactClassesPaginated($columns = [], $page = 1, $itemsPerPage = 50, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;, $filters = []):array

Returns a collection of all contact classes.

Parameters

Name

Type

Description

$columns

array

Optional: The columns to retrieve (Default: '[*]').

$page

int

Optional: The number of the page (Default: 1).

$itemsPerPage

int

Optional: The number of objects per page (Default: 50).

$sortBy

string

Optional: The field to be sorted (Default: id). Possible values: any property of ContactClass model

$sortOrder

string

Optional: The order for sorting (Default: desc).

$filters

array

Optional: Filter results by different criteria. Possible values: id, name

public showContactClass($contactClassId):Plenty\Modules\Account\Contact\Models\ContactClass
Return type: ContactClass

Return a ContactClass model based on class ID

Parameters

Name

Type

Description

$contactClassId

int

public createContactClass($data):Plenty\Modules\Account\Contact\Models\ContactClass
Return type: ContactClass

Creates a new contact class

Parameters

Name

Type

Description

$data

array

public updateContactClass($data, $contactClassId):Plenty\Modules\Account\Contact\Models\ContactClass
Return type: ContactClass

Updates an existing contact class

Parameters

Name

Type

Description

$data

array

$contactClassId

int

public deleteContactClass($contactClassId):void

Deletes a contact class

Parameters

Name

Type

Description

$contactClassId

int

ContactClassRepositoryContract

The ContactClassRepositoryContract is the interface for the contact class repository. This interface allows to list all contact classes or to get a contact class by the ID.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public findContactClassById($contactClassId):string

Gets a contact class. The ID of the contact class must be specified.

Parameters

Name

Type

Description

$contactClassId

int

The ID of the contact class

public findContactClassDataById($contactClassId):array

Gets the data of a contact class. The ID of the contact class must be specified.

Parameters

Name

Type

Description

$contactClassId

int

The ID of the contact class

public allContactClasses():array

Lists contact classes.

ContactDocumentContract

The ContactDocumentContract is the interface for contact documents.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public listDocuments($continuationToken, $contactId):Plenty\Modules\Cloud\Storage\Models\StorageObjectList
Return type: StorageObjectList

List documents of a contact

Parameters

Name

Type

Description

$continuationToken

string

The contnuation token

$contactId

int

The ID of the contact

public getDocument($key, $contactId):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject

Get storage object from contact documents

Parameters

Name

Type

Description

$key

string

The key for the file

$contactId

int

The ID of the contact

public getDocumentUrl($key, $contactId):string

Get temporary url for document

Parameters

Name

Type

Description

$key

string

The key for the file

$contactId

int

The ID of the contact

Return type: StorageObject

Stores an external link as a document

Parameters

Name

Type

Description

$link

string

$title

string

$contactId

int

public uploadDocument($key, $content, $contactId):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject

Upload document to contact directory

Parameters

Name

Type

Description

$key

string

The key for the file

$content

string

The content of the file

$contactId

int

The ID of the contact

public deleteDocuments($keyList, $contactId):bool

Delete files from contact documents

Parameters

Name

Type

Description

$keyList

array

The array of the key list

$contactId

int

The ID of the contact

ContactGroupFunctionsRepositoryContract

The ContactGroupFunctionsRepositoryContract is the interface for the contact account group function repository. This interface allows to execute a group function call and get group function related data.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public loadGroupFunctions():array
public executeGroupFunction($contactList = [], $addressLabelTemplate = null, $emailTemplate = null, $newsletter = null):array
Parameters

Name

Type

Description

$contactList

array

The list of the contacts

$addressLabelTemplate

int

The address label template

$emailTemplate

int

The email templates

$newsletter

int

The newsletter

public executeGroupFunctionV2($data = []):array
Parameters

Name

Type

Description

$data

array

The data as associative array

ContactLookupRepositoryContract

lookup repository for contacts

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public hasId($contactId):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Parameters

Name

Type

Description

$contactId

int

The ID of the contact

public hasEmail($emailAddress):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Parameters

Name

Type

Description

$emailAddress

string

The email address of the contact

public hasBillingAddress($billingAddressId):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Parameters

Name

Type

Description

$billingAddressId

int

The ID of the billing address

public hasDeliveryAddress($deliveryAddressId):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Parameters

Name

Type

Description

$deliveryAddressId

int

The ID of the delivery address

public lookup():array

ContactOptionRepositoryContract

The ContactOptionRepositoryContract is the interface for the contact option repository. This interface allows to get, create, update and delete contact options.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public findContactOptions($contactId, $typeId, $subTypeId):Illuminate\Database\Eloquent\Collection
Return type: Collection

Lists options of the contact. The ID of the contact must be specified. The ID of the option type and the ID of the option sub-type can be optionally used.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$typeId

int

Optional: The ID of the option type (default: 0)

$subTypeId

int

Optional: The ID of the option sub-type (default: 0)

public createContactOptions($optionData, $contactId):array

Creates an option for the given contact and returns them.

Parameters

Name

Type

Description

$optionData

array

The option data as associative array

$contactId

int

The ID of the contact

public updateContactOptions($optionData, $contactId):array

Updates options of the given contact and returns them. The ID of the contact must be specified.

Parameters

Name

Type

Description

$optionData

array

The option data as associative array

$contactId

int

The ID of the contact

public deleteContactOptionsByContactId($contactId):bool

Deletes all options of the given contact. The ID of the contact must be specified. Returns true if deletion was successful. Returns false if deletion was not successful.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

public findContactOption($optionId):Plenty\Modules\Account\Contact\Models\ContactOption
Return type: ContactOption

Gets a contact option. The ID of the option must be specified.

Parameters

Name

Type

Description

$optionId

int

The ID of the option

public updateContactOption($optionData, $optionId):Plenty\Modules\Account\Contact\Models\ContactOption
Return type: ContactOption

Updates an option with the given id and returns it.

Parameters

Name

Type

Description

$optionData

array

The option data as associative array

$optionId

int

The ID of the option

public deleteContactOption($optionId):bool

Deletes a contact option. The ID of the option must be specified.

Parameters

Name

Type

Description

$optionId

int

The ID of the option

public validateValue($contactId, $typeId, $subTypeId, $value):bool
Parameters

Name

Type

Description

$contactId

int

$typeId

int

$subTypeId

int

$value

string

ContactParamConfigurationContract

The ContactParamConfigurationContract is the interface for the contact param configuration repository. This interface allows to create, update, delete, list and get contact positions, contact departments, contact option types and and contact option sub-types.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public createContactPosition($data):Plenty\Modules\Account\Contact\Models\ContactPosition
Return type: ContactPosition

Creates a contact position.

Parameters

Name

Type

Description

$data

array

public updateContactPosition($data, $contactPositionId):Plenty\Modules\Account\Contact\Models\ContactPosition
Return type: ContactPosition

Updates an existing contact position.

Parameters

Name

Type

Description

$data

array

$contactPositionId

int

The ID of the contact position

public deleteContactPosition($contactPositionId):bool

Deletes a contact position by the given ID.

Parameters

Name

Type

Description

$contactPositionId

int

The ID of the contact position

public findContactPositionById($contactPositionId):Plenty\Modules\Account\Contact\Models\ContactPosition
Return type: ContactPosition

Finds an existing contact position by the given ID.

Parameters

Name

Type

Description

$contactPositionId

int

The ID of the contact position

public allContactPositions($columns = [], $perPage = 50):void

Gets a list of contact positions.

Parameters

Name

Type

Description

$columns

array

$perPage

int

public createContactDepartment($data):Plenty\Modules\Account\Contact\Models\ContactDepartment
Return type: ContactDepartment

Creates a contact department.

Parameters

Name

Type

Description

$data

array

public updateContactDepartment($data, $contactDepartmentId):Plenty\Modules\Account\Contact\Models\ContactDepartment
Return type: ContactDepartment

Updates an existing contact department.

Parameters

Name

Type

Description

$data

array

$contactDepartmentId

int

The ID of the contact department

public deleteContactDepartment($contactDepartmentId):bool

Deletes a contact department by the given ID.

Parameters

Name

Type

Description

$contactDepartmentId

int

The ID of the contact department

public findContactDepartmentById($contactDepartmentId):Plenty\Modules\Account\Contact\Models\ContactDepartment
Return type: ContactDepartment

Finds an existing contact department by the given ID.

Parameters

Name

Type

Description

$contactDepartmentId

int

The ID of the contact department

public allContactDepartments($columns = [], $perPage = 50):void

Gets a list of contact departments.

Parameters

Name

Type

Description

$columns

array

$perPage

int

public createContactOptionType($data):Plenty\Modules\Account\Contact\Models\ContactOptionType
Return type: ContactOptionType

Creates a contact option type.

Parameters

Name

Type

Description

$data

array

public updateContactOptionType($data, $contactOptionTypeId):Plenty\Modules\Account\Contact\Models\ContactOptionType
Return type: ContactOptionType

Updates an existing contact option type.

Parameters

Name

Type

Description

$data

array

$contactOptionTypeId

int

The ID of the contact option type

public deleteContactOptionType($contactOptionTypeId):bool

Deletes a contact option type by the given ID.

Parameters

Name

Type

Description

$contactOptionTypeId

int

The ID of the contact option type

public findContactOptionTypeById($contactOptionTypeId):Plenty\Modules\Account\Contact\Models\ContactOptionType
Return type: ContactOptionType

Finds an existing contact option type by the given ID.

Parameters

Name

Type

Description

$contactOptionTypeId

int

The ID of the contact option type

public allContactOptionType($columns = [], $perPage = 50, $with = []):void

Gets a list of contact option types.

Parameters

Name

Type

Description

$columns

array

$perPage

int

$with

array

public createContactOptionSubType($data):Plenty\Modules\Account\Contact\Models\ContactOptionSubType
Return type: ContactOptionSubType

Creates a contact option sub-type.

Parameters

Name

Type

Description

$data

array

public updateContactOptionSubType($data, $contactOptionSubTypeId):Plenty\Modules\Account\Contact\Models\ContactOptionSubType
Return type: ContactOptionSubType

Updates an existing contact option sub-type.

Parameters

Name

Type

Description

$data

array

$contactOptionSubTypeId

int

The ID of the contact option sub-type

public deleteContactOptionSubType($contactOptionSubTypeId):bool

Deletes a contact option sub-type by the given ID.

Parameters

Name

Type

Description

$contactOptionSubTypeId

int

The ID of the contact option sub-type

public findContactOptionSubTypeById($contactOptionSubTypeId):Plenty\Modules\Account\Contact\Models\ContactOptionSubType
Return type: ContactOptionSubType

Finds an existing contact option sub-type by the given ID.

Parameters

Name

Type

Description

$contactOptionSubTypeId

int

The ID contact option sub-type

public allContactOptionSubType($columns = [], $perPage = 50):void

Gets a list of contact option sub-types.

Parameters

Name

Type

Description

$columns

array

$perPage

int

ContactPaymentRepositoryContract

The ContactPaymentRepositoryContract is the interface for the contact payment repository. * This interface allows to list, get, create, update and delete bank details of the contact.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public getBanksOfContactPaginated($contactId, $columns = [], $perPage = 50, $page = 1, $filters = []):array

Gets a collection of bank accounts of a contact. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$columns

array

Optional: The columns to retrieve (Default: '[*]')

$perPage

int

Optional: The number of bank accounts per page (Default: 50)

$page

int

$filters

array

public getBanksOfContact($contactId, $columns = [], $perPage = 50):array

Gets a collection of bank accounts of a contact. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$columns

array

Optional: The columns to retrieve (Default: '[*]')

$perPage

int

Optional: The number of bank accounts per page (Default: 50)

public getBankByOrderId($orderId, $columns = []):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Returns bank details of an order. The ID of the order must be specified.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$columns

array

Optional: The columns to retrieve (Default: '[*]')

public createContactBank($data):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Creates a bank account for a contact and returns it.

Parameters

Name

Type

Description

$data

array

The bank account data as associative array

public updateContactBank($data, $contactBankId):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Updates a bank account. The ID of the bank account must be specified.

Parameters

Name

Type

Description

$data

array

The bank data as associative array

$contactBankId

int

The ID of the bank account entry

public deleteContactBank($contactBankId):bool

Deletes a bank account. The ID of the bank account must be specified.

Parameters

Name

Type

Description

$contactBankId

int

The ID of the bank account entry

public findContactBankById($contactBankId):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Gets a bank account. The ID of the bank account must be specified.

Parameters

Name

Type

Description

$contactBankId

int

The ID of the bank account entry

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.

ContactRepositoryContract

The ContactRepositoryContract is the interface for the contact repository. * This interface allows to list, get, create, update and delete contacts. A contact is equivalent to a person.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public createContact($data):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Creates a contact and returns it.

Parameters

Name

Type

Description

$data

array

The contact data as associative array

public updateContact($data, $contactId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Updates a contact and returns it. The ID of the contact must be specified.

Parameters

Name

Type

Description

$data

array

The contact data as associative array

$contactId

int

The ID of the contact

public updateNewsletterDate($contactId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Updates the newsletter date from contact and returns it.

Parameters

Name

Type

Description

$contactId

int

public deleteContact($contactId, $checkExistingOrders = null):bool

Deletes a contact. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact. Returns true if deletion was successful. Returns false if deletion was not successful.

$checkExistingOrders

bool

Flag that checks if the contact is linked to orders. If the contact is linked to orders, CustomerDeleteException is thrown and the contact will not be deleted.

public findContactById($contactId, $with = []):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Gets a contact. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$with

array

The relationships that should be eager loaded

public getContactList($filter = [], $with = [], $columns = [], $page = 1, $itemsPerPage = 50, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

List contacts

Parameters

Name

Type

Description

$filter

array

Filter that restrict the search result

$with

array

The relationships that should be eager loaded

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

$sortBy

string

$sortOrder

string

public getContactByOptionValue($value, $typeId, $subTypeId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Returns an existing contact by a contact option information.

Parameters

Name

Type

Description

$value

string

The value of the contact option

$typeId

int

The type ID of the contact option

$subTypeId

int

The sub-type ID of the contact option

public getContactIdByEmail($email, $filter = []):int

Returns a contact id by email. The email must be specified.

Parameters

Name

Type

Description

$email

string

$filter

array

public findContactDataByContactId($contactId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Returns all contact related data.

Parameters

Name

Type

Description

$contactId

int

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.

public getDataHistory($referenceType, $referenceId):void
Parameters

Name

Type

Description

$referenceType

string

$referenceId

int

ContactTypeRepositoryContract

The ContactTypeRepositoryContract is the interface for the contact type repository. This interface allows to list, get, create, update and delete contact types.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public createContactType($data):Plenty\Modules\Account\Contact\Models\ContactType
Return type: ContactType

Creates a contact type and returns it.

Parameters

Name

Type

Description

$data

array

The contact type data as associative array

public updateContactType($data, $contactTypeId):Plenty\Modules\Account\Contact\Models\ContactType
Return type: ContactType

Updates a contact type and returns it. The ID of the contact type must be specified.

Parameters

Name

Type

Description

$data

array

The contact type data as associative array

$contactTypeId

int

The ID of the contact type

public deleteContactType($contactTypeId):bool

Deletes a contact type. The ID of the contact type must be specified. Returns true if deletion was successful. Returns false if deletion was not successful.

Parameters

Name

Type

Description

$contactTypeId

int

The ID of the contact type

public findContactTypeById($contactTypeId):Plenty\Modules\Account\Contact\Models\ContactType
Return type: ContactType

Gets a contact type. The ID of the contact type must be specified.

Parameters

Name

Type

Description

$contactTypeId

int

The ID of the contact type

public allContactTypes($columns = [], $sortBy = &quot;id&quot;, $sortOrder = &quot;asc&quot;):array

Returns a collection of contact types.

Parameters

Name

Type

Description

$columns

array

Optional: The columns to return as an array (Default: '[*]')

$sortBy

string

$sortOrder

string

ContactVCardRepositoryContract

The ContractVCardRepositoryContract is the interface for the vcard repository. The interface allows you to return a vcard filestream.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public getVCard($contactId):array

Gets a filestream of the vcard of a contact.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

ConvertGuestsRepositoryContract

The ConvertGuestsRepositoryContract is the interface for the convert guest repository. The interface allows you to convert guests into contacts.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public convertGuestByContactId($contactId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact
Parameters

Name

Type

Description

$contactId

int

public convertGuestByAddressId($addressId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact
Parameters

Name

Type

Description

$addressId

int

InternalContactPaymentRepositoryContract

The contract for the contact payment repository.

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public getBanksOfContactPaginated($contactId, $columns = [], $perPage = 50, $page = 1, $filters = []):array

Gets a collection of bank accounts of a contact. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$columns

array

Optional: The columns to retrieve (Default: '[*]')

$perPage

int

Optional: The number of bank accounts per page (Default: 50)

$page

int

$filters

array

public getBanksOfContact($contactId, $columns = [], $perPage = 50):array

Gets a collection of bank accounts of a contact. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$columns

array

Optional: The columns to retrieve (Default: '[*]')

$perPage

int

Optional: The number of bank accounts per page (Default: 50)

public getBankByOrderId($orderId, $columns = []):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Returns bank details of an order. The ID of the order must be specified.

Parameters

Name

Type

Description

$orderId

int

The ID of the order

$columns

array

Optional: The columns to retrieve (Default: '[*]')

public createContactBank($data):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Creates a bank account for a contact and returns it.

Parameters

Name

Type

Description

$data

array

The bank account data as associative array

public updateContactBank($data, $contactBankId):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Updates a bank account. The ID of the bank account must be specified.

Parameters

Name

Type

Description

$data

array

The bank data as associative array

$contactBankId

int

The ID of the bank account entry

public deleteContactBank($contactBankId):bool

Deletes a bank account. The ID of the bank account must be specified.

Parameters

Name

Type

Description

$contactBankId

int

The ID of the bank account entry

public findContactBankById($contactBankId):Plenty\Modules\Account\Contact\Models\ContactBank
Return type: ContactBank

Gets a bank account. The ID of the bank account must be specified.

Parameters

Name

Type

Description

$contactBankId

int

The ID of the bank account entry

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.

SalesRepresentativeRegionRepositoryContract

Sales representatives region repository

Namespace

Plenty\Modules\Account\Contact\Contracts

Methods
public createRegion($data, $contactId = null, $accountId = null):Plenty\Modules\Account\Models\SalesRepresentativeRegion
Return type: SalesRepresentativeRegion

Create a region for the sales representative. An account is equivalent to a company.

Parameters

Name

Type

Description

$data

array

The data as associative array

$contactId

int

The ID of the contact

$accountId

int

The ID of the company

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

Name

Type

Description

$page

int

$itemsPerPage

int

$columns

array

$with

array

public getRegionById($accountContactRelationId):Plenty\Modules\Account\Models\SalesRepresentativeRegion
Return type: SalesRepresentativeRegion

Get a region by the ID

Parameters

Name

Type

Description

$accountContactRelationId

int

The ID of the company contact relation

public deleteRegionById($accountContactRelationId):bool

Delete a region by the ID. An account is equivalent to a company.

Parameters

Name

Type

Description

$accountContactRelationId

int

The ID of the company contact relation

public updateRegionById($accountContactRelationId, $data):Plenty\Modules\Account\Models\SalesRepresentativeRegion
Return type: SalesRepresentativeRegion

Update an existing region by the ID. An account is equivalent to a company.

Parameters

Name

Type

Description

$accountContactRelationId

int

The ID of the company contact relation

$data

array

public getRegionByContactAndAccountId($contactId, $accountId):Plenty\Modules\Account\Models\SalesRepresentativeRegion
Return type: SalesRepresentativeRegion

Get a region by contact ID and company ID. An account is equivalent to a company.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

$accountId

int

The ID of the company

public getRegionsByContactId($contactId):Illuminate\Support\Collection
Return type: Collection

Get a region by the contact ID

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

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.

Events

AfterContactCreate

The event is triggered after a contact has been created

Namespace

Plenty\Modules\Account\Contact\Events

Methods
public getContact():Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

AfterContactUpdate

The event is triggered after a contact has been updated

Namespace

Plenty\Modules\Account\Contact\Events

Methods
public getContact():Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

BeforeContactCreate

The event is triggered before a contact is being created.

Namespace

Plenty\Modules\Account\Contact\Events

Methods
public getContact():Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

BeforeContactUpdate

The event is triggered before a contact is being updated.

Namespace

Plenty\Modules\Account\Contact\Events

Methods
public getContact():Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

Models

Contact

The contact model.

Namespace

Plenty\Modules\Account\Contact\Models

Referenceable

id

Properties
Name Type Description

id

int

The ID of the contact

externalId

string

The external ID of the contact

number

string

The number of the contact (previous customer number)

typeId

int

The ID of the contact type

firstName

string

The first name of the contact

lastName

string

The last name of the contact

fullName

string

The full name of the contact. A concatenation of first and last name.

email

string

The private email address of the contact

secondaryEmail

string

The secondary private email address of the contact

gender

string

The gender of the contact ("female", "male" or "diverse")

title

string

The title of the contact, e.g. a doctorate

formOfAddress

string

The form of address for the contact

newsletterAllowanceAt

The time the contact registered for the newsletter as unix timestamp

classId

int

The ID of the contact class

blocked

int

The blocked status of the contact. Contacts can be blocked for a specific client (store). Possible values: <ul> <li> 0 = not blocked</li> <li> 1 = blocked</li> </ul>

rating

int

The rating of the contact. This rating is for internal use only. 5 red stars are for the worst and 5 yellow stars for the best rating. Possible values: <ul> <li>-5 = 5 red stars (worst rating)</li> <li>-4 = 4 red stars</li> <li>-3 = 3 red stars</li> <li>-2 = 2 red stars</li> <li>-1 = 1 red star</li> <li>0 = 5 grey stars, no rating saved for the contact</li> <li>1 = 1 yellow star</li> <li>2 = 2 yellow stars</li> <li>3 = 3 yellow stars</li> <li>4 = 4 yellow stars</li> <li>5 = 5 yellow stars (best rating)</li> </ul>

bookAccount

string

The book account (debtor account) of the contact. An additional, separate number that generally corresponds to the customer number or the debtor number in your financial accounting.

lang

string

The language of the contact

referrerId

float

The origin of the contact

plentyId

int

The client (store) that is assigned to the contact

userId

int

The owner ID of the contact

birthdayAt

The date of birth of the contact

lastLoginAt

The date of the last login of the contact

lastLoginAtTimestamp

The date of the last login of the contact

lastOrderAt

The date of the last order

createdAt

The date the contact was created

updatedAt

The date the contact was last updated

privatePhone

string

The private phone number of the contact

privateFax

string

The private fax number of the contact

privateMobile

string

The private mobile phone number of the contact

ebayName

string

The eBay account name of the contact

paypalEmail

string

The email address of the PayPal account of the contact

paypalPayerId

string

The PayPal payer id of the contact

klarnaPersonalId

string

The Klarna personal id of the contact

dhlPostIdent

string

The DHL PostIdent of the contact

forumUsername

string

The user name of the contact in the forum

forumGroupId

string

The ID of the forum group that is assigned to the contact

singleAccess

string

The access type of the contact

contactPerson

string

The contact person of the contact

marketplacePartner

string

The marketplace partner status of the contact

addresses

Collection

A collection of linked addresses

primaryBillingAddress

Collection

A collection of linked primary billing addresses

deliveryAddresses

Collection

A collection of linked primary delivery addresses

accounts

Collection

A collection of linked accounts. An ID or a company name must be specified. When the ID is used, a relation will be created. When the company name without an ID is used, a new account with the given data will be created.

orders

Collection

A collection of orders of the contact. Deprecated.

contactOrders

Collection

A collection of orders of the contact

banks

Collection

A collection of bank accounts of the contact

reorders

Collection

A collection of reorders of the contact

orderSchedulers

Collection

A collection of order schedulers of the contact

options

Collection

A collection of options of the contact

salesRepresentativeRegions

Collection

A collection of sales representative regions of the contact

allowedMethodsOfPayment

Collection

A collection of allowed payment methods for the contact.*

type

ContactType

The type of the contact

orderSummary

OrderSummary

The order summary of the contact

tagRelationships

Collection

The tag relations of the contact

valuta

int

The foreign currency of the contact

discountDays

int

The early payment discount period in days specified for the account

discountPercent

float

The early payment discount in percent specified for the account

timeForPaymentAllowedDays

int

The payment due date in days specified for the account

salesRepresentativeContactId

int

The salesRepresentative ID of the contact

anonymizeAt

The date at which the contact will be anonymized.

isLead

bool

Defines if contact is a lead.

leadStatusKey

string

The current lead status key

inLeadStatusSince

int

The number of days since the current lead status has been set

leadStatusUpdatedAt

The date of the current lead status change

leadStatusUpdateAt

DEPRECATED - See leadStatusUpdatedAt

position_id

int

The job position ID of the contact

Methods
public toArray()

Returns this model as an array.

ContactAllowedMethodOfPayment

The model of the allowed payment method for the contact

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the payment method allowed for the contact

contactId

int

The ID of the contact

methodOfPaymentId

int

The ID of the payment method

allowed

int

Allowed payment method for the contact. Possible values are: <ul> <li>0 = not allowed</li> <li>1 = allowed</li> </ul>

createdAt

string

Timestamp when the payment method was created

updatedAt

string

Timestamp when the payment method was last updated

isPaymentActive

bool

Flag that indicates if the current payment method is active

Methods
public toArray()

Returns this model as an array.

ContactBank

The contact bank model.

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the bank account

contactId

int

The ID of the contact the bank account belongs to

orderId

int

The ID of the order the bank account belongs to

accountOwner

string

The owner of the bank account

bankName

string

The name of the bank

bankAddress

string

The address of the bank

bankPostalCodeTown

string

The postcode and town of the bank

bankCountry

string

The country of the bank

iban

string

The IBAN of the bank account

bic

string

The BIC of the bank account

accountNumber

string

The account number of the bank account

sortCode

string

The sort code of the bank account

lastUpdateBy

string

The source of the last change (possible values: customer, backend, import)

directDebitMandateAvailable

int

Flag that indicates if a direct debit mandate is available

directDebitMandateAt

string

The time the direct debit mandate was created as unix timestamp

directDebitMethod

string

The direct debit method (possible values: sepaDirectDebit, sepaB2bDirectDebit)

directDebitType

string

The direct debit type (possible values: first, next)

paymentMethod

string

The payment method (possible values: recurrent, onOff)

createdAt

string

The time the bank account was created as unix timestamp

updatedAt

string

The time the bank account was last updated as unix timestamp

contact

Contact

The contact the bank account belongs to

order

Order

The order the bank account belongs to

Methods
public toArray()

Returns this model as an array.

ContactClass

The contact class model.

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact class

name

string

priceColumn

int

showPrice

int

Flag to display price in the online store as Gross(1) or Net(2)

discountType

int

position

int

pqsQuantity1

float

float

pqsDiscount1

pqsQuantity2

float

float

pqsDiscount2

pqsQuantity3

float

float

pqsDiscount3

pqsQuantity4

float

float

pqsDiscount4

pqsQuantity5

float

float

pqsDiscount5

pqsQuantity6

float

float

pqsDiscount6

pqsQuantity7

float

float

pqsDiscount7

pqsQuantity8

float

float

pqsDiscount8

pqsQuantity9

float

float

pqsDiscount9

pqsQuantity10

float

float

pqsDiscount10

pnsQuantity1

float

pnsDiscount1

float

pnsQuantity2

float

pnsDiscount2

float

pnsQuantity3

float

pnsDiscount3

float

pnsQuantity4

float

pnsDiscount4

float

pnsQuantity5

float

pnsDiscount5

float

pmsMop

string

pmsDiscount

float

paqsDiscount

float

payableDueWithin

int

minQuantity

int

dontUseItemPriceRebates

int

customerId

int

allowedMops

string

The list of allowed payment methods

pdwQuantity1

float

pdwDays1

int

pdwQuantity2

float

pdwDays2

int

pdwQuantity3

float

pdwDays3

int

pdwQuantity4

float

pdwDays4

int

pdwQuantity5

float

pdwDays5

int

customerGroupsPaymentNotice

string

earlyPaymentDiscount

float

earlyPaymentDiscountDays

float

valuta

int

manualDiscount

float

allowedMethodOfPaymentIdsList

array

Methods
public toArray()

Returns this model as an array.

ContactDepartment

contact department model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact department. It is possible to define individual departments. The following departments are available by default. <ul> <li>1 = Management</li> <li>2 = Purchasing Department</li> <li>3 = Sales Department</li> <li>4 = Research & Development Team</li> <li>5 = Production</li> <li>6 = Quality Assurance</li> <li>7 = Public Relations</li> <li>8 = Marketing Department</li> <li>9 = IT Department</li> <li>10 = EDP Team</li> <li>11 = Logistics</li> <li>12 = Warehousing Department</li> <li>13 = Export Department</li> <li>14 = Import Department</li> <li>15 = Customer Service</li> <li>16 = Technical Support Team</li> <li>17 = Human Resources</li> <li>18 = Accounting Department</li> <li>19 = Financial Department</li> <li>20 = Legal Department</li> <li>21 = Secretary’s Office</li> </ul>

position

int

The position for sorting

names

array

List of contact department names

Methods
public toArray()

Returns this model as an array.

ContactDepartmentName

contact department name model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact department name

departmentId

int

The ID of the department

lang

string

The language

name

string

The name

Methods
public toArray()

Returns this model as an array.

ContactOption

The contact options model.

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact option

contactId

int

The ID of the contact the option belongs to

typeId

int

The type ID of the contact option. It is possible to define individual contact option types. The following types are available by default and cannot be deleted: <ul> <li>1 = Telephone</li> <li>2 = Email</li> <li>3 = Telefax</li> <li>4 = Web page</li> <li>5 = Marketplace</li> <li>6 = Identification number</li> <li>7 = Payment</li> <li>8 = User name</li> <li>9 = Group</li> <li>10 = Access</li> <li>11 = Additional</li> <li>13 = Converted by</li> </ul>

subTypeId

int

The sub-type ID of the contact option. It is possible to define individual contact option sub-types. The following types are available by default and cannot be deleted: <ul> <li>1 = Work</li> <li>2 = Mobile private</li> <li>3 = Mobile work</li> <li>4 = Private</li> <li>5 = PayPal</li> <li>6 = Ebay</li> <li>7 = Amazon</li> <li>8 = Klarna</li> <li>9 = DHL</li> <li>10 = Forum</li> <li>11 = Guest</li> <li>12 = Contact person</li> <li>13 = Marketplace partner</li> <li>15 = User</li> </ul>

value

string

The value of the option. Depends on the type/sub-type.

priority

int

The priority for sorting

createdAt

string

The time the option was created as unix timestamp

updatedAt

string

The time the option was last updated as unix timestamp

contact

Contact

The contact the option belongs to

type

ContactOptionType

The type of the option

subType

ContactOptionSubType

The sub-type of the option

Methods
public toArray()

Returns this model as an array.

ContactOptionSubType

contact options sub type model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact option sub-type. It is possible to define individual option sub-types. The following types are available by default and cannot be deleted. <ul> <li>1 = Work</li> <li>2 = Mobile private</li> <li>3 = Mobile work</li> <li>4 = Private</li> <li>5 = PayPal</li> <li>6 = Ebay</li> <li>7 = Amazon</li> <li>8 = Klarna</li> <li>9 = DHL</li> <li>10 = Forum</li> <li>11 = Guest</li> <li>12 = Contact person</li> <li>13 = Marketplace partner</li> <li>15 = User</li> </ul>

position

int

The position for sorting

nonErasable

int

Flag that indicates if the option sub-type can be deleted

names

Collection

A collection of names in different languages for the option sub-type.

Methods
public toArray()

Returns this model as an array.

ContactOptionSubTypeName

contact options sub type name model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact option sub type name entry

subTypeId

int

The ID of the option sub-type the name entry belongs to

lang

string

lang The language of the sub-type name

name

string

name The name of the sub-type

Methods
public toArray()

Returns this model as an array.

ContactOptionType

contact options type model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact option type. It is possible to define individual option types. The following types are available by default and cannot be deleted. <ul> <li>1 = Telephone</li> <li>2 = Email</li> <li>3 = Telefax</li> <li>4 = Web page</li> <li>5 = Marketplace</li> <li>6 = Identification number</li> <li>7 = Payment</li> <li>8 = User name</li> <li>9 = Group</li> <li>10 = Access</li> <li>11 = Additional</li> <li>13 = Converted by</li> </ul>

position

int

The position for sorting

nonErasable

int

Flag that indicates if the option type can be deleted

names

Collection

A collection of names in different languages for the option type

Methods
public toArray()

Returns this model as an array.

ContactOptionTypeName

The ContactOptionTypeName model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact option type name

typeId

int

The ID of the option type the name belongs to

lang

string

The language of the option type name

name

string

The name of the option type

Methods
public toArray()

Returns this model as an array.

ContactPosition

The ContactPosition model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact position. It is possible to define individual contact positions. The following positions are available by default: <ul> <li>1 = Analyst</li> <li>2 = Director of Boards</li> <li>3 = CEO</li> <li>4 = Buyer</li> <li>5 = Purchasing Manager</li> <li>6 = CFO</li> <li>7 = Director General</li> <li>8 = Managing Director</li> <li>9 = Codirector</li> <li>10 = Commercial Agent</li> <li>11 = Assistant</li> <li>12 = Service Engineer</li> <li>13 = Warehouse Manager</li> <li>14 = Warehouse Worker</li> <li>15 = Senior Executive</li> <li>16 = Assistent</li> <li>17 = Purchasing Assistent</li> <li>18 = Software Developer</li> <li>19 = Sales Representative</li> <li>20 = Sales Manager</li> <li>21 = Export Sales Manager</li> <li>22 = Wholesale Distributing Manager</li> <li>23 = Secretary</li> <li>24 = Economist</li> <li>25 = Management Board</li> </ul>

position

int

The position for sorting

names

array

The list of contact position names

Methods
public toArray()

Returns this model as an array.

ContactPositionName

The ContactPositionName model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact position name

positionId

int

The ID of the position

lang

string

The language

name

string

The name

Methods
public toArray()

Returns this model as an array.

ContactType

The ContactType model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact type. It is possible to define individual contact types. The following types are available by default and cannot be deleted. <ul> <li>1 = Customer</li> <li>2 = Sales lead/Interested party</li> <li>3 = Sales representative</li> <li>4 = Supplier</li> <li>5 = Producer/Manufacturer</li> <li>6 = Partner</li> </ul>

position

int

The position for sorting

nonErasable

int

Flag that indicates if the type can be deleted

names

Collection

A collection of contact type names in different languages

contacts

Collection

A collection of contacts with the type

Methods
public toArray()

Returns this model as an array.

ContactTypeName

contact type name model

Namespace

Plenty\Modules\Account\Contact\Models

Properties
Name Type Description

id

int

The ID of the contact type name

typeId

int

The contact type ID. See also {@link ContactType::id}.

lang

string

The language ot the contact type name

name

string

The contact type name

Methods
public toArray()

Returns this model as an array.

Contracts

ContactElasticSearchAvailibilityRepositoryContract

ContactElasticSearchAvailibilityRepositoryContract

Namespace

Plenty\Modules\Account\Contact\Search\Contracts

Methods
public isReady():bool
public isAvailable():bool

ContactElasticSearchMigrationServiceContract

Elastic Search 7 migration service

Namespace

Plenty\Modules\Account\Contact\Search\Contracts

Methods
public isActive():void
public activate():void
public deactivate():void
public setContactLastId($lastId):void
Parameters

Name

Type

Description

$lastId

public getContactLastId():void
public setAddressPomLastId($lastId):void
Parameters

Name

Type

Description

$lastId

public setAddressPosLastId($lastId):void
Parameters

Name

Type

Description

$lastId

public getAddressPomLastId():void
public getAddressPosLastId():void

ContactElasticSearchScrollRepositoryContract

kommt noch

Namespace

Plenty\Modules\Account\Contact\Search\Contracts

Methods
public hasNext():bool
public setNumberOfDocumentsPerShard($size):void
Parameters

Name

Type

Description

$size

int

public clear():void
public setIndex($index):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Parameters

Name

Type

Description

$index

IndexInterface

public addSearch($search):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Parameters

Name

Type

Description

$search

public execute():array

ContactElasticSearchSearchRepositoryContract

Contract for search contacts

Namespace

Plenty\Modules\Account\Contact\Search\Contracts

Methods
Return type: FilteredPaginatedResult

Search contacts with the given filters.

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$filters

array

$sortBy

string

$sortOrder

string

$with

string

IndexContactRepositoryContract

The contract for the search repository

Namespace

Plenty\Modules\Account\Contact\Search\Contracts

Methods
public index($contactId):array

Index a contact

Parameters

Name

Type

Description

$contactId

int

public delete($contactIds):array

Delete contact from index

Parameters

Name

Type

Description

$contactIds

array

public bulk($contactIds):array
Parameters

Name

Type

Description

$contactIds

array

public setOutput($output):void
Parameters

Name

Type

Description

$output

OutputInterface

public execute():void
public getElasticSearchVersion():float

Services

ES7StatusService

Elastic Search 7 status checker service

Namespace

Plenty\Modules\Account\Contact\Search\Services

Methods
public static isHostSet():void
public static isIndexFilled():void
public static isIndexAvailable():void

Search7

Contracts

ContactElasticSearchAvailibilityRepositoryContract

ContactElasticSearchAvailibilityRepositoryContract

Namespace

Plenty\Modules\Account\Contact\Search7\Contracts

Methods
public isReady():bool
public isAvailable():bool

ContactElasticSearchMigrationServiceContract

Elastic Search 7 migration service

Namespace

Plenty\Modules\Account\Contact\Search7\Contracts

Methods
public isActive():void
public activate():void
public deactivate():void
public setContactLastId($lastId):void
Parameters

Name

Type

Description

$lastId

public getContactLastId():void
public setAddressPomLastId($lastId):void
Parameters

Name

Type

Description

$lastId

public setAddressPosLastId($lastId):void
Parameters

Name

Type

Description

$lastId

public getAddressPomLastId():void
public getAddressPosLastId():void

ContactElasticSearchScrollRepositoryContract

kommt noch

Namespace

Plenty\Modules\Account\Contact\Search7\Contracts

Methods
public hasNext():bool
public setNumberOfDocumentsPerShard($size):void
Parameters

Name

Type

Description

$size

int

public clear():void
public setIndex($index):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Parameters

Name

Type

Description

$index

IndexInterface

public addSearch($search):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Parameters

Name

Type

Description

$search

public execute():array

ContactElasticSearchSearchRepositoryContract

Contract for search contacts

Namespace

Plenty\Modules\Account\Contact\Search7\Contracts

Methods
Return type: FilteredPaginatedResult

Search contacts with the given filters.

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$filters

array

$sortBy

string

$sortOrder

string

$with

string

public searchAfter($itemsPerPage = 50, $filters = [], $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;, $with = &quot;&quot;, $searchAfterKey = [], $withResult = true):array

Search contacts with the given filters.

Parameters

Name

Type

Description

$itemsPerPage

int

$filters

array

$sortBy

string

$sortOrder

string

$with

string

$searchAfterKey

array

$withResult

bool

IndexContactRepositoryContract

The contract for the search repository

Namespace

Plenty\Modules\Account\Contact\Search7\Contracts

Methods
public index($contactId):array

Index a contact

Parameters

Name

Type

Description

$contactId

int

public delete($contactIds):array

Delete contact from index

Parameters

Name

Type

Description

$contactIds

array

public bulk($contactIds):array
Parameters

Name

Type

Description

$contactIds

array

public setOutput($output):void
Parameters

Name

Type

Description

$output

OutputInterface

public execute():void
public getElasticSearchVersion():float

Services

ES7StatusService

Elastic Search 7 status checker service

Namespace

Plenty\Modules\Account\Contact\Search7\Services

Methods
public static isHostSet():void
public static isIndexFilled():void
public static isIndexAvailable():void
public static isIndexReadyToBeUsed():void

Account

Contracts

AccountContactRelationRepositoryContract

  • The AccountContactRelationRepositoryContract is the interface for the account contact relation repository.

  • This interface allows to find and delete an account contact relation. *

Namespace

Plenty\Modules\Account\Contracts

Methods
public createCompanyContactRelation($companyContactRelation):Plenty\Modules\Account\Models\AccountContactRelation
Return type: AccountContactRelation

Creates a company contact relation. The ID of the account contact relation must be specified.

Parameters

Name

Type

Description

$companyContactRelation

array

public findAccountContactRelationById($accountContactRelation):Plenty\Modules\Account\Models\AccountContactRelation
Return type: AccountContactRelation

Gets a company contact relation. The ID of the account contact relation must be specified.

Parameters

Name

Type

Description

$accountContactRelation

int

The ID of the company contact relation

public deleteAccountContactRelation($accountContactRelationId):bool

Deletes a company contact relation. The ID of the account contact relation must be specified.

Parameters

Name

Type

Description

$accountContactRelationId

int

The ID of the company contact relation

public updateAccountContactRelationIsPrimary($accountContactRelationId, $isPrimary, $data = []):Plenty\Modules\Account\Models\AccountContactRelation
Return type: AccountContactRelation

Update an account contact relation isPrimary field. The ID of the account contact relation must be specified.

Parameters

Name

Type

Description

$accountContactRelationId

int

$isPrimary

bool

$data

array

AccountRepositoryContract

The AccountRepositoryContract is the interface for the account repository. * This interface allows to list, get, create, update and delete accounts. * An account contains company-related data. It is also possible to list all contacts of an account.

Namespace

Plenty\Modules\Account\Contracts

Methods
public createAccount($data):Plenty\Modules\Account\Models\Account
Return type: Account

Creates a new company and returns it. An account is equivalent to a company.

Parameters

Name

Type

Description

$data

array

The company data as associative array

public updateAccount($data, $accountId):Plenty\Modules\Account\Models\Account
Return type: Account

Updates an existing company and returns it. The ID of the company must be specified.

Parameters

Name

Type

Description

$data

array

The company data as associative array

$accountId

int

The ID of the company

public deleteAccount($accountId):bool

Deletes a company. The ID of the company must be specified. Returns true if deletion was successful.

Parameters

Name

Type

Description

$accountId

int

The ID of the company

public findAccountById($accountId, $with = []):Plenty\Modules\Account\Models\Account
Return type: Account

Gets a company. The ID of the company must be specified. An account is equivalent to a company.

Parameters

Name

Type

Description

$accountId

int

The ID of the company

$with

array

Optional: The relationships that should be eager loaded. (example ['contacts']).

public findAccountsByIds($accountIds):void

Gets multiple accounts. The IDs of the accounts must be specified.

Parameters

Name

Type

Description

$accountIds

array

public allAccounts($columns = [], $perPage = 50, $with = []):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of all companies. An account is equivalent to a company.

Parameters

Name

Type

Description

$columns

array

Optional: The columns to retrieve (Default: '[*]').

$perPage

int

Optional: The number of objects per page (Default: 50).

$with

array

Optional: The relationships that should be eager loaded. (example ['contacts']).

public allAccountsPaginated($columns = [], $page = 1, $itemsPerPage = 50, $with = [], $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;, $filters = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Returns a collection of all companies. An account is equivalent to a company.

Parameters

Name

Type

Description

$columns

array

Optional: The columns to retrieve (Default: '[*]').

$page

int

Optional: The number of the page (Default: 1).

$itemsPerPage

int

Optional: The number of objects per page (Default: 50).

$with

array

Optional: The relationships that should be eager loaded.

$sortBy

string

Optional: The field to be sorted (Default: id).

$sortOrder

string

Optional: The order for sorting (Default: desc).

$filters

array

Filter that restrict the search result

public getContactsOfAccount($accountId):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of contacts that belong to the company. An account is equivalent to a company.

Parameters

Name

Type

Description

$accountId

int

The ID of the company

public getContactsOfAccountPaginated($accountId, $page = 1, $itemsPerPage = 25, $sortBy = &quot;id&quot;, $sortOrder = &quot;asc&quot;):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of contacts that belong to the company. An account is equivalent to a company.

Parameters

Name

Type

Description

$accountId

int

The ID of the company

$page

int

Optional: The number of the page (Default: 1)

$itemsPerPage

int

Optional: The number of objects per page (Default: 25)

$sortBy

string

Optional: The contact field to be sorted (Default: id).

$sortOrder

string

Optional: The order for sorting (Default: asc).

public saveAccount($data = []):void

Creates a new or updates an existing company. An account is equivalent to a company.

Parameters

Name

Type

Description

$data

array

The company data as associative array

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.

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.

Events

FrontendUpdateCustomerSettings

frontend customer settings event

Namespace

Plenty\Modules\Account\Events

Methods
public getDeliveryCountryId():int
public setDeliveryCountryId($deliveryCountryId):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$deliveryCountryId

int

public getShowNetPrice():bool
public setShowNetPrice($showNetPrice):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$showNetPrice

bool

public getEbaySellerAccount():string
public setEbaySellerAccount($ebaySellerAccount):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$ebaySellerAccount

string

public getAccountContactSign():string
public setAccountContactSign($accountContactSign):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$accountContactSign

string

public getAccountContactClassId():int
public setAccountContactClassId($accountContactClassId):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$accountContactClassId

int

public getSalesAgent():string
public setSalesAgent($salesAgent):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$salesAgent

string

public getAccountContractClassId():int
public setAccountContractClassId($accountContractClassId):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Parameters

Name

Type

Description

$accountContractClassId

int

NewsletterRecipientCreatedEvent

This event will be triggered, after a recipient was created.

Namespace

Plenty\Modules\Account\Events

Methods
public getRecipient():Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient

returns recipient.

NewsletterRecipientDeletedEvent

This event will be triggered, after a recipient was deleted.

Namespace

Plenty\Modules\Account\Events

Methods
public getRecipient():Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient

returns recipient.

NewsletterRecipientMovedToNewFolderEvent

This event will be triggered, after a recipient was moved to a new folder.

Namespace

Plenty\Modules\Account\Events

Methods
public getOldFolder():int

returns old folder id.

public getRecipient():Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient

returns recipient.

Models

Account

the account model.

Namespace

Plenty\Modules\Account\Models

Properties
Name Type Description

id

int

The ID of the account

number

string

The number of the account

companyName

string

The company name

taxIdNumber

string

The ID of the tax number

valuta

int

The valuta date in days specified for the account

discountDays

int

The early payment discount period in days specified for the account

discountPercent

float

The early payment discount in percent specified for the account

timeForPaymentAllowedDays

int

The payment due date in days specified for the account

salesRepresentativeContactId

int

The contact ID of the sales representative

userId

int

The ID of the account owner

deliveryTime

int

The delivery time for the supplier

dealerMinOrderValue

float

The minimum order value for the supplier

supplierCurrency

string

The currency used by a supplier

createdAt

The time the account was created as unix timestamp

updatedAt

The time the account was last updated as unix timestamp

contacts

Collection

A list of contacts that belong to the account

contactRelations

Collection

A list with contact relations to the account

salesRepresentativeRegions

Collection

A list with sales representative regions related to the account

Methods
public toArray()

Returns this model as an array.

AccountContactRelation

account contact relation model

Namespace

Plenty\Modules\Account\Models

Properties
Name Type Description

id

int

The ID of the account contact relation

accountId

int

The ID of the foreign key account

contactId

int

The ID of the foreign key contact

account

Account

The account of the relation

contact

Contact

The contact of the relation

accountContactSalesRepresentativeRelations

Collection

Methods
public toArray()

Returns this model as an array.

SalesRepresentativeRegion

Sales representative region model

Namespace

Plenty\Modules\Account\Models

Properties
Name Type Description

id

int

The ID of the account contact sales representative relation

accountContactRelationId

int

The ID of the foreign key account contact relation

postalCodeArea

string

countryId

int

createdAt

Carbon

updatedAt

Carbon

contacts

accounts

accountContactRelation

AccountContactRelation

Methods
public toArray()

Returns this model as an array.

Hubspot

Contracts

HubspotStatusRepositoryContract

The HubspotStatusRepositoryContract is the interface for the hubspotStatus repository. * This interface allows to list, get, create hubspotStatus.

Namespace

Plenty\Modules\Account\Hubspot\Contracts

Methods
public saveHubspotStatus($data):bool

Adds a new hubspotStatus entry

Parameters

Name

Type

Description

$data

array

The hubspotStatus data as array.

Models

HubspotStatus

The hubspot status model.

Namespace

Plenty\Modules\Account\Hubspot\Models

Referenceable

id

Properties
Name Type Description

id

int

The PK ID

createdAt

The date the hubspot status was created

updatedAt

The date the hubspot status was last updated

plentyContactId

int

The plenty contact ID

hubspotContactId

int

The hubspot contact ID

plentyCompanyId

int

The plenty company ID

hubspotCompanyId

int

The hubspot company ID

operation

string

The operation that took place: * <ul> <li> create_plenty_contact</li> <li> update_plenty_contact</li> <li> create_plenty_company</li> <li> update_plenty_company</li> <li> create_plenty_contact_company_relation</li> <li> create_hubspot_contact</li> <li> update_hubspot_contact</li> <li> create_hubspot_company</li> <li> update_hubspot_company</li> <li> create_hubspot_contact_company_relation</li> </ul>

Methods
public toArray()

Returns this model as an array.

Job

Contracts

JobRepositoryContract

The JobRepositoryContract is the interface for the job repository. * This interface allows to list, get, create, update and delete jobs.

Namespace

Plenty\Modules\Account\Job\Contracts

Methods
public createJob($jobData):Plenty\Modules\Account\Job\Models\Job
Return type: Job

Create a job with given data

Parameters

Name

Type

Description

$jobData

array

public deleteJob($jobId):bool

Delete a job by a given id. The ID of the job must be specified.

Parameters

Name

Type

Description

$jobId

int

The ID of the job. Returns true if deletion was successful. Returns false if deletion was not successful.

public updateJob($jobData, $jobId):Plenty\Modules\Account\Job\Models\Job
Return type: Job

Update a job names with given data. The id of the job must be specified. Returns the job.

Parameters

Name

Type

Description

$jobData

array

The job data as associative array

$jobId

int

The ID of the job

public getJob($jobId):Plenty\Modules\Account\Job\Models\Job
Return type: Job

Get single job by id. The ID of the job must be specified.

Parameters

Name

Type

Description

$jobId

int

public getJobsList($page = 1, $itemsPerPage = 50, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;, $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Get paginated list of jobs

Parameters

Name

Type

Description

$page

int

The page of results to search for [optional, default = 1]

$itemsPerPage

int

The number of items to list per page [optional, default = 50]

$sortBy

string

$sortOrder

string

$filters

array

Filter that restrict the search result. Filter can be for name or jobId

$with

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.

Models

Job

The job model.

Namespace

Plenty\Modules\Account\Job\Models

Referenceable

id

Properties
Name Type Description

id

int

The ID of the job

position

int

The position ID

createdAt

The date the contact was created

updatedAt

The date the contact was last updated

Methods
public toArray()

Returns this model as an array.

JobName

The job name model.

Namespace

Plenty\Modules\Account\Job\Models

Referenceable

id

Properties
Name Type Description

id

int

The ID of the job name

positionId

int

The job ID

lang

string

The language of the job name

name

string

The name of the job

createdAt

The date the contact was created

updatedAt

The date the contact was last updated

Methods
public toArray()

Returns this model as an array.

Newsletter

Contracts

NewsletterRepositoryContract

The NewsletterRepositoryContract is the interface for the newsletter repository. This interface allows to assign email addresses of recipients to email folders. Depending on the settings selected for each email folder, different newsletters can be sent to different target groups.

Namespace

Plenty\Modules\Account\Newsletter\Contracts

Methods
public createEntry($data = []):Plenty\Modules\Account\Newsletter\Models\Entry
Return type: Entry

Creates an entry.

Parameters

Name

Type

Description

$data

array

public createRecipient($data = []):array

Creates a recipient for an existing folder.

Parameters

Name

Type

Description

$data

array

public createFolder($data = []):Plenty\Modules\Account\Newsletter\Models\Folder
Return type: Folder

Creates a folder.

Parameters

Name

Type

Description

$data

array

public deleteAllEntries():array

Deletes all entries.

public deleteAllFolders():array

Deletes all folders.

public deleteAllRecipients():array

Deletes all recipients.

public deleteEntryById($entryId):Plenty\Modules\Account\Newsletter\Models\Entry
Return type: Entry

Deletes an entry. The ID of the entry must be specified.

Parameters

Name

Type

Description

$entryId

int

The ID of the entry

public deleteFolderById($folderId):Plenty\Modules\Account\Newsletter\Models\Folder
Return type: Folder

Deletes a folder. The ID of the folder must be specified.

Parameters

Name

Type

Description

$folderId

int

The ID of the folder

public deleteRecipientById($recipientId):Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient

Deletes a recipient. The ID of the recipient must be specified.

Parameters

Name

Type

Description

$recipientId

int

The ID of the recipient

public listAllEntries():array

Lists all newsletter entries.

public listAllFolders():array

Lists all newsletter folders.

public listAllRecipients($data = []):array

Lists all recipients.

Parameters

Name

Type

Description

$data

array

public getRecipientsByEMail($email):array

Returns recipients by the email address.

Parameters

Name

Type

Description

$email

string

The email address of the recipient

public listRecipients($columns, $page, $itemsPerPage, $filter, $with):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Lists all recipients.

Parameters

Name

Type

Description

$columns

array

The columns to retrieve

$page

int

The page of results to search for

$itemsPerPage

int

The number of items to list per page

$filter

array

Filter that restricts the search result

$with

array

An array with child instances to be loaded

public listEntryById($entryId):Plenty\Modules\Account\Newsletter\Models\Entry
Return type: Entry

Gets details by the entry ID.

Parameters

Name

Type

Description

$entryId

int

The ID of the entry

public listFolderById($folderId):Plenty\Modules\Account\Newsletter\Models\Folder
Return type: Folder

Gets details by the folder ID.

Parameters

Name

Type

Description

$folderId

int

The ID of the folder

public listRecipientById($recipientId):Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient

Gets details by the recipient ID.

Parameters

Name

Type

Description

$recipientId

int

The ID of the recipient

public updateEntryById($entryId, $data = []):Plenty\Modules\Account\Newsletter\Models\Entry
Return type: Entry

Updates an existing entry. The ID of the entry must be specified.

Parameters

Name

Type

Description

$entryId

int

The ID of the entry

$data

array

The data as associative array

public updateFolderById($folderId, $data = []):Plenty\Modules\Account\Newsletter\Models\Folder
Return type: Folder

Updates an existing folder. The ID of the folder must be specified.

Parameters

Name

Type

Description

$folderId

int

The ID of the folder

$data

array

The data as associative array

public updateRecipientById($recipientId, $data = []):Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient

Updates an existing recipient. The ID of the recipient must be specified.

Parameters

Name

Type

Description

$recipientId

int

The ID of the recipient

$data

array

The data as associative array

public addToNewsletterList($email, $forename = &quot;&quot;, $surname = &quot;&quot;, $emailDirIds = []):void
Deprecated!

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

Adds the email address of a contact or an interested party to an email folder for the newsletter list.

Parameters

Name

Type

Description

$email

string

The email address of the contact or interested party who subscribed to the newsletter

$forename

string

The first name of the contact or interested party

$surname

string

The last name of the contact or interested party

$emailDirIds

array

The IDs of the email folders. The email addresses of the contacts and interested parties must be saved in the folders. This will allow to send different newsletters to different target groups.

Models

Entry

The newsletter entry model.

Namespace

Plenty\Modules\Account\Newsletter\Models

Properties
Name Type Description

subject

string

The subject of the newsletter entry

body

string

The body of the newsletter entry

kind

string

The type of the newsletter entry

log

string

The log of the newsletter entry

Methods
public toArray()

Returns this model as an array.

Folder

The newsletter folder model.

Namespace

Plenty\Modules\Account\Newsletter\Models

Properties
Name Type Description

id

int

The ID of the newsletter folder

name

string

The name of the newsletter folder

isDeletable

bool

Flag that indicates if the newsletter folder can be deleted. The folders 'Customers' and 'Interested parties' are available by default and cannot be deleted.

position

int

The position of the newsletter folder

isSelectable

bool

Flag that indicates if the newsletter folder can be selected by customers in the online store. If this is allowed, the folder will be displayed in the My account area of the online store. Customers will then be able to subscribe to the newsletters that are included in this folder.

Methods
public toArray()

Returns this model as an array.

NewsletterEmail

NewsletterEmail

Namespace

Plenty\Modules\Account\Newsletter\Models

Properties
Name Type Description

id

int

The ID of the newsletter email

directory

int

The ID of the directory

customerId

int

The ID of the contact

forename

string

The first name of the contact or interested party

surname

string

The last name of the contact or interested party

email

string

The email address The email address of the contact or interested party

gender

string

The gender of the contact or interested party

birthday

string

The birthday of the contact or interested party

timestamp

int

The timestamp when the newsletter email was sent to the contact or interested party

templateLang

string

The language of the newsletter’s email template

confirmedTimestamp

int

The timestamp when the contact or interested party confirmed the newsletter subscription

confirmAuthString

string

The key that is automatically generated by the system. This key recognises the user regardless whether the user is logged in to the system and will then set the confirmation timestamp.

ipAddress

string

The ip address of the client

Methods
public toArray()

Returns this model as an array.

Recipient

The newsletter recipient

Namespace

Plenty\Modules\Account\Newsletter\Models

Properties
Name Type Description

id

int

The ID of the newsletter recipient

folderId

int

The ID of the newsletter folder

contactId

int

The ID of the contact

firstName

string

The first name of the recipient

lastName

string

The last name of the recipient

email

string

The email address of the recipient

gender

string

The gender of the recipient

birthday

string

The birthday of the recipient

timestamp

int

The timestamp when the newsletter email was sent to the recipient

templateLang

string

The language of the newsletter email template

confirmedTimestamp

int

The timestamp when the recipient confirmed the newsletter subscription

confirmAuthString

string

The key that is automatically generated by the system. This key recognises the user regardless whether the user is logged in to the system and will then set the confirmation timestamp.

ipAddress

string

The IP address from where the customer has confirmed the newsletter

confirmationURL

string

The url with which the customer has confirmed the newsletter

Methods
public toArray()

Returns this model as an array.

OrderSummary

Contracts

OrderSummaryRepositoryContract

The OrderSummaryRepositoryContract is the interface for the order summary repository. This interface allows to list, get, update, create and delete order summaries.

Namespace

Plenty\Modules\Account\OrderSummary\Contracts

Methods
public findOrderSummaryById($orderSummaryId):Plenty\Modules\Account\OrderSummary\Models\OrderSummary
Return type: OrderSummary

Gets an order summary. The ID of the order summary must be specified.

Parameters

Name

Type

Description

$orderSummaryId

int

The ID of the order summary

public updateOrderSummary($data, $orderSummaryId):Plenty\Modules\Account\OrderSummary\Models\OrderSummary
Return type: OrderSummary

Updates an order summary. The ID of the order summary must be specified.

Parameters

Name

Type

Description

$data

array

The order summary data as associative array

$orderSummaryId

int

The ID of the order summary

public createOrderSummary($data):Plenty\Modules\Account\OrderSummary\Models\OrderSummary
Return type: OrderSummary

Creates an order summary.

Parameters

Name

Type

Description

$data

array

The order summary data as associative array

public deleteOrderSummary($orderSummaryId):bool

Deletes an order summary. The ID of the order summary must be specified.

Parameters

Name

Type

Description

$orderSummaryId

int

The ID of the order summary

public allOrderSummaries($columns = [], $perPage = 50):Illuminate\Database\Eloquent\Collection
Return type: Collection

Returns a collection of all order summaries.

Parameters

Name

Type

Description

$columns

array

Optional: The columns to retrieve (Default: '[*]').

$perPage

int

Optional: The number of objects per page (Default: 50).

public findOrderSummaryByContactId($contactId):Plenty\Modules\Account\OrderSummary\Models\OrderSummary
Return type: OrderSummary

Gets an order summary. The ID of the contact must be specified.

Parameters

Name

Type

Description

$contactId

int

The ID of the contact

public findOrderSummaryByAddressId($addressId):Plenty\Modules\Account\OrderSummary\Models\OrderSummary
Return type: OrderSummary

Gets an order summary. The ID of the address must be specified.

Parameters

Name

Type

Description

$addressId

int

The ID of the address

public allUnpaidOrderSummaries($page = 1, $itemsPerPage = 50, $sortBy = &quot;id&quot;, $sortOrder = &quot;desc&quot;):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult

Returns a collection of all unpaid order summaries.

Parameters

Name

Type

Description

$page

int

$itemsPerPage

int

$sortBy

string

$sortOrder

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

OrderSummary

The order summary model.

Namespace

Plenty\Modules\Account\OrderSummary\Models

Properties
Name Type Description

id

int

The ID of the order summary

addressId

int

The address ID of the order summary

contactId

int

The ID of the contact

unpaidOrdersCount

int

The number of unpaid orders

unpaidOrderTotalAmount

float

The total amount of unpaid orders

orderCount

int

The number of all orders of the associated model

createdAt

string

The time the order summary was created as unix timestamp

updatedAt

string

The time the order summary was last updated as unix timestamp

Methods
public toArray()

Returns this model as an array.

OrderSummarySettings

The model of the order summary settings.

Namespace

Plenty\Modules\Account\OrderSummary\Models

Properties
Name Type Description

customerTypeIds

array

customerClassIds

array

Methods
public toArray()

Returns this model as an array.