Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • AbstractCustomerServiceFactory
  • Customer
  • CustomerDeleter
  • CustomerFactory
  • CustomerReader
  • CustomerReadService
  • CustomerRepository
  • CustomerService
  • CustomerServiceFactory
  • CustomerWriter
  • CustomerWriteService

Class CustomerWriteService

Class CustomerWriteService

This class provides methods for creating and deleting customer data

CustomerWriteService implements CustomerWriteServiceInterface
Package: Customer
Category: System
Implements: CustomerWriteServiceInterface
Located at CoreServices/Customer/CustomerWriteService.inc.php

Methods summary

public
# __construct( AddressBookServiceInterface $addressBookService, CustomerRepositoryInterface $customerRepository, CustomerServiceSettingsInterface $customerServiceSettings, VatNumberValidatorInterface $vatNumberValidator )

Constructor of the class CustomerService.

Constructor of the class CustomerService.

Parameters

$addressBookService
Address book service.
$customerRepository
Customer repository.
$customerServiceSettings
Customer service settings.
$vatNumberValidator
VAT number validator.
public Customer
# createNewRegistree( CustomerEmailInterface $email, CustomerPasswordInterface $password, DateTime $dateOfBirth, CustomerVatNumberInterface $vatNumber, CustomerCallNumberInterface $telephoneNumber, CustomerCallNumberInterface $faxNumber, AddressBlockInterface $addressBlock )

Creates a new customer with the given parameters.

Creates a new customer with the given parameters.

Parameters

$email
Customer's E-Mail address.
$password
Customer's password.
$dateOfBirth
Customer's date of birth.
$vatNumber
Customer's VAT number.
$telephoneNumber
Customer's telephone number.
$faxNumber
Customer's fax number.
$addressBlock
Customer's address.

Returns

Customer
Created customer.

Throws

UnexpectedValueException

On invalid arguments.

TODO Replaced by Vat Check TODO Rename to createNewRegistree

Implementation of

CustomerWriteServiceInterface::createNewRegistree()
public Customer
# createNewGuest( CustomerEmailInterface $email, DateTime $dateOfBirth, CustomerVatNumberInterface $vatNumber, CustomerCallNumberInterface $telephoneNumber, CustomerCallNumberInterface $faxNumber, AddressBlockInterface $addressBlock )

Creates a new guest account with the given parameters.

Creates a new guest account with the given parameters.

Parameters

$email
Customer's E-Mail address.
$dateOfBirth
Customer's date of birth.
$vatNumber
Customer's VAT number.
$telephoneNumber
Customer's telephone number.
$faxNumber
Customer's fax number.
$addressBlock
Customer's address.

Returns

Customer
Created guest customer.

Throws

UnexpectedValueException
On invalid arguments.

Implementation of

CustomerWriteServiceInterface::createNewGuest()
public
# deleteCustomerById( IdType $customerId )

Deletes the customer with the provided ID.

Deletes the customer with the provided ID.

Parameters

$customerId
Customer's ID.

Implementation of

CustomerWriteServiceInterface::deleteCustomerById()
public CustomerInterface
# updateCustomer( CustomerInterface $customer )

Updates customer data.

Updates customer data.

Parameters

$customer
Customer.

Returns

CustomerInterface

Updated customer.

TODO check if the new email address is used by another record

Implementation of

CustomerWriteServiceInterface::updateCustomer()

Properties summary

protected AddressBookServiceInterface $addressBookService

Address book service.

Address book service.

#
protected CustomerRepositoryInterface $customerRepository

Customer repository.

Customer repository.

#
protected CustomerServiceSettingsInterface $customerServiceSettings

Customer service settings.

Customer service settings.

#
protected VatNumberValidatorInterface $vatNumberValidator

VAT number validator.

VAT number validator.

#
API documentation generated by ApiGen