commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentStatusBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Payment
;
10
11
use
Commercetools\Api\Models\State\StateReference
;
12
use
Commercetools\Api\Models\State\StateReferenceBuilder
;
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
PaymentStatusBuilder
implements
Builder
24
{
29
private
$interfaceCode;
30
35
private
$interfaceText;
36
41
private
$state;
42
49
public
function
getInterfaceCode
()
50
{
51
return
$this->interfaceCode;
52
}
53
60
public
function
getInterfaceText
()
61
{
62
return
$this->interfaceText;
63
}
64
71
public
function
getState
()
72
{
73
return
$this->state instanceof
StateReferenceBuilder
? $this->state->
build
() : $this->state;
74
}
75
80
public
function
withInterfaceCode
(?
string
$interfaceCode)
81
{
82
$this->interfaceCode = $interfaceCode;
83
84
return
$this;
85
}
86
91
public
function
withInterfaceText
(?
string
$interfaceText)
92
{
93
$this->interfaceText = $interfaceText;
94
95
return
$this;
96
}
97
102
public
function
withState
(?
StateReference
$state)
103
{
104
$this->state = $state;
105
106
return
$this;
107
}
108
113
public
function
withStateBuilder
(?
StateReferenceBuilder
$state)
114
{
115
$this->state = $state;
116
117
return
$this;
118
}
119
120
public
function
build
():
PaymentStatus
121
{
122
return
new
PaymentStatusModel
(
123
$this->interfaceCode,
124
$this->interfaceText,
125
$this->state instanceof
StateReferenceBuilder
? $this->state->
build
() : $this->state
126
);
127
}
128
129
public
static
function
of
():
PaymentStatusBuilder
130
{
131
return
new
self
();
132
}
133
}
Commercetools\Api\Models\Payment\PaymentStatusBuilder
Definition:
PaymentStatusBuilder.php:24
Commercetools\Api\Models\Payment\PaymentStatusBuilder\withInterfaceText
withInterfaceText(?string $interfaceText)
Definition:
PaymentStatusBuilder.php:91
Commercetools\Api\Models\Payment\PaymentStatusBuilder\getInterfaceCode
getInterfaceCode()
Definition:
PaymentStatusBuilder.php:49
Commercetools\Api\Models\Payment\PaymentStatusBuilder\withState
withState(?StateReference $state)
Definition:
PaymentStatusBuilder.php:102
Commercetools\Api\Models\Payment\PaymentStatusBuilder\withInterfaceCode
withInterfaceCode(?string $interfaceCode)
Definition:
PaymentStatusBuilder.php:80
Commercetools\Api\Models\Payment\PaymentStatusBuilder\of
static of()
Definition:
PaymentStatusBuilder.php:129
Commercetools\Api\Models\Payment\PaymentStatusBuilder\getInterfaceText
getInterfaceText()
Definition:
PaymentStatusBuilder.php:60
Commercetools\Api\Models\Payment\PaymentStatusBuilder\getState
getState()
Definition:
PaymentStatusBuilder.php:71
Commercetools\Api\Models\Payment\PaymentStatusBuilder\withStateBuilder
withStateBuilder(?StateReferenceBuilder $state)
Definition:
PaymentStatusBuilder.php:113
Commercetools\Api\Models\Payment\PaymentStatusBuilder\build
build()
Definition:
PaymentStatusBuilder.php:120
Commercetools\Api\Models\Payment\PaymentStatusModel
Definition:
PaymentStatusModel.php:23
Commercetools\Api\Models\State\StateReferenceBuilder
Definition:
StateReferenceBuilder.php:24
Commercetools\Api\Models\State\StateReferenceBuilder\build
build()
Definition:
StateReferenceBuilder.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\Payment\PaymentStatus
Definition:
PaymentStatus.php:16
Commercetools\Api\Models\State\StateReference
Definition:
StateReference.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