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.
Name |
Type |
Description |
|
The address data as associative array |
public updateAddressContactRelation($data):array
Updates address contact relations.
Name |
Type |
Description |
|
The data as associative array |
public findAddressContactRelation($addressContactRelationId):Plenty\Modules\Account\Address\Models\AddressContactRelation
Return type: AddressContactRelation
Gets address contact relation by ID.
Name |
Type |
Description |
|
The ID of the address contact relation |
public deleteAddressContactRelation($addressContactRelationId):bool
Deletes an address contact relation.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
Filter that restricts the search result |
|
|
An array with child instances to be loaded |
|
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
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.
Name |
Type |
Description |
|
public updateAddressRelationType($data, $addressRelationTypeId):Plenty\Modules\Account\Address\Models\AddressRelationType
Return type: AddressRelationType
Updates an existing address relation type.
Name |
Type |
Description |
|
The address relation data as associative array |
|
|
public deleteAddressRelationType($addressRelationTypeId):bool
Deletes an address relation type by the given ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the address relation type |
public allAddressRelationTypes($columns = [], $perPage = 50):void
Gets a list of address relation types.
Name |
Type |
Description |
|
The columns to retrieve |
|
|
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.
Name |
Type |
Description |
|
public updateAddressOptionType($data, $addressOptionTypeId):Plenty\Modules\Account\Address\Models\AddressOptionType
Return type: AddressOptionType
Updates an existing address option type.
Name |
Type |
Description |
|
||
|
The ID of the address option type |
public deleteAddressOptionType($addressOptionTypeId):bool
Deletes an address option type by the given ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the address option type |
public allAddressOptionType($columns = [], $perPage = 50):void
Gets a list of address option types.
Name |
Type |
Description |
|
The columns to retrieve |
|
|
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.
Name |
Type |
Description |
|
The address data as associative array |
public updateAddressPosRelation($addressPosRelationId, $data):Plenty\Modules\Account\Address\Models\AddressPosRelation
Return type: AddressPosRelation
Updates an address POS relation.
Name |
Type |
Description |
|
The ID of the address POS relation |
|
|
The data as associative array |
public findAddressPosRelation($addressPosRelationId):Plenty\Modules\Account\Address\Models\AddressPosRelation
Return type: AddressPosRelation
Lists address POS relations.
Name |
Type |
Description |
|
The ID of the address POS relation |
public deleteAddressPosRelation($addressPosRelationId):void
Deletes an address POS relation.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
Filter that restricts the search result |
|
|
An array with child instances to be loaded |
|
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
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.
Name |
Type |
Description |
|
The ID of the address |
|
|
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.
Name |
Type |
Description |
|
The address data as associative array |
|
|
The ID of the address |
public createAddress($data):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Creates an address.
Name |
Type |
Description |
|
The address data as associative array |
public deleteAddress($addressId):bool
Deletes an address. The ID of the address must be specified.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the warehouse |
|
|
The ID of the relation type |
|
|
The columns to retrieve |
|
|
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.
Name |
Type |
Description |
|
The data to save |
public findAddressOptions($addressId, $typeId):Illuminate\Database\Eloquent\Collection
Return type: Collection
Returns a collection of address options of an address.
Name |
Type |
Description |
|
The ID of the address |
|
|
(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.
Name |
Type |
Description |
|
The address option data as associative array. Multiple options are possible. |
|
|
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.
Name |
Type |
Description |
|
The address option data as associative array. Multiple options are possible. |
|
|
The ID of the address |
public deleteAddressOptions($addressId):void
Deletes all address options of an address. The ID of the address must be specified.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The option data as associative array |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The application type |
|
|
The language as ISO 639-1 code (e.g. |
public findAddressDataByAddressId($addressId, $orderIds):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Find address data by address id
Name |
Type |
Description |
|
||
|
public findExistingAddress($addressData):Plenty\Modules\Account\Address\Models\Address
Return type: Address
Find an existing address
Name |
Type |
Description |
|
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
Name | Type | Description |
---|---|---|
id |
The ID of the address |
|
gender |
The gender ("female", "male" or "diverse") |
|
name1 |
The name 1 field (defaults to: company name) |
|
name2 |
The name 2 field (defaults to: first name) |
|
name3 |
The name 3 field (defaults to: last name) |
|
name4 |
The name 4 field (defaults to: c/o) |
|
address1 |
The address 1 field (defaults to: street |
|
'PACKSTATION' |
'POSTFILIALE') |
address2 |
The address 2 field (defaults to: houseNumber |
packstationNo) |
|
address3 |
The address 3 field (defaults to: additional) |
|
address4 |
The address 4 field is currently undefined and can be freely used. |
|
postalCode |
The postcode |
|
town |
The town |
|
countryId |
The ID of the country |
|
stateId |
The ID of the state |
|
readOnly |
Flag that indicates if the data record is read only |
|
companyName |
The company name (alias for name1, <i>read only</i>) |
|
firstName |
The first name (alias for name2, <i>read only</i>) |
|
lastName |
The last name (alias for name3, <i>read only</i>) |
|
careOf |
The c/o (alias for name4, <i>read only</i>) |
|
street |
The street (alias for address1, <i>read only</i>) |
|
houseNumber |
The house number (alias for address2, <i>read only</i>) |
|
additional |
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 |
The taxIdNumber option (alias for option with typeId 1, <i>read only</i>) |
|
externalId |
The externalId option (alias for option with typeId 2, <i>read only</i>) |
|
entryCertificate |
The entryCertificate option (alias for option with typeId 3, <i>read only</i>) |
|
phone |
The phone option (alias for option with typeId 4, <i>read only</i>) |
|
The email option (alias for option with typeId 5, <i>read only</i>) |
||
postident |
The PostIdent option (alias for option with typeId 6, <i>read only</i>) |
|
personalNumber |
The personal number option (alias for option with typeId 7, <i>read only</i>) |
|
fsk |
The age rating option (alias for option with typeId 8, <i>read only</i>) |
|
birthday |
The birthday option (alias for option with typeId 9, <i>read only</i>) |
|
title |
The title option (alias for option with typeId 11, <i>read only</i>) |
|
sessionId |
The fronetnd session ID that was used when the address was created (alias for option with typeId 10, <i>read only</i>) |
|
contactPerson |
The contact person option (alias for option with typeId 12, <i>read only</i>) |
|
externalCustomerId |
The external customer ID option (alias for option with typeId 13, <i>read only</i>) |
|
packstationNo |
The packstation number (alias for houseNumber and address2, <i>read only</i>) |
|
isPackstation |
Flag that indicates if the address is a packstation |
|
isPostfiliale |
Flag that indicates if the address is a postfiliale (post office) |
|
options |
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 |
A collection of contacts that are linked with the address record |
|
orders |
A collection of orders that are linked with the address record |
|
country |
The address country |
|
state |
The address state |
|
contactRelations |
A collection of relations to linked contacts |
|
orderRelations |
A collection of relations to linked orders |
|
warehouseRelations |
A collection of relations to linked warehouses |
|
reorderRelations |
A collection of relations to linked reorders |
|
schedulerRelations |
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
Name | Type | Description |
---|---|---|
id |
The ID of the address contact relation |
|
contactId |
The ID of the contact |
|
typeId |
The type ID of the address. Possible values: <ul> <li>Invoice address = 1</li> <li>Delivery address = 2</li> </ul> |
|
addressId |
The ID of the address |
|
isPrimary |
Flag that indicates if the address is primary |
|
address |
The address of the relation |
|
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
Name | Type | Description |
---|---|---|
id |
The ID of the address option |
|
addressId |
The ID of the address |
|
typeId |
The ID of the address option type |
|
value |
The option value |
|
position |
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 |
The address the option belongs to |
|
type |
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
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
nonErasable |
Flag that indicates if the type can be deleted |
|
names |
A collection of address option type names |
|
options |
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
Name | Type | Description |
---|---|---|
id |
The ID of the address option type name |
|
typeId |
The ID of the address option type |
|
lang |
The language of the name |
|
name |
The name |
|
type |
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
Name | Type | Description |
---|---|---|
id |
The ID of the address order relation |
|
orderId |
The ID of the order |
|
typeId |
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 |
The ID of the address |
|
address |
The address of the relation |
|
order |
The order of the relation |
|
type |
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
Name | Type | Description |
---|---|---|
id |
The ID of the address POS relation |
|
posBaseId |
The ID of the POS base |
|
addressId |
The ID of the address |
|
typeId |
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
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
nonErasable |
Flag that indicates if the type can be deleted |
|
names |
A collection of AddressRelationTypeName objects |
|
application |
The address relation type application |
Methods
public toArray()
Returns this model as an array.
AddressRelationTypeApplication
The AddressRelationTypeApplication model
Namespace
Plenty\Modules\Account\Address\Models
Name | Type | Description |
---|---|---|
id |
The ID of the address relation type name |
|
typeId |
The ID of the relation type |
|
application |
The application type. Allowed values: contact, order, warehouse. |
|
position |
The position for sorting |
|
type |
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
Name | Type | Description |
---|---|---|
id |
The ID of the address relation type name |
|
typeId |
The ID of the relation type |
|
lang |
The language of the name |
|
name |
The name |
|
type |
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
Name | Type | Description |
---|---|---|
id |
The ID of the address order relation |
|
schedulerId |
The ID of the scheduler |
|
typeId |
The ID of the address type |
|
addressId |
The ID of the address |
|
scheduler |
The scheduler of the order |
Methods
public toArray()
Returns this model as an array.
AddressWarehouseRelation
The AddressWarehouseRelation model
Namespace
Plenty\Modules\Account\Address\Models
Name | Type | Description |
---|---|---|
id |
The ID of the address warehouse relation |
|
warehouseId |
The ID of the warehouse |
|
typeId |
The ID of the type |
|
addressId |
The ID of the 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.
Name |
Type |
Description |
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact event |
|
|
public deleteEvent($contactEventId):void
Deletes an entry of the table customer events by the contact event ID.
Name |
Type |
Description |
|
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
Name | Type | Description |
---|---|---|
eventId |
The ID of the event |
|
contactId |
The ID of the contact this event belongs to |
|
userId |
The ID of the user this event belongs to |
|
eventDuration |
The duration of the event in seconds |
|
eventType |
The type of the event. Possible values are call, ticket, email, meeting, webinar, development and design. |
|
orderRowId |
||
eventInfo |
Informational text about the event |
|
billable |
Billable if set to 1 |
|
eventInsertedAt |
The date the event was created at as unix timestamp |
|
eventBilledAt |
The date the event was billed at as unix timestamp |
|
eventProvisionPaidAt |
The date the provision was paid at as unix timestamp |
|
eventCreditValue |
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
The data as associative array |
public sendNewCustomerPassword($contactId):void
Sends a new password to the contact.
Name |
Type |
Description |
|
The ID of the contact |
public unblockUser($contactId):void
Unblocks the user.
Name |
Type |
Description |
|
The ID of the contact |
public getLoginURL($contactId):void
Gets the login URL.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the account |
|
|
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.
Name |
Type |
Description |
|
The account data as associative array |
|
|
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.
Name |
Type |
Description |
|
The account data as associative array |
|
|
The ID of the account |
|
|
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.
Name |
Type |
Description |
|
The ID of the account |
|
|
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
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
The ID of the address type |
|
|
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.
Name |
Type |
Description |
|
The address data as associative array |
|
|
The ID of the contact |
|
|
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.
Name |
Type |
Description |
|
The address data as associative array |
|
|
The ID of the address to update |
|
|
The ID of the contact |
|
|
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.
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the contact |
|
|
The ID of the address type |
public getAddresses($contactId, $typeId = null):array
Gets all addresses for the given contact of the given type.
Name |
Type |
Description |
|
The ID of the contact |
|
|
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.
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the contact |
|
|
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.
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the contact |
|
|
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.
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the contact |
|
|
The ID of the address type |
public hasPrimaryAddress($contactId, $addressTypeId):bool
Returns true if contact has primary address of type
Name |
Type |
Description |
|
The ID of the contact |
|
|
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.
Name |
Type |
Description |
|
The ID of the address |
|
|
The ID of the contact |
|
|
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 = "id", $sortOrder = "desc", $filters = []):array
Returns a collection of all contact classes.
Name |
Type |
Description |
|
Optional: The columns to retrieve (Default: '[*]'). |
|
|
Optional: The number of the page (Default: 1). |
|
|
Optional: The number of objects per page (Default: 50). |
|
|
Optional: The field to be sorted (Default: id). Possible values: any property of ContactClass model |
|
|
Optional: The order for sorting (Default: desc). |
|
|
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
Name |
Type |
Description |
|
public createContactClass($data):Plenty\Modules\Account\Contact\Models\ContactClass
Return type: ContactClass
Creates a new contact class
Name |
Type |
Description |
|
public updateContactClass($data, $contactClassId):Plenty\Modules\Account\Contact\Models\ContactClass
Return type: ContactClass
Updates an existing contact class
Name |
Type |
Description |
|
||
|
public deleteContactClass($contactClassId):void
Deletes a contact class
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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
Name |
Type |
Description |
|
The contnuation token |
|
|
The ID of the contact |
public getDocument($key, $contactId):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject
Get storage object from contact documents
Name |
Type |
Description |
|
The key for the file |
|
|
The ID of the contact |
public getDocumentUrl($key, $contactId):string
Get temporary url for document
Name |
Type |
Description |
|
The key for the file |
|
|
The ID of the contact |
public uploadDocumentLink($link, $title, $contactId):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject
Stores an external link as a document
Name |
Type |
Description |
|
||
|
||
|
public uploadDocument($key, $content, $contactId):Plenty\Modules\Cloud\Storage\Models\StorageObject
Return type: StorageObject
Upload document to contact directory
Name |
Type |
Description |
|
The key for the file |
|
|
The content of the file |
|
|
The ID of the contact |
public deleteDocuments($keyList, $contactId):bool
Delete files from contact documents
Name |
Type |
Description |
|
The array of the key list |
|
|
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
Name |
Type |
Description |
|
The list of the contacts |
|
|
The address label template |
|
|
The email templates |
|
|
The newsletter |
public executeGroupFunctionV2($data = []):array
Name |
Type |
Description |
|
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
Name |
Type |
Description |
|
The ID of the contact |
public hasEmail($emailAddress):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Name |
Type |
Description |
|
The email address of the contact |
public hasBillingAddress($billingAddressId):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Name |
Type |
Description |
|
The ID of the billing address |
public hasDeliveryAddress($deliveryAddressId):Plenty\Modules\Account\Contact\Contracts\ContactLookupRepositoryContract
Return type: ContactLookupRepositoryContract
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
Optional: The ID of the option type (default: 0) |
|
|
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.
Name |
Type |
Description |
|
The option data as associative array |
|
|
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.
Name |
Type |
Description |
|
The option data as associative array |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The option data as associative array |
|
|
The ID of the option |
public deleteContactOption($optionId):bool
Deletes a contact option. The ID of the option must be specified.
Name |
Type |
Description |
|
The ID of the option |
public validateValue($contactId, $typeId, $subTypeId, $value):bool
Name |
Type |
Description |
|
||
|
||
|
||
|
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.
Name |
Type |
Description |
|
public updateContactPosition($data, $contactPositionId):Plenty\Modules\Account\Contact\Models\ContactPosition
Return type: ContactPosition
Updates an existing contact position.
Name |
Type |
Description |
|
||
|
The ID of the contact position |
public deleteContactPosition($contactPositionId):bool
Deletes a contact position by the given ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact position |
public allContactPositions($columns = [], $perPage = 50):void
Gets a list of contact positions.
Name |
Type |
Description |
|
||
|
public createContactDepartment($data):Plenty\Modules\Account\Contact\Models\ContactDepartment
Return type: ContactDepartment
Creates a contact department.
Name |
Type |
Description |
|
public updateContactDepartment($data, $contactDepartmentId):Plenty\Modules\Account\Contact\Models\ContactDepartment
Return type: ContactDepartment
Updates an existing contact department.
Name |
Type |
Description |
|
||
|
The ID of the contact department |
public deleteContactDepartment($contactDepartmentId):bool
Deletes a contact department by the given ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact department |
public allContactDepartments($columns = [], $perPage = 50):void
Gets a list of contact departments.
Name |
Type |
Description |
|
||
|
public createContactOptionType($data):Plenty\Modules\Account\Contact\Models\ContactOptionType
Return type: ContactOptionType
Creates a contact option type.
Name |
Type |
Description |
|
public updateContactOptionType($data, $contactOptionTypeId):Plenty\Modules\Account\Contact\Models\ContactOptionType
Return type: ContactOptionType
Updates an existing contact option type.
Name |
Type |
Description |
|
||
|
The ID of the contact option type |
public deleteContactOptionType($contactOptionTypeId):bool
Deletes a contact option type by the given ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact option type |
public allContactOptionType($columns = [], $perPage = 50, $with = []):void
Gets a list of contact option types.
Name |
Type |
Description |
|
||
|
||
|
public createContactOptionSubType($data):Plenty\Modules\Account\Contact\Models\ContactOptionSubType
Return type: ContactOptionSubType
Creates a contact option sub-type.
Name |
Type |
Description |
|
public updateContactOptionSubType($data, $contactOptionSubTypeId):Plenty\Modules\Account\Contact\Models\ContactOptionSubType
Return type: ContactOptionSubType
Updates an existing contact option sub-type.
Name |
Type |
Description |
|
||
|
The ID of the contact option sub-type |
public deleteContactOptionSubType($contactOptionSubTypeId):bool
Deletes a contact option sub-type by the given ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID contact option sub-type |
public allContactOptionSubType($columns = [], $perPage = 50):void
Gets a list of contact option sub-types.
Name |
Type |
Description |
|
||
|
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
Optional: The columns to retrieve (Default: '[*]') |
|
|
Optional: The number of bank accounts per page (Default: 50) |
|
|
||
|
public getBanksOfContact($contactId, $columns = [], $perPage = 50):array
Gets a collection of bank accounts of a contact. The ID of the contact must be specified.
Name |
Type |
Description |
|
The ID of the contact |
|
|
Optional: The columns to retrieve (Default: '[*]') |
|
|
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.
Name |
Type |
Description |
|
The ID of the order |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The bank data as associative array |
|
|
The ID of the bank account entry |
public deleteContactBank($contactBankId):bool
Deletes a bank account. The ID of the bank account must be specified.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The contact data as associative array |
|
|
The ID of the contact |
public batchUpdate($contactsBatch):bool
Updates batch of contacts and returns them.
Name |
Type |
Description |
|
Return type: Contact
Updates the newsletter date from contact and returns it.
Name |
Type |
Description |
|
public deleteContact($contactId, $checkExistingOrders = null):bool
Deletes a contact. The ID of the contact must be specified.
Name |
Type |
Description |
|
The ID of the contact. Returns |
|
|
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
The relationships that should be eager loaded |
public getContactList($filter = [], $with = [], $columns = [], $page = 1, $itemsPerPage = 50, $sortBy = "id", $sortOrder = "desc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
List contacts
Name |
Type |
Description |
|
Filter that restrict the search result |
|
|
The relationships that should be eager loaded |
|
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
The number of items to list per page |
|
|
||
|
public getContactByOptionValue($value, $typeId, $subTypeId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact
Returns an existing contact by a contact option information.
Name |
Type |
Description |
|
The value of the contact option |
|
|
The type ID of the contact option |
|
|
The sub-type ID of the contact option |
public getContactIdByEmail($email, $filter = []):int
Returns a contact id by email. The email must be specified.
Name |
Type |
Description |
|
||
|
public findContactDataByContactId($contactId):Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact
Returns all contact related data.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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
Name |
Type |
Description |
|
||
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The contact type data as associative array |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the contact type |
public allContactTypes($columns = [], $sortBy = "id", $sortOrder = "asc"):array
Returns a collection of contact types.
Name |
Type |
Description |
|
Optional: The columns to return as an array (Default: '[*]') |
|
|
||
|
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.
Name |
Type |
Description |
|
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
Name |
Type |
Description |
|
public convertGuestByAddressId($addressId):Plenty\Modules\Account\Contact\Models\Contact
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
Optional: The columns to retrieve (Default: '[*]') |
|
|
Optional: The number of bank accounts per page (Default: 50) |
|
|
||
|
public getBanksOfContact($contactId, $columns = [], $perPage = 50):array
Gets a collection of bank accounts of a contact. The ID of the contact must be specified.
Name |
Type |
Description |
|
The ID of the contact |
|
|
Optional: The columns to retrieve (Default: '[*]') |
|
|
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.
Name |
Type |
Description |
|
The ID of the order |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The bank data as associative array |
|
|
The ID of the bank account entry |
public deleteContactBank($contactBankId):bool
Deletes a bank account. The ID of the bank account must be specified.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The data as associative array |
|
|
The ID of the contact |
|
|
The ID of the company |
public find($page = 1, $itemsPerPage = 50, $columns = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Name |
Type |
Description |
|
||
|
||
|
||
|
public getRegionById($accountContactRelationId):Plenty\Modules\Account\Models\SalesRepresentativeRegion
Return type: SalesRepresentativeRegion
Get a region by the ID
Name |
Type |
Description |
|
The ID of the company contact relation |
public deleteRegionById($accountContactRelationId):bool
Delete a region by the ID. An account is equivalent to a company.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the company contact relation |
|
|
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.
Name |
Type |
Description |
|
The ID of the contact |
|
|
The ID of the company |
public getRegionsByContactId($contactId):Illuminate\Support\Collection
Return type: Collection
Get a region by the contact ID
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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
AfterContactUpdate
The event is triggered after a contact has been updated
Namespace
Plenty\Modules\Account\Contact\Events
BeforeContactCreate
The event is triggered before a contact is being created.
Namespace
Plenty\Modules\Account\Contact\Events
Models
Contact
The contact model.
Namespace
Plenty\Modules\Account\Contact\Models
Referenceable
id
Name | Type | Description |
---|---|---|
id |
The ID of the contact |
|
externalId |
The external ID of the contact |
|
number |
The number of the contact (previous customer number) |
|
typeId |
The ID of the contact type |
|
firstName |
The first name of the contact |
|
lastName |
The last name of the contact |
|
fullName |
The full name of the contact. A concatenation of first and last name. |
|
The private email address of the contact |
||
secondaryEmail |
The secondary private email address of the contact |
|
gender |
The gender of the contact ("female", "male" or "diverse") |
|
title |
The title of the contact, e.g. a doctorate |
|
formOfAddress |
The form of address for the contact |
|
newsletterAllowanceAt |
The time the contact registered for the newsletter as unix timestamp |
|
classId |
The ID of the contact class |
|
blocked |
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 |
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 |
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 |
The language of the contact |
|
referrerId |
The origin of the contact |
|
plentyId |
The client (store) that is assigned to the contact |
|
userId |
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 |
The private phone number of the contact |
|
privateFax |
The private fax number of the contact |
|
privateMobile |
The private mobile phone number of the contact |
|
ebayName |
The eBay account name of the contact |
|
paypalEmail |
The email address of the PayPal account of the contact |
|
paypalPayerId |
The PayPal payer id of the contact |
|
klarnaPersonalId |
The Klarna personal id of the contact |
|
dhlPostIdent |
The DHL PostIdent of the contact |
|
forumUsername |
The user name of the contact in the forum |
|
forumGroupId |
The ID of the forum group that is assigned to the contact |
|
singleAccess |
The access type of the contact |
|
contactPerson |
The contact person of the contact |
|
marketplacePartner |
The marketplace partner status of the contact |
|
addresses |
A collection of linked addresses |
|
primaryBillingAddress |
A collection of linked primary billing addresses |
|
deliveryAddresses |
A collection of linked primary delivery addresses |
|
accounts |
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 |
A collection of orders of the contact. Deprecated. |
|
contactOrders |
A collection of orders of the contact |
|
banks |
A collection of bank accounts of the contact |
|
reorders |
A collection of reorders of the contact |
|
orderSchedulers |
A collection of order schedulers of the contact |
|
options |
A collection of options of the contact |
|
salesRepresentativeRegions |
A collection of sales representative regions of the contact |
|
allowedMethodsOfPayment |
A collection of allowed payment methods for the contact.* |
|
type |
The type of the contact |
|
orderSummary |
The order summary of the contact |
|
tagRelationships |
The tag relations of the contact |
|
valuta |
The foreign currency of the contact |
|
discountDays |
The early payment discount period in days specified for the account |
|
discountPercent |
The early payment discount in percent specified for the account |
|
timeForPaymentAllowedDays |
The payment due date in days specified for the account |
|
salesRepresentativeContactId |
The salesRepresentative ID of the contact |
|
anonymizeAt |
The date at which the contact will be anonymized. |
|
isLead |
Defines if contact is a lead. |
|
leadStatusKey |
The current lead status key |
|
inLeadStatusSince |
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 |
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
Name | Type | Description |
---|---|---|
id |
The ID of the payment method allowed for the contact |
|
contactId |
The ID of the contact |
|
methodOfPaymentId |
The ID of the payment method |
|
allowed |
Allowed payment method for the contact. Possible values are: <ul> <li>0 = not allowed</li> <li>1 = allowed</li> </ul> |
|
createdAt |
Timestamp when the payment method was created |
|
updatedAt |
Timestamp when the payment method was last updated |
|
isPaymentActive |
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
Name | Type | Description |
---|---|---|
id |
The ID of the bank account |
|
contactId |
The ID of the contact the bank account belongs to |
|
orderId |
The ID of the order the bank account belongs to |
|
accountOwner |
The owner of the bank account |
|
bankName |
The name of the bank |
|
bankAddress |
The address of the bank |
|
bankPostalCodeTown |
The postcode and town of the bank |
|
bankCountry |
The country of the bank |
|
iban |
The IBAN of the bank account |
|
bic |
The BIC of the bank account |
|
accountNumber |
The account number of the bank account |
|
sortCode |
The sort code of the bank account |
|
lastUpdateBy |
The source of the last change (possible values: |
|
directDebitMandateAvailable |
Flag that indicates if a direct debit mandate is available |
|
directDebitMandateAt |
The time the direct debit mandate was created as unix timestamp |
|
directDebitMethod |
The direct debit method (possible values: |
|
directDebitType |
The direct debit type (possible values: |
|
paymentMethod |
The payment method (possible values: |
|
createdAt |
The time the bank account was created as unix timestamp |
|
updatedAt |
The time the bank account was last updated as unix timestamp |
|
contact |
The contact the bank account belongs to |
|
order |
The order the bank account belongs to |
Methods
public toArray()
Returns this model as an array.
ContactBatchUpdateEntry
The ContactBatchUpdateEntry model of the contact.
Namespace
Plenty\Modules\Account\Contact\Models
Name | Type | Description |
---|---|---|
contactId |
||
typeId |
||
classId |
||
userId |
||
firstName |
||
lastName |
||
lang |
||
plentyId |
||
rating |
||
tagsIds |
Methods
public toArray()
Returns this model as an array.
ContactClass
The contact class model.
Namespace
Plenty\Modules\Account\Contact\Models
Name | Type | Description |
---|---|---|
id |
The ID of the contact class |
|
name |
||
priceColumn |
||
showPrice |
Flag to display price in the online store as Gross(1) or Net(2) |
|
discountType |
||
position |
||
pqsQuantity1 |
||
pqsDiscount1 |
||
pqsQuantity2 |
||
pqsDiscount2 |
||
pqsQuantity3 |
||
pqsDiscount3 |
||
pqsQuantity4 |
||
pqsDiscount4 |
||
pqsQuantity5 |
||
pqsDiscount5 |
||
pqsQuantity6 |
||
pqsDiscount6 |
||
pqsQuantity7 |
||
pqsDiscount7 |
||
pqsQuantity8 |
||
pqsDiscount8 |
||
pqsQuantity9 |
||
pqsDiscount9 |
||
pqsQuantity10 |
||
pqsDiscount10 |
||
pnsQuantity1 |
||
pnsDiscount1 |
||
pnsQuantity2 |
||
pnsDiscount2 |
||
pnsQuantity3 |
||
pnsDiscount3 |
||
pnsQuantity4 |
||
pnsDiscount4 |
||
pnsQuantity5 |
||
pnsDiscount5 |
||
pmsMop |
||
pmsDiscount |
||
paqsDiscount |
||
payableDueWithin |
||
minQuantity |
||
dontUseItemPriceRebates |
||
customerId |
||
allowedMops |
The list of allowed payment methods |
|
pdwQuantity1 |
||
pdwDays1 |
||
pdwQuantity2 |
||
pdwDays2 |
||
pdwQuantity3 |
||
pdwDays3 |
||
pdwQuantity4 |
||
pdwDays4 |
||
pdwQuantity5 |
||
pdwDays5 |
||
customerGroupsPaymentNotice |
||
earlyPaymentDiscount |
||
earlyPaymentDiscountDays |
||
valuta |
||
manualDiscount |
||
allowedMethodOfPaymentIdsList |
Methods
public toArray()
Returns this model as an array.
ContactDepartment
contact department model
Namespace
Plenty\Modules\Account\Contact\Models
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
names |
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
Name | Type | Description |
---|---|---|
id |
The ID of the contact department name |
|
departmentId |
The ID of the department |
|
lang |
The language |
|
name |
The name |
Methods
public toArray()
Returns this model as an array.
ContactOption
The contact options model.
Namespace
Plenty\Modules\Account\Contact\Models
Name | Type | Description |
---|---|---|
id |
The ID of the contact option |
|
contactId |
The ID of the contact the option belongs to |
|
typeId |
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 |
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 |
The value of the option. Depends on the type/sub-type. |
|
priority |
The priority for sorting |
|
createdAt |
The time the option was created as unix timestamp |
|
updatedAt |
The time the option was last updated as unix timestamp |
|
contact |
The contact the option belongs to |
|
type |
The type of the option |
|
subType |
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
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
nonErasable |
Flag that indicates if the option sub-type can be deleted |
|
names |
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
Name | Type | Description |
---|---|---|
id |
The ID of the contact option sub type name entry |
|
subTypeId |
The ID of the option sub-type the name entry belongs to |
|
lang |
lang The language of the sub-type name |
|
name |
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
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
nonErasable |
Flag that indicates if the option type can be deleted |
|
names |
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
Name | Type | Description |
---|---|---|
id |
The ID of the contact option type name |
|
typeId |
The ID of the option type the name belongs to |
|
lang |
The language of the option type name |
|
name |
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
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
names |
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
Name | Type | Description |
---|---|---|
id |
The ID of the contact position name |
|
positionId |
The ID of the position |
|
lang |
The language |
|
name |
The name |
Methods
public toArray()
Returns this model as an array.
ContactType
The ContactType model
Namespace
Plenty\Modules\Account\Contact\Models
Name | Type | Description |
---|---|---|
id |
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 |
The position for sorting |
|
nonErasable |
Flag that indicates if the type can be deleted |
|
names |
A collection of contact type names in different languages |
|
contacts |
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
Name | Type | Description |
---|---|---|
id |
The ID of the contact type name |
|
typeId |
The contact type ID. See also {@link ContactType::id}. |
|
lang |
The language ot the contact type name |
|
name |
The contact type name |
Methods
public toArray()
Returns this model as an array.
Search
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
Name |
Type |
Description |
|
public getContactLastId():void
public setAddressPomLastId($lastId):void
Name |
Type |
Description |
|
public setAddressPosLastId($lastId):void
Name |
Type |
Description |
|
public getAddressPomLastId():void
public getAddressPosLastId():void
ContactElasticSearchScrollRepositoryContract
kommt noch
Namespace
Plenty\Modules\Account\Contact\Search\Contracts
Methods
public hasNext():bool
public setNumberOfDocumentsPerShard($size):void
Name |
Type |
Description |
|
public clear():void
public setIndex($index):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Name |
Type |
Description |
|
public addSearch($search):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Name |
Type |
Description |
|
public execute():array
ContactElasticSearchSearchRepositoryContract
Contract for search contacts
Namespace
Plenty\Modules\Account\Contact\Search\Contracts
Methods
public search($page = 1, $itemsPerPage = 50, $filters = [], $sortBy = "contactId", $sortOrder = "desc", $with = ""):Plenty\Repositories\Models\FilteredPaginatedResult
IndexContactRepositoryContract
The contract for the search repository
Namespace
Plenty\Modules\Account\Contact\Search\Contracts
Methods
public index($contactId):array
Index a contact
Name |
Type |
Description |
|
public delete($contactIds):array
Delete contact from index
Name |
Type |
Description |
|
public bulk($contactIds):array
Name |
Type |
Description |
|
public setOutput($output):void
Name |
Type |
Description |
|
public execute():void
public getElasticSearchVersion():float
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
Name |
Type |
Description |
|
public getContactLastId():void
public setAddressPomLastId($lastId):void
Name |
Type |
Description |
|
public setAddressPosLastId($lastId):void
Name |
Type |
Description |
|
public getAddressPomLastId():void
public getAddressPosLastId():void
ContactElasticSearchScrollRepositoryContract
kommt noch
Namespace
Plenty\Modules\Account\Contact\Search7\Contracts
Methods
public hasNext():bool
public setNumberOfDocumentsPerShard($size):void
Name |
Type |
Description |
|
public clear():void
public setIndex($index):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Name |
Type |
Description |
|
public addSearch($search):Plenty\Modules\Cloud\ElasticSearch\Contracts\ElasticSearchSearchRepositoryContract
Return type: ElasticSearchSearchRepositoryContract
Name |
Type |
Description |
|
public execute():array
ContactElasticSearchSearchRepositoryContract
Contract for search contacts
Namespace
Plenty\Modules\Account\Contact\Search7\Contracts
Methods
public search($page = 1, $itemsPerPage = 50, $filters = [], $sortBy = "contactId", $sortOrder = "desc", $with = "", $returnAsArray = true):Plenty\Repositories\Models\FilteredPaginatedResult
Return type: FilteredPaginatedResult
Search contacts with the given filters.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
public searchAfter($itemsPerPage = 50, $filters = [], $sortBy = "id", $sortOrder = "desc", $with = "", $searchAfterKey = [], $withResult = true, $returnAsArray = true):array
Search contacts with the given filters.
Name |
Type |
Description |
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
IndexContactRepositoryContract
The contract for the search repository
Namespace
Plenty\Modules\Account\Contact\Search7\Contracts
Methods
public index($contactId):array
Index a contact
Name |
Type |
Description |
|
public delete($contactIds):array
Delete contact from index
Name |
Type |
Description |
|
public bulk($contactIds):array
Name |
Type |
Description |
|
public setOutput($output):void
Name |
Type |
Description |
|
public execute():void
public getElasticSearchVersion():float
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
||
|
||
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The company data as associative array |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the company |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
Optional: The columns to retrieve (Default: '[*]'). |
|
|
Optional: The number of objects per page (Default: 50). |
|
|
Optional: The relationships that should be eager loaded. (example ['contacts']). |
public allAccountsPaginated($columns = [], $page = 1, $itemsPerPage = 50, $with = [], $sortBy = "id", $sortOrder = "desc", $filters = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Returns a collection of all companies. An account is equivalent to a company.
Name |
Type |
Description |
|
Optional: The columns to retrieve (Default: '[*]'). |
|
|
Optional: The number of the page (Default: 1). |
|
|
Optional: The number of objects per page (Default: 50). |
|
|
Optional: The relationships that should be eager loaded. |
|
|
Optional: The field to be sorted (Default: id). |
|
|
Optional: The order for sorting (Default: desc). |
|
|
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.
Name |
Type |
Description |
|
The ID of the company |
public getContactsOfAccountPaginated($accountId, $page = 1, $itemsPerPage = 25, $sortBy = "id", $sortOrder = "asc"):Illuminate\Database\Eloquent\Collection
Return type: Collection
Returns a collection of contacts that belong to the company. An account is equivalent to a company.
Name |
Type |
Description |
|
The ID of the company |
|
|
Optional: The number of the page (Default: 1) |
|
|
Optional: The number of objects per page (Default: 25) |
|
|
Optional: The contact field to be sorted (Default: id). |
|
|
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.
Name |
Type |
Description |
|
The company data as associative array |
public setFilters($filters = []):void
Sets the filter array.
Name |
Type |
Description |
|
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
Name |
Type |
Description |
|
public getShowNetPrice():bool
public setShowNetPrice($showNetPrice):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Name |
Type |
Description |
|
public getEbaySellerAccount():string
public setEbaySellerAccount($ebaySellerAccount):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Name |
Type |
Description |
|
public getAccountContactSign():string
public setAccountContactSign($accountContactSign):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Name |
Type |
Description |
|
public getAccountContactClassId():int
public setAccountContactClassId($accountContactClassId):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Name |
Type |
Description |
|
public getSalesAgent():string
public setSalesAgent($salesAgent):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Name |
Type |
Description |
|
public getAccountContractClassId():int
public setAccountContractClassId($accountContractClassId):Plenty\Modules\Account\Events\FrontendUpdateCustomerSettings
Return type: FrontendUpdateCustomerSettings
Name |
Type |
Description |
|
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
Name | Type | Description |
---|---|---|
id |
The ID of the account |
|
number |
The number of the account |
|
companyName |
The company name |
|
taxIdNumber |
The ID of the tax number |
|
valuta |
The valuta date in days specified for the account |
|
discountDays |
The early payment discount period in days specified for the account |
|
discountPercent |
The early payment discount in percent specified for the account |
|
timeForPaymentAllowedDays |
The payment due date in days specified for the account |
|
salesRepresentativeContactId |
The contact ID of the sales representative |
|
userId |
The ID of the account owner |
|
deliveryTime |
The delivery time for the supplier |
|
dealerMinOrderValue |
The minimum order value for the supplier |
|
supplierCurrency |
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 |
A list of contacts that belong to the account |
|
contactRelations |
A list with contact relations to the account |
|
salesRepresentativeRegions |
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
Name | Type | Description |
---|---|---|
id |
The ID of the account contact relation |
|
accountId |
The ID of the foreign key account |
|
contactId |
The ID of the foreign key contact |
|
account |
The account of the relation |
|
contact |
The contact of the relation |
|
accountContactSalesRepresentativeRelations |
Methods
public toArray()
Returns this model as an array.
SalesRepresentativeRegion
Sales representative region model
Namespace
Plenty\Modules\Account\Models
Name | Type | Description |
---|---|---|
id |
The ID of the account contact sales representative relation |
|
accountContactRelationId |
The ID of the foreign key account contact relation |
|
postalCodeArea |
||
countryId |
||
createdAt |
||
updatedAt |
||
contacts |
||
accounts |
||
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
Name |
Type |
Description |
|
The hubspotStatus data as array. |
Models
HubspotStatus
The hubspot status model.
Namespace
Plenty\Modules\Account\Hubspot\Models
Referenceable
id
Name | Type | Description |
---|---|---|
id |
The PK ID |
|
createdAt |
The date the hubspot status was created |
|
updatedAt |
The date the hubspot status was last updated |
|
plentyContactId |
The plenty contact ID |
|
hubspotContactId |
The hubspot contact ID |
|
plentyCompanyId |
The plenty company ID |
|
hubspotCompanyId |
The hubspot company ID |
|
operation |
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
Name |
Type |
Description |
|
public deleteJob($jobId):bool
Delete a job by a given id. The ID of the job must be specified.
Name |
Type |
Description |
|
The ID of the job. Returns |
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.
Name |
Type |
Description |
|
The job data as associative array |
|
|
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.
Name |
Type |
Description |
|
public getJobsList($page = 1, $itemsPerPage = 50, $sortBy = "id", $sortOrder = "desc", $filters = [], $with = []):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Get paginated list of jobs
Name |
Type |
Description |
|
The page of results to search for [optional, default = 1] |
|
|
The number of items to list per page [optional, default = 50] |
|
|
||
|
||
|
Filter that restrict the search result. Filter can be for name or jobId |
|
|
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.
Name |
Type |
Description |
|
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
Name | Type | Description |
---|---|---|
id |
The ID of the job |
|
position |
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
Name | Type | Description |
---|---|---|
id |
The ID of the job name |
|
positionId |
The job ID |
|
lang |
The language of the job name |
|
name |
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.
Name |
Type |
Description |
|
public createRecipient($data = []):array
Creates a recipient for an existing folder.
Name |
Type |
Description |
|
public createFolder($data = []):Plenty\Modules\Account\Newsletter\Models\Folder
Return type: Folder
Creates a folder.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
public getRecipientsByEMail($email):array
Returns recipients by the email address.
Name |
Type |
Description |
|
The email address of the recipient |
public listRecipients($columns, $page, $itemsPerPage, $filter, $with):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Lists all recipients.
Name |
Type |
Description |
|
The columns to retrieve |
|
|
The page of results to search for |
|
|
The number of items to list per page |
|
|
Filter that restricts the search result |
|
|
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.
Name |
Type |
Description |
|
The ID of the entry |
public listFolderById($folderId):Plenty\Modules\Account\Newsletter\Models\Folder
Return type: Folder
Gets details by the folder ID.
Name |
Type |
Description |
|
The ID of the folder |
public listRecipientById($recipientId):Plenty\Modules\Account\Newsletter\Models\Recipient
Return type: Recipient
Gets details by the recipient ID.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the entry |
|
|
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.
Name |
Type |
Description |
|
The ID of the folder |
|
|
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.
Name |
Type |
Description |
|
The ID of the recipient |
|
|
The data as associative array |
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.
Name |
Type |
Description |
|
The email address of the contact or interested party who subscribed to the newsletter |
|
|
The first name of the contact or interested party |
|
|
The last name of the contact or interested party |
|
|
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
Name | Type | Description |
---|---|---|
subject |
The subject of the newsletter entry |
|
body |
The body of the newsletter entry |
|
kind |
The type of the newsletter entry |
|
log |
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
Name | Type | Description |
---|---|---|
id |
The ID of the newsletter folder |
|
name |
The name of the newsletter folder |
|
isDeletable |
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 |
The position of the newsletter folder |
|
isSelectable |
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
Name | Type | Description |
---|---|---|
id |
The ID of the newsletter email |
|
directory |
The ID of the directory |
|
customerId |
The ID of the contact |
|
forename |
The first name of the contact or interested party |
|
surname |
The last name of the contact or interested party |
|
The email address The email address of the contact or interested party |
||
gender |
The gender of the contact or interested party |
|
birthday |
The birthday of the contact or interested party |
|
timestamp |
The timestamp when the newsletter email was sent to the contact or interested party |
|
templateLang |
The language of the newsletter’s email template |
|
confirmedTimestamp |
The timestamp when the contact or interested party confirmed the newsletter subscription |
|
confirmAuthString |
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 |
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
Name | Type | Description |
---|---|---|
id |
The ID of the newsletter recipient |
|
folderId |
The ID of the newsletter folder |
|
contactId |
The ID of the contact |
|
firstName |
The first name of the recipient |
|
lastName |
The last name of the recipient |
|
The email address of the recipient |
||
gender |
The gender of the recipient |
|
birthday |
The birthday of the recipient |
|
timestamp |
The timestamp when the newsletter email was sent to the recipient |
|
templateLang |
The language of the newsletter email template |
|
confirmedTimestamp |
The timestamp when the recipient confirmed the newsletter subscription |
|
confirmAuthString |
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 |
The IP address from where the customer has confirmed the newsletter |
|
confirmationURL |
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The order summary data as associative array |
|
|
The ID of the order summary |
public createOrderSummary($data):Plenty\Modules\Account\OrderSummary\Models\OrderSummary
Return type: OrderSummary
Creates an order summary.
Name |
Type |
Description |
|
The order summary data as associative array |
public deleteOrderSummary($orderSummaryId):bool
Deletes an order summary. The ID of the order summary must be specified.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
Optional: The columns to retrieve (Default: '[*]'). |
|
|
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.
Name |
Type |
Description |
|
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.
Name |
Type |
Description |
|
The ID of the address |
public allUnpaidOrderSummaries($page = 1, $itemsPerPage = 50, $sortBy = "id", $sortOrder = "desc"):Plenty\Repositories\Models\PaginatedResult
Return type: PaginatedResult
Returns a collection of all unpaid order summaries.
Name |
Type |
Description |
|
||
|
||
|
||
|
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.
Name |
Type |
Description |
|
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
Name | Type | Description |
---|---|---|
id |
The ID of the order summary |
|
addressId |
The address ID of the order summary |
|
contactId |
The ID of the contact |
|
unpaidOrdersCount |
The number of unpaid orders |
|
unpaidOrderTotalAmount |
The total amount of unpaid orders |
|
orderCount |
The number of all orders of the associated model |
|
createdAt |
The time the order summary was created as unix timestamp |
|
updatedAt |
The time the order summary was last updated as unix timestamp |
Methods
public toArray()
Returns this model as an array.