The AddressContactRelationRepositoryContract is the interface for the address contact relation repository.
Plenty\Modules\Account\Address\Contracts
public createAddressContactRelation(array $data):array
Creates address contact relations.
array | $data | The address data as associative array |
public updateAddressContactRelation(array $data):array
Updates address contact relations.
array | $data | The data as associative array |
public findAddressContactRelation(int $addressContactRelationId):AddressContactRelation
Gets address contact relation by ID.
int | $addressContactRelationId | The ID of the address contact relation |
public deleteAddressContactRelation(int $addressContactRelationId):bool
Deletes an address contact relation.
int | $addressContactRelationId | The ID of the address contact relation |
public listAddressContactRelations(array $filter = [], array $with = [], array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
Lists address contact relations.
array | $filter | Filter that restricts the search result |
array | $with | An array with child instances to be loaded |
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | 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.
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.
Plenty\Modules\Account\Address\Contracts
public createAddressRelationType(array $data):AddressRelationType
Creates a new address relation type.
array | $data |
public updateAddressRelationType(array $data, int $addressRelationTypeId):AddressRelationType
Updates an existing address relation type.
array | $data | The address relation data as associative array |
int | $addressRelationTypeId |
public deleteAddressRelationType(int $addressRelationTypeId):bool
Deletes an address relation type by the given ID.
int | $addressRelationTypeId | The ID of the address relation type |
public findAddressRelationTypeById(int $addressRelationTypeId):AddressRelationType
Gets an existing address relation type by the given ID.
int | $addressRelationTypeId | The ID of the address relation type |
public allAddressRelationTypes(array $columns = [], int $perPage = 50):void
Gets a list of address relation types.
array | $columns | The columns to retrieve |
int | $perPage | The number of items to list per page |
public createAddressOptionType(array $data):AddressOptionType
Creates an address option type.
array | $data |
public updateAddressOptionType(array $data, int $addressOptionTypeId):AddressOptionType
Updates an existing address option type.
array | $data | |
int | $addressOptionTypeId | The ID of the address option type |
public deleteAddressOptionType(int $addressOptionTypeId):bool
Deletes an address option type by the given ID.
int | $addressOptionTypeId | The ID of the address option type |
public findAddressOptionTypeById(int $addressOptionTypeId):AddressOptionType
Finds an existing address option type by the given ID.
int | $addressOptionTypeId | The ID of the address option type |
public allAddressOptionType(array $columns = [], int $perPage = 50):void
Gets a list of address option types.
array | $columns | The columns to retrieve |
int | $perPage | The number of items to list per page |
The AddressPosRelationRepositoryContract is the interface for the address POS relation repository.
Plenty\Modules\Account\Address\Contracts
public createAddressPosRelation(array $data):AddressPosRelation
Creates an address POS relation.
array | $data | The address data as associative array |
public updateAddressPosRelation(int $addressPosRelationId, array $data):AddressPosRelation
Updates an address POS relation.
int | $addressPosRelationId | The ID of the address POS relation |
array | $data | The data as associative array |
public findAddressPosRelation(int $addressPosRelationId):AddressPosRelation
Lists address POS relations.
int | $addressPosRelationId | The ID of the address POS relation |
public deleteAddressPosRelation(int $addressPosRelationId):void
Deletes an address POS relation.
int | $addressPosRelationId | The ID of the address POS relation |
public listAddressPosRelations(array $filter = [], array $with = [], array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
Lists address POS relations.
array | $filter | Filter that restricts the search result |
array | $with | An array with child instances to be loaded |
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | 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.
The AddressRepositoryContract is the interface for the address repository contract. This interface allows to get, update, create and delete addresses and address options.
Plenty\Modules\Account\Address\Contracts
public findAddressById(int $addressId):Address
Gets an address. The ID of the address must be specified.
int | $addressId | The ID of the address |
public updateAddress(array $data, int $addressId):Address
Updates an address. The ID of the address must be specified.
array | $data | The address data as associative array |
int | $addressId | The ID of the address |
public createAddress(array $data):Address
Creates an address.
array | $data | The address data as associative array |
public deleteAddress(int $addressId):bool
Deletes an address. The ID of the address must be specified.
int | $addressId | The ID of the address |
public getAddressesOfWarehouse(int $warehouseId, int $relationTypeId = null, array $columns = [], int $perPage = 50):Collection
Returns a collection of addresses linked with a warehouse.
int | $warehouseId | The ID of the warehouse |
int | $relationTypeId | The ID of the relation type |
array | $columns | The columns to retrieve |
int | $perPage | The quantity of the result |
public createAddressOfWarehouse(array $data):Address
Creates an address and immediately links it with a warehouse.
array | $data | The data to save |
public findAddressOptions(int $addressId, int $typeId):Collection
Returns a collection of address options of an address.
int | $addressId | The ID of the address |
int | $typeId | (Optional) The ID of an address option type |
public createAddressOptions(array $addressData, int $addressId):Collection
Creates address options for an address and returns all options of the address.
array | $addressData | The address option data as associative array. Multiple options are possible. |
int | $addressId | The ID of the address |
public updateAddressOptions(array $addressData, int $addressId):Collection
Updates address options for an address and returns all options of the address.
array | $addressData | The address option data as associative array. Multiple options are possible. |
int | $addressId | The ID of the address |
public deleteAddressOptions(int $addressId):void
Deletes all address options of an address. The ID of the address must be specified.
int | $addressId | The ID of the address |
public getAddressOption(int $optionId):AddressOption
Gets an address option. The ID of the option must be specified.
int | $optionId | The ID of the address option |
public updateAddressOption(array $optionData, int $optionId):AddressOption
Updates an address option. The ID of the address option must be specified.
array | $optionData | The option data as associative array |
int | $optionId | The ID of the address option |
public deleteAddressOption(int $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.
int | $optionId | The ID of the address option |
public findAddressRelationTypes(string $application, string $lang):Collection
Returns a collection of address relation types by a specific application and language. The collection may be empty.
string | $application | The application type |
string | $lang | The language as ISO 639-1 code (e.g. `en` for english). |
public findAddressDataByAddressId(int $addressId, string $orderIds):Address
Find address data by address id
int | $addressId | |
string | $orderIds |
public findExistingAddress(array $addressData):Address
Find an existing address
array | $addressData | 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.
The address model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address |
string | gender | The gender ("female", "male" or "diverse") |
string | name1 | The name 1 field (defaults to: company name) |
string | name2 | The name 2 field (defaults to: first name) |
string | name3 | The name 3 field (defaults to: last name) |
string | name4 | The name 4 field (defaults to: c/o) |
string | address1 | The address 1 field (defaults to: street|'PACKSTATION'|'POSTFILIALE') |
string | address2 | The address 2 field (defaults to: houseNumber|packstationNo) |
string | address3 | The address 3 field (defaults to: additional) |
string | address4 | The address 4 field is currently undefined and can be freely used. |
string | postalCode | The postcode |
string | town | The town |
int | countryId | The ID of the country |
int | stateId | The ID of the state |
bool | readOnly | Flag that indicates if the data record is read only |
string | companyName | The company name (alias for name1, read only) |
string | firstName | The first name (alias for name2, read only) |
string | lastName | The last name (alias for name3, read only) |
string | careOf | The c/o (alias for name4, read only) |
string | street | The street (alias for address1, read only) |
string | houseNumber | The house number (alias for address2, read only) |
string | additional | The additional address information (alias for address3, read only) |
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 | |
string | taxIdNumber | The taxIdNumber option (alias for option with typeId 1, read only) |
string | externalId | The externalId option (alias for option with typeId 2, read only) |
bool | entryCertificate | The entryCertificate option (alias for option with typeId 3, read only) |
string | phone | The phone option (alias for option with typeId 4, read only) |
string | The email option (alias for option with typeId 5, read only) | |
string | postident | The PostIdent option (alias for option with typeId 6, read only) |
string | personalNumber | The personal number option (alias for option with typeId 7, read only) |
string | fsk | The age rating option (alias for option with typeId 8, read only) |
string | birthday | The birthday option (alias for option with typeId 9, read only) |
string | title | The title option (alias for option with typeId 11, read only) |
string | sessionId | The fronetnd session ID that was used when the address was created (alias for option with typeId 10, read only) |
string | contactPerson | The contact person option (alias for option with typeId 12, read only) |
string | externalCustomerId | The external customer ID option (alias for option with typeId 13, read only) |
string | packstationNo | The packstation number (alias for houseNumber and address2, read only) |
bool | isPackstation | Flag that indicates if the address is a packstation |
bool | isPostfiliale | Flag that indicates if the address is a postfiliale (post office) |
Collection | options | A collection of address options. Standard plentymarkets address option types:
|
Collection | contacts | A collection of contacts that are linked with the address record |
Collection | orders | A collection of orders that are linked with the address record |
Country | country | The address country |
CountryState | state | The address state |
Collection | contactRelations | A collection of relations to linked contacts |
Collection | orderRelations | A collection of relations to linked orders |
Collection | warehouseRelations | A collection of relations to linked warehouses |
Collection | reorderRelations | A collection of relations to linked reorders |
Collection | schedulerRelations | A collection of relations to linked schedulers |
public toArray()
Returns this model as an array.
The address contact relation model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address contact relation |
int | contactId | The ID of the contact |
int | typeId | The type ID of the address. Possible values:
|
int | addressId | The ID of the address |
bool | isPrimary | Flag that indicates if the address is primary |
Address | address | The address of the relation |
Contact | contact | The contact of the relation |
public toArray()
Returns this model as an array.
The address options model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address option |
int | addressId | The ID of the address |
int | typeId | The ID of the address option type |
string | value | The option value |
int | 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 | address | The address the option belongs to |
AddressOptionType | type | The option type of the address option |
public toArray()
Returns this model as an array.
The AddressOptionType model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address option type. It is possible to define individual types. The following types are available by default:
|
int | position | The position for sorting |
int | nonErasable | Flag that indicates if the type can be deleted |
Collection | names | A collection of address option type names |
Collection | options | A collection of all address options of the type |
public toArray()
Returns this model as an array.
The AddressOptionTypeName model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address option type name |
int | typeId | The ID of the address option type |
string | lang | The language of the name |
string | name | The name |
AddressOptionType | type | The address option type that belongs to the name |
public toArray()
Returns this model as an array.
address order relation model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address order relation |
int | orderId | The ID of the order |
int | typeId | The ID of the address type
|
int | addressId | The ID of the address |
Address | address | The address of the relation |
Order | order | The order of the relation |
AddressRelationType | type | The address relation type |
public toArray()
Returns this model as an array.
The address POS relation model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address POS relation |
string | posBaseId | The ID of the POS base |
string | addressId | The ID of the address |
int | typeId | The ID of the relation type |
public toArray()
Returns this model as an array.
The contact address type model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address relation type. The following types are available by default and cannot be deleted:
|
int | position | The position for sorting |
int | nonErasable | Flag that indicates if the type can be deleted |
Collection | names | A collection of AddressRelationTypeName objects |
AddressRelationTypeApplication | application | The address relation type application |
public toArray()
Returns this model as an array.
The AddressRelationTypeApplication model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address relation type name |
int | typeId | The ID of the relation type |
string | application | The application type. Allowed values: contact, order, warehouse. |
int | position | The position for sorting |
AddressRelationType | type | The type of the address relation |
public toArray()
Returns this model as an array.
The AddressRelationTypeName model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address relation type name |
int | typeId | The ID of the relation type |
string | lang | The language of the name |
string | name | The name |
AddressRelationType | type | The type of the address relation |
public toArray()
Returns this model as an array.
The AddressSchedulerRelation model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address order relation |
int | schedulerId | The ID of the scheduler |
int | typeId | The ID of the address type |
int | addressId | The ID of the address |
OrderScheduler | scheduler | The scheduler of the order |
public toArray()
Returns this model as an array.
The AddressWarehouseRelation model
Plenty\Modules\Account\Address\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the address warehouse relation |
int | warehouseId | The ID of the warehouse |
int | typeId | The ID of the type |
int | addressId | The ID of the address |
Address | address | The address of the relation |
public toArray()
Returns this model as an array.
The ContactEventRepositoryContract is the interface for the contact event repository. This interface allows to list contact events.
Plenty\Modules\Account\Contact\ContactEvent\Contracts
public listEvents(array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
Lists contact events identified by the contact that is currently logged into the system.
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | The number of items to list per page |
public listEventsByContactId(int $contactId, array $columns = [], int $page = 1, int $itemsPerPage = 50):PaginatedResult
Lists contact events by the contact ID.
int | $contactId | The ID of the contact |
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | The number of items to list per page |
public createEvent(array $data):ContactEvent
Adds an entry to the table customer events by the contact ID.
array | $data |
public updateEvent(int $contactEventId, array $data):ContactEvent
Updates an entry of the table customer events by the contact event ID.
int | $contactEventId | The ID of the contact event |
array | $data |
public deleteEvent(int $contactEventId):void
Deletes an entry of the table customer events by the contact event ID.
int | $contactEventId | The ID of the contact event |
public getEventTypesPreview():array
Get the contact event types as key/pair array
The contact event model.
Plenty\Modules\Account\Contact\ContactEvent\Models
Type | Name | Description |
---|---|---|
int | eventId | The ID of the event |
int | contactId | The ID of the contact this event belongs to |
int | userId | The ID of the user this event belongs to |
int | eventDuration | The duration of the event in seconds |
string | eventType | The type of the event. Possible values are call, ticket, email, meeting, webinar, development and design. |
int | orderRowId | |
string | eventInfo | Informational text about the event |
bool | billable | Billable if set to 1 |
string | eventInsertedAt | The date the event was created at as unix timestamp |
string | eventBilledAt | The date the event was billed at as unix timestamp |
string | eventProvisionPaidAt | The date the provision was paid at as unix timestamp |
float | eventCreditValue | The credit value of the event |
public toArray()
Returns this model as an array.
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.
Plenty\Modules\Account\Contact\Contracts
public updatePassword(int $contactId, array $data):void
Updates the password for a contact.
int | $contactId | The ID of the contact |
array | $data | The data as associative array |
public sendNewCustomerPassword(int $contactId):void
Sends a new password to the contact.
int | $contactId | The ID of the contact |
public unblockUser(int $contactId):void
Unblocks the user.
int | $contactId | The ID of the contact |
public getLoginURL(int $contactId):void
Gets the login URL.
int | $contactId | The ID of the contact |
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.
Plenty\Modules\Account\Contact\Contracts
public findAccount(int $accountId, int $contactId):Account
Returns an account by an ID only if it is associated with the given contact ID.
int | $accountId | The ID of the account |
int | $contactId | The ID of the contact |
public createAccount(array $data, int $contactId):Account
Creates an account and associates it immediately with the given ID of the contact.
array | $data | The account data as associative array |
int | $contactId | The ID of the contact to associate this to |
public updateAccount(array $data, int $accountId, int $contactId):Account
Updates an account. If not already associated, it will associate the account with the given contact ID.
array | $data | The account data as associative array |
int | $accountId | The ID of the account |
int | $contactId | The ID of the contact |
public deleteAccount(int $accountId, int $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.
int | $accountId | The ID of the account |
int | $contactId | The ID of the contact |
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.
Plenty\Modules\Account\Contact\Contracts
public getPrimaryOrLastCreatedContactAddresses(int $contactId):array
Returns primary or last created contact addresses
int | $contactId | The ID of the contact |
public findContactAddressByTypeId(int $contactId, int $typeId, bool $last = true):Address
Returns an address of a given contact for the given type.
int | $contactId | The ID of the contact |
int | $typeId | The ID of the address type |
bool | $last | Return the last created billing address |
public createAddress(array $data, int $contactId, int $typeId):Address
Creates an address, associates it immediately with the given contact ID with the given type and returns the new address.
array | $data | The address data as associative array |
int | $contactId | The ID of the contact |
int | $typeId | The ID of the address type |
public updateAddress(array $data, int $addressId, int $contactId, int $typeId):Address
Updates the existing address of a given contact and type and returns it.
array | $data | The address data as associative array |
int | $addressId | The ID of the address to update |
int | $contactId | The ID of the contact |
int | $typeId | The ID of the address type |
public getAddress(int $addressId, int $contactId, int $typeId):Address
Returns the address of a given contact and type.
int | $addressId | The ID of the address |
int | $contactId | The ID of the contact |
int | $typeId | The ID of the address type |
public getAddresses(int $contactId, int $typeId = null):array
Gets all addresses for the given contact of the given type.
int | $contactId | The ID of the contact |
int | $typeId | The address type (default: all / null) |
public addAddress(int $addressId, int $contactId, int $typeId):Address
Adds the address to the given contact as the given type.
int | $addressId | The ID of the address |
int | $contactId | The ID of the contact |
int | $typeId | The ID of the address type |
public setPrimaryAddress(int $addressId, int $contactId, int $addressTypeId):AddressContactRelation
Sets a contact address per address type as the primary address.
int | $addressId | The ID of the address |
int | $contactId | The ID of the contact |
int | $addressTypeId | The ID of the address type |
public resetPrimaryAddress(int $addressId, int $contactId, int $addressTypeId):AddressContactRelation
Resets a contact primary address.
int | $addressId | The ID of the address |
int | $contactId | The ID of the contact |
int | $addressTypeId | The ID of the address type |
public deleteAddress(int $addressId, int $contactId, int $typeId):bool
Deletes an existing address of a given contact and type. Returns true
if deletion was successful. Returns false
if deletion was not successful.
int | $addressId | The ID of the address |
int | $contactId | The ID of the contact |
int | $typeId | The ID of the address type |
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.
Plenty\Modules\Account\Contact\Contracts
public findContactClassById(int $contactClassId):string
Gets a contact class. The ID of the contact class must be specified.
int | $contactClassId | The ID of the contact class |
public findContactClassDataById(int $contactClassId):array
Gets the data of a contact class. The ID of the contact class must be specified.
int | $contactClassId | The ID of the contact class |
public allContactClasses():array
Lists contact classes.
The ContactDocumentContract is the interface for contact documents.
Plenty\Modules\Account\Contact\Contracts
public listDocuments(string $continuationToken, int $contactId):StorageObjectList
List documents of a contact
string | $continuationToken | The contnuation token |
int | $contactId | The ID of the contact |
public getDocument(string $key, int $contactId):StorageObject
Get storage object from contact documents
string | $key | The key for the file |
int | $contactId | The ID of the contact |
public getDocumentUrl(string $key, int $contactId):string
Get temporary url for document
string | $key | The key for the file |
int | $contactId | The ID of the contact |
public uploadDocument(string $key, string $content, int $contactId):StorageObject
Upload document to contact directory
string | $key | The key for the file |
string | $content | The content of the file |
int | $contactId | The ID of the contact |
public deleteDocuments(array $keyList, int $contactId):bool
Delete files from contact documents
array | $keyList | The array of the key list |
int | $contactId | The ID of the contact |
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.
Plenty\Modules\Account\Contact\Contracts
public loadGroupFunctions():array
public executeGroupFunction(array $contactList = [], int $addressLabelTemplate = null, int $emailTemplate = null, int $newsletter = null):array
array | $contactList | The list of the contacts |
int | $addressLabelTemplate | The address label template |
int | $emailTemplate | The email templates |
int | $newsletter | The newsletter |
public executeGroupFunctionV2(array $data = []):array
array | $data | The data as associative array |
lookup repository for contacts
Plenty\Modules\Account\Contact\Contracts
public hasId(int $contactId):ContactLookupRepositoryContract
int | $contactId | The ID of the contact |
public hasEmail(string $emailAddress):ContactLookupRepositoryContract
string | $emailAddress | The email address of the contact |
public hasBillingAddress(int $billingAddressId):ContactLookupRepositoryContract
int | $billingAddressId | The ID of the billing address |
public hasDeliveryAddress(int $deliveryAddressId):ContactLookupRepositoryContract
int | $deliveryAddressId | The ID of the delivery address |
public lookup():array
The ContactOptionRepositoryContract is the interface for the contact option repository. This interface allows to get, create, update and delete contact options.
Plenty\Modules\Account\Contact\Contracts
public findContactOptions(int $contactId, int $typeId, int $subTypeId):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.
int | $contactId | The ID of the contact |
int | $typeId | Optional: The ID of the option type (default: 0) |
int | $subTypeId | Optional: The ID of the option sub-type (default: 0) |
public createContactOptions(array $optionData, int $contactId):array
Creates an option for the given contact and returns them.
array | $optionData | The option data as associative array |
int | $contactId | The ID of the contact |
public updateContactOptions(array $optionData, int $contactId):array
Updates options of the given contact and returns them. The ID of the contact must be specified.
array | $optionData | The option data as associative array |
int | $contactId | The ID of the contact |
public deleteContactOptionsByContactId(int $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.
int | $contactId | The ID of the contact |
public findContactOption(int $optionId):ContactOption
Gets a contact option. The ID of the option must be specified.
int | $optionId | The ID of the option |
public updateContactOption(array $optionData, int $optionId):ContactOption
Updates an option with the given id and returns it.
array | $optionData | The option data as associative array |
int | $optionId | The ID of the option |
public deleteContactOption(int $optionId):bool
Deletes a contact option. The ID of the option must be specified.
int | $optionId | The ID of the option |
public validateValue(int $contactId, int $typeId, int $subTypeId, string $value):bool
int | $contactId | |
int | $typeId | |
int | $subTypeId | |
string | $value |
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.
Plenty\Modules\Account\Contact\Contracts
public createContactPosition(array $data):ContactPosition
Creates a contact position.
array | $data |
public updateContactPosition(array $data, int $contactPositionId):ContactPosition
Updates an existing contact position.
array | $data | |
int | $contactPositionId | The ID of the contact position |
public deleteContactPosition(int $contactPositionId):bool
Deletes a contact position by the given ID.
int | $contactPositionId | The ID of the contact position |
public findContactPositionById(int $contactPositionId):ContactPosition
Finds an existing contact position by the given ID.
int | $contactPositionId | The ID of the contact position |
public allContactPositions(array $columns = [], int $perPage = 50):void
Gets a list of contact positions.
array | $columns | |
int | $perPage |
public createContactDepartment(array $data):ContactDepartment
Creates a contact department.
array | $data |
public updateContactDepartment(array $data, int $contactDepartmentId):ContactDepartment
Updates an existing contact department.
array | $data | |
int | $contactDepartmentId | The ID of the contact department |
public deleteContactDepartment(int $contactDepartmentId):bool
Deletes a contact department by the given ID.
int | $contactDepartmentId | The ID of the contact department |
public findContactDepartmentById(int $contactDepartmentId):ContactDepartment
Finds an existing contact department by the given ID.
int | $contactDepartmentId | The ID of the contact department |
public allContactDepartments(array $columns = [], int $perPage = 50):void
Gets a list of contact departments.
array | $columns | |
int | $perPage |
public createContactOptionType(array $data):ContactOptionType
Creates a contact option type.
array | $data |
public updateContactOptionType(array $data, int $contactOptionTypeId):ContactOptionType
Updates an existing contact option type.
array | $data | |
int | $contactOptionTypeId | The ID of the contact option type |
public deleteContactOptionType(int $contactOptionTypeId):bool
Deletes a contact option type by the given ID.
int | $contactOptionTypeId | The ID of the contact option type |
public findContactOptionTypeById(int $contactOptionTypeId):ContactOptionType
Finds an existing contact option type by the given ID.
int | $contactOptionTypeId | The ID of the contact option type |
public allContactOptionType(array $columns = [], int $perPage = 50, array $with = []):void
Gets a list of contact option types.
array | $columns | |
int | $perPage | |
array | $with |
public createContactOptionSubType(array $data):ContactOptionSubType
Creates a contact option sub-type.
array | $data |
public updateContactOptionSubType(array $data, int $contactOptionSubTypeId):ContactOptionSubType
Updates an existing contact option sub-type.
array | $data | |
int | $contactOptionSubTypeId | The ID of the contact option sub-type |
public deleteContactOptionSubType(int $contactOptionSubTypeId):bool
Deletes a contact option sub-type by the given ID.
int | $contactOptionSubTypeId | The ID of the contact option sub-type |
public findContactOptionSubTypeById(int $contactOptionSubTypeId):ContactOptionSubType
Finds an existing contact option sub-type by the given ID.
int | $contactOptionSubTypeId | The ID contact option sub-type |
public allContactOptionSubType(array $columns = [], int $perPage = 50):void
Gets a list of contact option sub-types.
array | $columns | |
int | $perPage |
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.
Plenty\Modules\Account\Contact\Contracts
public getBanksOfContact(int $contactId, array $columns = [], int $perPage = 50):array
Gets a collection of bank accounts of a contact. The ID of the contact must be specified.
int | $contactId | The ID of the contact |
array | $columns | Optional: The columns to retrieve (Default: '[*]') |
int | $perPage | Optional: The number of bank accounts per page (Default: 50) |
public getBankByOrderId(int $orderId, array $columns = []):ContactBank
Returns bank details of an order. The ID of the order must be specified.
int | $orderId | The ID of the order |
array | $columns | Optional: The columns to retrieve (Default: '[*]') |
public createContactBank(array $data):ContactBank
Creates a bank account for a contact and returns it.
array | $data | The bank account data as associative array |
public updateContactBank(array $data, int $contactBankId):ContactBank
Updates a bank account. The ID of the bank account must be specified.
array | $data | The bank data as associative array |
int | $contactBankId | The ID of the bank account entry |
public deleteContactBank(int $contactBankId):bool
Deletes a bank account. The ID of the bank account must be specified. Returns true
if deletion was successful. Returns false
if deletion was not successful.
int | $contactBankId | The ID of the bank account entry |
public findContactBankById(int $contactBankId):ContactBank
Gets a bank account. The ID of the bank account must be specified.
int | $contactBankId | The ID of the bank account entry |
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.
Plenty\Modules\Account\Contact\Contracts
public createContact(array $data):Contact
Creates a contact and returns it.
array | $data | The contact data as associative array |
public updateContact(array $data, int $contactId):Contact
Updates a contact and returns it. The ID of the contact must be specified.
array | $data | The contact data as associative array |
int | $contactId | The ID of the contact |
public deleteContact(int $contactId, bool $checkExistingOrders = null):bool
Deletes a contact. The ID of the contact must be specified.
int | $contactId | The ID of the contact. Returns `true` if deletion was successful. Returns `false` if deletion was not successful. |
bool | $checkExistingOrders | 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(int $contactId, array $with = []):Contact
Gets a contact. The ID of the contact must be specified.
int | $contactId | The ID of the contact |
array | $with | The relationships that should be eager loaded |
public getContactList(array $filter = [], array $with = [], array $columns = [], int $page = 1, int $itemsPerPage = 50, string $sortBy = "id", string $sortOrder = "desc"):PaginatedResult
List contacts
array | $filter | Filter that restrict the search result |
array | $with | The relationships that should be eager loaded |
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | The number of items to list per page |
string | $sortBy | [optional, default=id] |
string | $sortOrder | [optional, default=desc] |
public getContactByOptionValue(string $value, int $typeId, int $subTypeId):Contact
Returns an existing contact by a contact option information.
string | $value | The value of the contact option |
int | $typeId | The type ID of the contact option |
int | $subTypeId | The sub-type ID of the contact option |
public getContactIdByEmail(string $email):int
Returns a contact id by email. The email must be specified.
string |
public findContactDataByContactId(int $contactId):Contact
Returns all contact related data.
int | $contactId |
public clearCriteria():void
Resets all Criteria filters by creating a new instance of the builder object.
public applyCriteriaFromFilters():void
Applies criteria classes to the current repository.
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
public getDataHistory(string $referenceType, int $referenceId):void
string | $referenceType | |
int | $referenceId |
The ContactTypeRepositoryContract is the interface for the contact type repository. This interface allows to list, get, create, update and delete contact types.
Plenty\Modules\Account\Contact\Contracts
public createContactType(array $data):ContactType
Creates a contact type and returns it.
array | $data | The contact type data as associative array |
public updateContactType(array $data, int $contactTypeId):ContactType
Updates a contact type and returns it. The ID of the contact type must be specified.
array | $data | The contact type data as associative array |
int | $contactTypeId | The ID of the contact type |
public deleteContactType(int $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.
int | $contactTypeId | The ID of the contact type |
public findContactTypeById(int $contactTypeId):ContactType
Gets a contact type. The ID of the contact type must be specified.
int | $contactTypeId | The ID of the contact type |
public allContactTypes(array $columns = []):array
Returns a collection of contact types.
array | $columns | Optional: The columns to return as an array (Default: '[*]') |
The ContractVCardRepositoryContract is the interface for the vcard repository. The interface allows you to return a vcard filestream.
Plenty\Modules\Account\Contact\Contracts
public getVCard(int $contactId):array
Gets a filestream of the vcard of a contact.
int | $contactId | The ID of the contact |
The contract for the contact payment repository.
Plenty\Modules\Account\Contact\Contracts
public getBanksOfContact(int $contactId, array $columns = [], int $perPage = 50):array
Gets a collection of bank accounts of a contact. The ID of the contact must be specified.
int | $contactId | The ID of the contact |
array | $columns | Optional: The columns to retrieve (Default: '[*]') |
int | $perPage | Optional: The number of bank accounts per page (Default: 50) |
public getBankByOrderId(int $orderId, array $columns = []):ContactBank
Returns bank details of an order. The ID of the order must be specified.
int | $orderId | The ID of the order |
array | $columns | Optional: The columns to retrieve (Default: '[*]') |
public createContactBank(array $data):ContactBank
Creates a bank account for a contact and returns it.
array | $data | The bank account data as associative array |
public updateContactBank(array $data, int $contactBankId):ContactBank
Updates a bank account. The ID of the bank account must be specified.
array | $data | The bank data as associative array |
int | $contactBankId | The ID of the bank account entry |
public deleteContactBank(int $contactBankId):bool
Deletes a bank account. The ID of the bank account must be specified. Returns true
if deletion was successful. Returns false
if deletion was not successful.
int | $contactBankId | The ID of the bank account entry |
public findContactBankById(int $contactBankId):ContactBank
Gets a bank account. The ID of the bank account must be specified.
int | $contactBankId | The ID of the bank account entry |
Sales representatives region repository
Plenty\Modules\Account\Contact\Contracts
public createRegion(array $data, int $contactId = null, int $accountId = null):SalesRepresentativeRegion
Create a region for the sales representative
array | $data | The data as associative array |
int | $contactId | The ID of the contact |
int | $accountId | The ID of the account |
public find(int $page = 1, int $itemsPerPage = 50, array $columns = [], array $with = []):PaginatedResult
int | $page | |
int | $itemsPerPage | |
array | $columns | |
array | $with |
public getRegionById(int $accountContactRelationId):SalesRepresentativeRegion
Get a region by the ID
int | $accountContactRelationId | The ID of the account contact relation |
public deleteRegionById(int $accountContactRelationId):bool
Delete a region by the ID
int | $accountContactRelationId | The ID of the account contact relation |
public updateRegionById(int $accountContactRelationId, array $data):SalesRepresentativeRegion
Update an existing region by the ID
int | $accountContactRelationId | The ID of the account contact relation |
array | $data |
public getRegionByContactAndAccountId(int $contactId, int $accountId):SalesRepresentativeRegion
Get a region by contact ID and account ID
int | $contactId | The ID of the contact |
int | $accountId | The ID of the account |
public getRegionsByContactId(int $contactId):Collection
Get a region by the contact ID
int | $contactId | 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(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
The contact model.
Plenty\Modules\Account\Contact\Models
id
Type | Name | Description |
---|---|---|
int | id | The ID of the contact |
string | externalId | The external ID of the contact |
string | number | The number of the contact (previous customer number) |
int | typeId | The ID of the contact type |
string | firstName | The first name of the contact |
string | lastName | The last name of the contact |
string | fullName | The full name of the contact. A concatenation of first and last name. |
string | The private email address of the contact | |
string | secondaryEmail | The secondary private email address of the contact |
string | gender | The gender of the contact ("female", "male" or "diverse") |
string | title | The title of the contact, e.g. a doctorate |
string | formOfAddress | The form of address for the contact |
newsletterAllowanceAt | The time the contact registered for the newsletter as unix timestamp | |
int | classId | The ID of the contact class |
int | blocked | The blocked status of the contact. Contacts can be blocked for a specific client (store). Possible values:
|
int | 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:
|
string | 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. |
string | lang | The language of the contact |
float | referrerId | The origin of the contact |
int | plentyId | The client (store) that is assigned to the contact |
int | 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 | |
string | privatePhone | The private phone number of the contact |
string | privateFax | The private fax number of the contact |
string | privateMobile | The private mobile phone number of the contact |
string | ebayName | The eBay account name of the contact |
string | paypalEmail | The email address of the PayPal account of the contact |
string | paypalPayerId | The PayPal payer id of the contact |
string | klarnaPersonalId | The Klarna personal id of the contact |
string | dhlPostIdent | The DHL PostIdent of the contact |
string | forumUsername | The user name of the contact in the forum |
string | forumGroupId | The ID of the forum group that is assigned to the contact |
string | singleAccess | The access type of the contact |
string | contactPerson | The contact person of the contact |
string | marketplacePartner | The marketplace partner status of the contact |
Collection | addresses | A collection of linked addresses |
Collection | primaryBillingAddress | A collection of linked primary billing addresses |
Collection | 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. |
Collection | orders | A collection of orders of the contact. Deprecated. |
Collection | contactOrders | A collection of orders of the contact |
Collection | banks | A collection of bank accounts of the contact |
Collection | reorders | A collection of reorders of the contact |
Collection | orderSchedulers | A collection of order schedulers of the contact |
Collection | options | A collection of options of the contact |
Collection | salesRepresentativeRegions | A collection of sales representative regions of the contact |
Collection | allowedMethodsOfPayment | A collection of allowed payment methods for the contact.* |
ContactType | type | The type of the contact |
OrderSummary | orderSummary | The order summary of the contact |
Collection | tagRelationships | The tag relations of the contact |
int | valuta | The foreign currency of the contact |
int | discountDays | The early payment discount period in days specified for the account |
float | discountPercent | The early payment discount in percent specified for the account |
int | timeForPaymentAllowedDays | The payment due date in days specified for the account |
int | salesRepresentativeContactId | The salesRepresentative ID of the contact |
anonymizeAt | The date at which the contact will be anonymized. |
public toArray()
Returns this model as an array.
The model of the allowed payment method for the contact
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the payment method allowed for the contact |
int | contactId | The ID of the contact |
int | methodOfPaymentId | The ID of the payment method |
int | allowed | Allowed payment method for the contact. Possible values are:
|
string | createdAt | Timestamp when the payment method was created |
string | updatedAt | Timestamp when the payment method was last updated |
bool | isPaymentActive | Flag that indicates if the current payment method is active |
public toArray()
Returns this model as an array.
The contact bank model.
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the bank account |
int | contactId | The ID of the contact the bank account belongs to |
int | orderId | The ID of the order the bank account belongs to |
string | accountOwner | The owner of the bank account |
string | bankName | The name of the bank |
string | bankAddress | The address of the bank |
string | bankPostalCodeTown | The postcode and town of the bank |
string | bankCountry | The country of the bank |
string | iban | The IBAN of the bank account |
string | bic | The BIC of the bank account |
string | accountNumber | The account number of the bank account |
string | sortCode | The sort code of the bank account |
string | lastUpdateBy | The source of the last change (possible values: `customer`, `backend`, `import`) |
int | directDebitMandateAvailable | Flag that indicates if a direct debit mandate is available |
string | directDebitMandateAt | The time the direct debit mandate was created as unix timestamp |
string | directDebitMethod | The direct debit method (possible values: `sepaDirectDebit`, `sepaB2bDirectDebit`) |
string | directDebitType | The direct debit type (possible values: `first`, `next`) |
string | paymentMethod | The payment method (possible values: `recurrent`, `onOff`) |
string | createdAt | The time the bank account was created as unix timestamp |
string | updatedAt | The time the bank account was last updated as unix timestamp |
Contact | contact | The contact the bank account belongs to |
Order | order | The order the bank account belongs to |
public toArray()
Returns this model as an array.
contact department model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact department. It is possible to define individual departments. The following departments are available by default.
|
int | position | The position for sorting |
array | names | List of contact department names |
public toArray()
Returns this model as an array.
contact department name model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact department name |
int | departmentId | The ID of the department |
string | lang | The language |
string | name | The name |
public toArray()
Returns this model as an array.
The contact options model.
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact option |
int | contactId | The ID of the contact the option belongs to |
int | 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:
|
int | 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:
|
string | value | The value of the option. Depends on the type/sub-type. |
int | priority | The priority for sorting |
string | createdAt | The time the option was created as unix timestamp |
string | updatedAt | The time the option was last updated as unix timestamp |
Contact | contact | The contact the option belongs to |
ContactOptionType | type | The type of the option |
ContactOptionSubType | subType | The sub-type of the option |
public toArray()
Returns this model as an array.
contact options sub type model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | 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.
|
int | position | The position for sorting |
int | nonErasable | Flag that indicates if the option sub-type can be deleted |
Collection | names | A collection of names in different languages for the option sub-type. |
public toArray()
Returns this model as an array.
contact options sub type name model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact option sub type name entry |
int | subTypeId | The ID of the option sub-type the name entry belongs to |
string | lang | lang The language of the sub-type name |
string | name | name The name of the sub-type |
public toArray()
Returns this model as an array.
contact options type model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | 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.
|
int | position | The position for sorting |
int | nonErasable | Flag that indicates if the option type can be deleted |
Collection | names | A collection of names in different languages for the option type |
public toArray()
Returns this model as an array.
The ContactOptionTypeName model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact option type name |
int | typeId | The ID of the option type the name belongs to |
string | lang | The language of the option type name |
string | name | The name of the option type |
public toArray()
Returns this model as an array.
The ContactPosition model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact position. It is possible to define individual contact positions. The following positions are available by default:
|
int | position | The position for sorting |
array | names | The list of contact position names |
public toArray()
Returns this model as an array.
The ContactPositionName model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact position name |
int | positionId | The ID of the position |
string | lang | The language |
string | name | The name |
public toArray()
Returns this model as an array.
The ContactType model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | 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.
|
int | position | The position for sorting |
int | nonErasable | Flag that indicates if the type can be deleted |
Collection | names | A collection of contact type names in different languages |
Collection | contacts | A collection of contacts with the type |
public toArray()
Returns this model as an array.
contact type name model
Plenty\Modules\Account\Contact\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the contact type name |
int | typeId | The contact type ID. See also {@link ContactType::id}. |
string | lang | The language ot the contact type name |
string | name | The contact type name |
public toArray()
Returns this model as an array.
ContactElasticSearchAvailibilityRepositoryContract
Plenty\Modules\Account\Contact\Search\Contracts
public isReady():bool
public isAvailable():bool
kommt noch
Plenty\Modules\Account\Contact\Search\Contracts
public hasNext():bool
public setNumberOfDocumentsPerShard(int $size):void
int | $size |
public setIndex(IndexInterface $index):ElasticSearchSearchRepositoryContract
IndexInterface | $index |
public addSearch($search):ElasticSearchSearchRepositoryContract
$search |
public execute():array
Contract for search contacts
Plenty\Modules\Account\Contact\Search\Contracts
public search(int $page = 1, int $itemsPerPage = 50, array $filters = [], string $sortBy = "contactId", string $sortOrder = "desc", string $with = ""):FilteredPaginatedResult
Search contacts with the given filters.
int | $page | |
int | $itemsPerPage | |
array | $filters | |
string | $sortBy | |
string | $sortOrder | |
string | $with |
The contract for the search repository
Plenty\Modules\Account\Contact\Search\Contracts
public index(int $contactId):array
Index a contact
int | $contactId |
public delete(array $contactIds):array
Delete contact from index
array | $contactIds |
public bulk(array $contactIds):array
array | $contactIds |
public setOutput(OutputInterface $output):void
OutputInterface | $output |
public execute():void
The AccountContactRelationRepositoryContract is the interface for the account contact relation repository. This interface allows to find and delete an account contact relation.
Plenty\Modules\Account\Contracts
public findAccountContactRelationById(int $accountContactRelation):AccountContactRelation
Gets an account contact releation. The ID of the account contact relation must be specified.
int | $accountContactRelation | The ID of the account contact relation |
public deleteAccountContactRelation(int $accountContactRelationId):bool
Deletes an account contact relation. The ID of the account contact relation must be specified.
int | $accountContactRelationId | The ID of the account contact relation |
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.
Plenty\Modules\Account\Contracts
public createAccount(array $data):Account
Creates a new account and returns it.
array | $data | The account data as associative array |
public updateAccount(array $data, int $accountId):Account
Updates an existing account and returns it. The ID of the account must be specified.
array | $data | The account data as associative array |
int | $accountId | The ID of the account |
public deleteAccount(int $accountId):bool
Deletes an account. The ID of the account must be specified. Returns true
if deletion was successful. Returns false
if deletion was not successful.
int | $accountId | The ID of the account |
public findAccountById(int $accountId):Account
Gets an account. The ID of the account must be specified.
int | $accountId | The ID of the account |
public allAccounts(array $columns = [], int $perPage = 50):Collection
Returns a collection of all accounts.
array | $columns | Optional: The columns to retrieve (Default: '[*]'). |
int | $perPage | Optional: The number of objects per page (Default: 50). |
public allAccountsPaginated(array $columns = [], int $page = 1, int $itemsPerPage = 50, array $with = []):PaginatedResult
Returns a collection of all accounts.
array | $columns | Optional: The columns to retrieve (Default: '[*]'). |
int | $page | Optional: The number of the page (Default: 1). |
int | $itemsPerPage | Optional: The number of objects per page (Default: 50). |
array | $with | Optional: The relationships that should be eager loaded. |
public getContactsOfAccount(int $accountId):Collection
Returns a collection of contacts that belong to the account.
int | $accountId | The ID of the account |
public saveAccount(array $data = []):void
Creates a new or updates an existing account.
array | $data | The account data as associative array |
public setFilters(array $filters = []):void
Sets the filter array.
array | $filters |
public getFilters():void
Returns the filter array.
public getConditions():void
Returns a collection of parsed filters as Condition object
public clearFilters():void
Clears the filter array.
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.
frontend customer settings event
Plenty\Modules\Account\Events
public getDeliveryCountryId():int
public setDeliveryCountryId(int $deliveryCountryId):FrontendUpdateCustomerSettings
int | $deliveryCountryId |
public getShowNetPrice():bool
public setShowNetPrice(bool $showNetPrice):FrontendUpdateCustomerSettings
bool | $showNetPrice |
public getEbaySellerAccount():string
public setEbaySellerAccount(string $ebaySellerAccount):FrontendUpdateCustomerSettings
string | $ebaySellerAccount |
public getAccountContactSign():string
public setAccountContactSign(string $accountContactSign):FrontendUpdateCustomerSettings
string | $accountContactSign |
public getAccountContactClassId():int
public setAccountContactClassId(int $accountContactClassId):FrontendUpdateCustomerSettings
int | $accountContactClassId |
public getSalesAgent():string
public setSalesAgent(string $salesAgent):FrontendUpdateCustomerSettings
string | $salesAgent |
public getAccountContractClassId():int
public setAccountContractClassId(int $accountContractClassId):FrontendUpdateCustomerSettings
int | $accountContractClassId |
This event will be triggered, after a recipient was created.
Plenty\Modules\Account\Events
public getRecipient():Recipient
returns recipient.
This event will be triggered, after a recipient was deleted.
Plenty\Modules\Account\Events
public getRecipient():Recipient
returns recipient.
This event will be triggered, after a recipient was moved to a new folder.
Plenty\Modules\Account\Events
public getOldFolder():int
returns old folder id.
public getRecipient():Recipient
returns recipient.
the account model.
Plenty\Modules\Account\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the account |
string | number | The number of the account |
string | companyName | The company name |
string | taxIdNumber | The ID of the tax number |
int | valuta | The valuta date in days specified for the account |
int | discountDays | The early payment discount period in days specified for the account |
float | discountPercent | The early payment discount in percent specified for the account |
int | timeForPaymentAllowedDays | The payment due date in days specified for the account |
int | salesRepresentativeContactId | The contact ID of the sales representative |
int | userId | The ID of the account owner |
int | deliveryTime | The delivery time for the supplier |
float | dealerMinOrderValue | The minimum order value for the supplier |
string | 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 | |
Collection | contacts | A list of contacts that belong to the account |
Collection | contactRelations | A list with contact relations to the account |
Collection | salesRepresentativeRegions | A list with sales representative regions related to the account |
public toArray()
Returns this model as an array.
account contact relation model
Plenty\Modules\Account\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the account contact relation |
int | accountId | The ID of the foreign key account |
int | contactId | The ID of the foreign key contact |
Account | account | The account of the relation |
Contact | contact | The contact of the relation |
Collection | accountContactSalesRepresentativeRelations |
public toArray()
Returns this model as an array.
Sales representative region model
Plenty\Modules\Account\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the account contact sales representative relation |
int | accountContactRelationId | The ID of the foreign key account contact relation |
string | postalCodeArea | |
int | countryId | |
Carbon | createdAt | |
Carbon | updatedAt | |
contacts | ||
accounts | ||
AccountContactRelation | accountContactRelation |
public toArray()
Returns this model as an array.
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.
Plenty\Modules\Account\Newsletter\Contracts
public createEntry(array $data = []):Entry
Creates an entry.
array | $data |
public createRecipient(array $data = []):array
Creates a recipient for an existing folder.
array | $data |
public createFolder(array $data = []):Folder
Creates a folder.
array | $data |
public deleteAllEntries():array
Deletes all entries.
public deleteAllFolders():array
Deletes all folders.
public deleteAllRecipients():array
Deletes all recipients.
public deleteEntryById(int $entryId):Entry
Deletes an entry. The ID of the entry must be specified.
int | $entryId | The ID of the entry |
public deleteFolderById(int $folderId):Folder
Deletes a folder. The ID of the folder must be specified.
int | $folderId | The ID of the folder |
public deleteRecipientById(int $recipientId):Recipient
Deletes a recipient. The ID of the recipient must be specified.
int | $recipientId | The ID of the recipient |
public listAllEntries():array
Lists all newsletter entries.
public listAllFolders():array
Lists all newsletter folders.
public listAllRecipients(array $data = []):array
Lists all recipients.
array | $data |
public getRecipientsByEMail(string $email):array
Returns recipients by the email address.
string | The email address of the recipient |
public listRecipients(array $columns, int $page, int $itemsPerPage, array $filter, array $with):PaginatedResult
Lists all recipients.
array | $columns | The columns to retrieve |
int | $page | The page of results to search for |
int | $itemsPerPage | The number of items to list per page |
array | $filter | Filter that restricts the search result |
array | $with | An array with child instances to be loaded |
public listEntryById(int $entryId):Entry
Gets details by the entry ID.
int | $entryId | The ID of the entry |
public listFolderById(int $folderId):Folder
Gets details by the folder ID.
int | $folderId | The ID of the folder |
public listRecipientById(int $recipientId):Recipient
Gets details by the recipient ID.
int | $recipientId | The ID of the recipient |
public updateEntryById(int $entryId, array $data = []):Entry
Updates an existing entry. The ID of the entry must be specified.
int | $entryId | The ID of the entry |
array | $data | The data as associative array |
public updateFolderById(int $folderId, array $data = []):Folder
Updates an existing folder. The ID of the folder must be specified.
int | $folderId | The ID of the folder |
array | $data | The data as associative array |
public updateRecipientById(int $recipientId, array $data = []):Recipient
Updates an existing recipient. The ID of the recipient must be specified.
int | $recipientId | The ID of the recipient |
array | $data | The data as associative array |
public addToNewsletterList(string $email, string $forename = "", string $surname = "", array $emailDirIds = []):void
Adds the email address of a contact or an interested party to an email folder for the newsletter list.
string | The email address of the contact or interested party who subscribed to the newsletter | |
string | $forename | The first name of the contact or interested party |
string | $surname | The last name of the contact or interested party |
array | $emailDirIds | 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. |
The newsletter entry model.
Plenty\Modules\Account\Newsletter\Models
Type | Name | Description |
---|---|---|
string | subject | The subject of the newsletter entry |
string | body | The body of the newsletter entry |
string | kind | The type of the newsletter entry |
string | log | The log of the newsletter entry |
public toArray()
Returns this model as an array.
The newsletter folder model.
Plenty\Modules\Account\Newsletter\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the newsletter folder |
string | name | The name of the newsletter folder |
bool | 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. |
int | position | The position of the newsletter folder |
bool | 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. |
public toArray()
Returns this model as an array.
NewsletterEmail
Plenty\Modules\Account\Newsletter\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the newsletter email |
int | directory | The ID of the directory |
int | customerId | The ID of the contact |
string | forename | The first name of the contact or interested party |
string | surname | The last name of the contact or interested party |
string | The email address The email address of the contact or interested party | |
string | gender | The gender of the contact or interested party |
string | birthday | The birthday of the contact or interested party |
int | timestamp | The timestamp when the newsletter email was sent to the contact or interested party |
string | templateLang | The language of the newsletter's email template |
int | confirmedTimestamp | The timestamp when the contact or interested party confirmed the newsletter subscription |
string | 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. |
string | ipAddress | The ip address of the client |
public toArray()
Returns this model as an array.
The newsletter recipient
Plenty\Modules\Account\Newsletter\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the newsletter recipient |
int | folderId | The ID of the newsletter folder |
int | contactId | The ID of the contact |
string | firstName | The first name of the recipient |
string | lastName | The last name of the recipient |
string | The email address of the recipient | |
string | gender | The gender of the recipient |
string | birthday | The birthday of the recipient |
int | timestamp | The timestamp when the newsletter email was sent to the recipient |
string | templateLang | The language of the newsletter email template |
int | confirmedTimestamp | The timestamp when the recipient confirmed the newsletter subscription |
string | 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. |
string | ipAddress | The IP address from where the customer has confirmed the newsletter |
string | confirmationURL | The url with which the customer has confirmed the newsletter |
public toArray()
Returns this model as an array.
The OrderSummaryRepositoryContract is the interface for the order summary repository. This interface allows to list, get, update, create and delete order summaries.
Plenty\Modules\Account\OrderSummary\Contracts
public findOrderSummaryById(int $orderSummaryId):OrderSummary
Gets an order summary. The ID of the order summary must be specified.
int | $orderSummaryId | The ID of the order summary |
public updateOrderSummary(array $data, int $orderSummaryId):OrderSummary
Updates an order summary. The ID of the order summary must be specified.
array | $data | The order summary data as associative array |
int | $orderSummaryId | The ID of the order summary |
public createOrderSummary(array $data):OrderSummary
Creates an order summary.
array | $data | The order summary data as associative array |
public deleteOrderSummary(int $orderSummaryId):bool
Deletes an order summary. The ID of the order summary must be specified.
int | $orderSummaryId | The ID of the order summary |
public allOrderSummaries(array $columns = [], int $perPage = 50):Collection
Returns a collection of all order summaries.
array | $columns | Optional: The columns to retrieve (Default: '[*]'). |
int | $perPage | Optional: The number of objects per page (Default: 50). |
public findOrderSummaryByContactId(int $contactId):OrderSummary
Gets an order summary. The ID of the contact must be specified.
int | $contactId | The ID of the contact |
public findOrderSummaryByAddressId(int $addressId):OrderSummary
Gets an order summary. The ID of the address must be specified.
int | $addressId | The ID of the address |
The order summary model.
Plenty\Modules\Account\OrderSummary\Models
Type | Name | Description |
---|---|---|
int | id | The ID of the order summary |
int | addressId | The address ID of the order summary |
int | contactId | The ID of the contact |
int | unpaidOrdersCount | The number of unpaid orders |
float | unpaidOrderTotalAmount | The total amount of unpaid orders |
int | orderCount | The number of all orders of the associated model |
string | createdAt | The time the order summary was created as unix timestamp |
string | updatedAt | The time the order summary was last updated as unix timestamp |
public toArray()
Returns this model as an array.