commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ApprovalFlow
ApprovalFlowApprovalBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ApprovalFlow
;
10
11
use
Commercetools\Api\Models\BusinessUnit\Associate
;
12
use
Commercetools\Api\Models\BusinessUnit\AssociateBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use DateTimeImmutable;
19
use stdClass;
20
24
final
class
ApprovalFlowApprovalBuilder
implements
Builder
25
{
30
private
$approver;
31
36
private
$approvedAt;
37
44
public
function
getApprover
()
45
{
46
return
$this->approver instanceof
AssociateBuilder
? $this->approver->
build
() : $this->approver;
47
}
48
55
public
function
getApprovedAt
()
56
{
57
return
$this->approvedAt;
58
}
59
64
public
function
withApprover
(?
Associate
$approver)
65
{
66
$this->approver = $approver;
67
68
return
$this;
69
}
70
75
public
function
withApprovedAt
(?DateTimeImmutable $approvedAt)
76
{
77
$this->approvedAt = $approvedAt;
78
79
return
$this;
80
}
81
86
public
function
withApproverBuilder
(?
AssociateBuilder
$approver)
87
{
88
$this->approver = $approver;
89
90
return
$this;
91
}
92
93
public
function
build
():
ApprovalFlowApproval
94
{
95
return
new
ApprovalFlowApprovalModel
(
96
$this->approver instanceof
AssociateBuilder
? $this->approver->
build
() : $this->approver,
97
$this->approvedAt
98
);
99
}
100
101
public
static
function
of
():
ApprovalFlowApprovalBuilder
102
{
103
return
new
self
();
104
}
105
}
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder
Definition:
ApprovalFlowApprovalBuilder.php:25
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\withApprovedAt
withApprovedAt(?DateTimeImmutable $approvedAt)
Definition:
ApprovalFlowApprovalBuilder.php:75
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\getApprovedAt
getApprovedAt()
Definition:
ApprovalFlowApprovalBuilder.php:55
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\getApprover
getApprover()
Definition:
ApprovalFlowApprovalBuilder.php:44
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\withApprover
withApprover(?Associate $approver)
Definition:
ApprovalFlowApprovalBuilder.php:64
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\build
build()
Definition:
ApprovalFlowApprovalBuilder.php:93
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\of
static of()
Definition:
ApprovalFlowApprovalBuilder.php:101
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalBuilder\withApproverBuilder
withApproverBuilder(?AssociateBuilder $approver)
Definition:
ApprovalFlowApprovalBuilder.php:86
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApprovalModel
Definition:
ApprovalFlowApprovalModel.php:24
Commercetools\Api\Models\BusinessUnit\AssociateBuilder
Definition:
AssociateBuilder.php:24
Commercetools\Api\Models\BusinessUnit\AssociateBuilder\build
build()
Definition:
AssociateBuilder.php:92
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\ApprovalFlow\ApprovalFlowApproval
Definition:
ApprovalFlowApproval.php:17
Commercetools\Api\Models\BusinessUnit\Associate
Definition:
Associate.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ApprovalFlow
Definition:
ApprovalFlow.php:9
Generated by
1.9.1