AgreementWriteService
in package
implements
AgreementWriteServiceInterface
Class AgreementWriteService
This class provides methods in order to store and delete agreements.
Tags
Interfaces, Classes and Traits
- AgreementWriteServiceInterface
- Interface AgreementWriteServiceInterface
Table of Contents
- $factory : AgreementFactory
- __construct() : mixed
- AgreementWriteService constructor.
- create() : Agreement
- Returns an agreement entity.
- createCustomer() : AgreementCustomer
- Returns an agreement customer.
- delete() : $this|AgreementWriteServiceInterface
- Deletes the provided agreement.
- store() : $this|AgreementWriteServiceInterface
- Stores the provided agreement.
Properties
$factory
protected
AgreementFactory
$factory
Methods
__construct()
AgreementWriteService constructor.
public
__construct(AgreementFactory $factory) : mixed
Parameters
- $factory : AgreementFactory
Return values
mixed —create()
Returns an agreement entity.
public
create() : Agreement
Return values
Agreement —createCustomer()
Returns an agreement customer.
public
createCustomer(StringType $customerName, CustomerEmailInterface $customerEmail) : AgreementCustomer
Parameters
- $customerName : StringType
-
Customer name.
- $customerEmail : CustomerEmailInterface
-
Customer email.
Return values
AgreementCustomer —delete()
Deletes the provided agreement.
public
delete(AgreementInterface $agreement) : $this|AgreementWriteServiceInterface
Parameters
- $agreement : AgreementInterface
Return values
$this|AgreementWriteServiceInterface —Same instance for chained method calls.
store()
Stores the provided agreement.
public
store(AgreementInterface $agreement) : $this|AgreementWriteServiceInterface
Parameters
- $agreement : AgreementInterface
Return values
$this|AgreementWriteServiceInterface —Same instance for chained method calls.