commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentStatusDraftBuilder.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
PaymentStatusDraftBuilder
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
StateResourceIdentifierBuilder
? $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
(?
StateResourceIdentifier
$state)
103
{
104
$this->state = $state;
105
106
return
$this;
107
}
108
113
public
function
withStateBuilder
(?
StateResourceIdentifierBuilder
$state)
114
{
115
$this->state = $state;
116
117
return
$this;
118
}
119
120
public
function
build
():
PaymentStatusDraft
121
{
122
return
new
PaymentStatusDraftModel
(
123
$this->interfaceCode,
124
$this->interfaceText,
125
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state
126
);
127
}
128
129
public
static
function
of
():
PaymentStatusDraftBuilder
130
{
131
return
new
self
();
132
}
133
}
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder
Definition:
PaymentStatusDraftBuilder.php:24
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\withStateBuilder
withStateBuilder(?StateResourceIdentifierBuilder $state)
Definition:
PaymentStatusDraftBuilder.php:113
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\of
static of()
Definition:
PaymentStatusDraftBuilder.php:129
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\withInterfaceCode
withInterfaceCode(?string $interfaceCode)
Definition:
PaymentStatusDraftBuilder.php:80
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\withState
withState(?StateResourceIdentifier $state)
Definition:
PaymentStatusDraftBuilder.php:102
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\build
build()
Definition:
PaymentStatusDraftBuilder.php:120
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\getInterfaceCode
getInterfaceCode()
Definition:
PaymentStatusDraftBuilder.php:49
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\getInterfaceText
getInterfaceText()
Definition:
PaymentStatusDraftBuilder.php:60
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\getState
getState()
Definition:
PaymentStatusDraftBuilder.php:71
Commercetools\Api\Models\Payment\PaymentStatusDraftBuilder\withInterfaceText
withInterfaceText(?string $interfaceText)
Definition:
PaymentStatusDraftBuilder.php:91
Commercetools\Api\Models\Payment\PaymentStatusDraftModel
Definition:
PaymentStatusDraftModel.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\PaymentStatusDraft
Definition:
PaymentStatusDraft.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