commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentTransitionStateActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Payment
;
10
11
use
Commercetools\Api\Models\State\StateResourceIdentifier
;
12
use
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
;
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 stdClass;
19
23
final
class
PaymentTransitionStateActionBuilder
implements
Builder
24
{
29
private
$state;
30
35
private
$force;
36
43
public
function
getState
()
44
{
45
return
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state;
46
}
47
54
public
function
getForce
()
55
{
56
return
$this->force;
57
}
58
63
public
function
withState
(?
StateResourceIdentifier
$state)
64
{
65
$this->state = $state;
66
67
return
$this;
68
}
69
74
public
function
withForce
(?
bool
$force)
75
{
76
$this->force = $force;
77
78
return
$this;
79
}
80
85
public
function
withStateBuilder
(?
StateResourceIdentifierBuilder
$state)
86
{
87
$this->state = $state;
88
89
return
$this;
90
}
91
92
public
function
build
():
PaymentTransitionStateAction
93
{
94
return
new
PaymentTransitionStateActionModel
(
95
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state,
96
$this->force
97
);
98
}
99
100
public
static
function
of
():
PaymentTransitionStateActionBuilder
101
{
102
return
new
self
();
103
}
104
}
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder
Definition:
PaymentTransitionStateActionBuilder.php:24
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\withState
withState(?StateResourceIdentifier $state)
Definition:
PaymentTransitionStateActionBuilder.php:63
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\withForce
withForce(?bool $force)
Definition:
PaymentTransitionStateActionBuilder.php:74
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\getState
getState()
Definition:
PaymentTransitionStateActionBuilder.php:43
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\withStateBuilder
withStateBuilder(?StateResourceIdentifierBuilder $state)
Definition:
PaymentTransitionStateActionBuilder.php:85
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\build
build()
Definition:
PaymentTransitionStateActionBuilder.php:92
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\of
static of()
Definition:
PaymentTransitionStateActionBuilder.php:100
Commercetools\Api\Models\Payment\PaymentTransitionStateActionBuilder\getForce
getForce()
Definition:
PaymentTransitionStateActionBuilder.php:54
Commercetools\Api\Models\Payment\PaymentTransitionStateActionModel
Definition:
PaymentTransitionStateActionModel.php:23
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
Definition:
StateResourceIdentifierBuilder.php:24
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\build
build()
Definition:
StateResourceIdentifierBuilder.php:82
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Payment\PaymentTransitionStateAction
Definition:
PaymentTransitionStateAction.php:16
Commercetools\Api\Models\State\StateResourceIdentifier
Definition:
StateResourceIdentifier.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Payment
Definition:
Payment.php:9
Generated by
1.9.1