commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Payment
PaymentMethodInfoDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Payment
;
10
11
use
Commercetools\Api\Models\Common\LocalizedString
;
12
use
Commercetools\Api\Models\Common\LocalizedStringBuilder
;
13
use
Commercetools\Api\Models\PaymentMethod\PaymentMethodToken
;
14
use
Commercetools\Api\Models\PaymentMethod\PaymentMethodTokenBuilder
;
15
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
16
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
17
use
Commercetools\Base\Builder
;
18
use
Commercetools\Base\DateTimeImmutableCollection
;
19
use
Commercetools\Base\JsonObject
;
20
use
Commercetools\Base\JsonObjectModel
;
21
use
Commercetools\Base\MapperFactory
;
22
use stdClass;
23
27
final
class
PaymentMethodInfoDraftBuilder
implements
Builder
28
{
33
private
$paymentInterface;
34
39
private
$method;
40
45
private
$name;
46
51
private
$token;
52
57
private
$interfaceAccount;
58
63
private
$custom;
64
73
public
function
getPaymentInterface
()
74
{
75
return
$this->paymentInterface;
76
}
77
84
public
function
getMethod
()
85
{
86
return
$this->method;
87
}
88
95
public
function
getName
()
96
{
97
return
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name;
98
}
99
106
public
function
getToken
()
107
{
108
return
$this->token instanceof
PaymentMethodTokenBuilder
? $this->token->
build
() : $this->token;
109
}
110
117
public
function
getInterfaceAccount
()
118
{
119
return
$this->interfaceAccount;
120
}
121
128
public
function
getCustom
()
129
{
130
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
131
}
132
137
public
function
withPaymentInterface
(?
string
$paymentInterface)
138
{
139
$this->paymentInterface = $paymentInterface;
140
141
return
$this;
142
}
143
148
public
function
withMethod
(?
string
$method)
149
{
150
$this->method = $method;
151
152
return
$this;
153
}
154
159
public
function
withName
(?
LocalizedString
$name)
160
{
161
$this->name = $name;
162
163
return
$this;
164
}
165
170
public
function
withToken
(?
PaymentMethodToken
$token)
171
{
172
$this->token = $token;
173
174
return
$this;
175
}
176
181
public
function
withInterfaceAccount
(?
string
$interfaceAccount)
182
{
183
$this->interfaceAccount = $interfaceAccount;
184
185
return
$this;
186
}
187
192
public
function
withCustom
(?
CustomFieldsDraft
$custom)
193
{
194
$this->custom = $custom;
195
196
return
$this;
197
}
198
203
public
function
withNameBuilder
(?
LocalizedStringBuilder
$name)
204
{
205
$this->name = $name;
206
207
return
$this;
208
}
209
214
public
function
withTokenBuilder
(?
PaymentMethodTokenBuilder
$token)
215
{
216
$this->token = $token;
217
218
return
$this;
219
}
220
225
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
226
{
227
$this->custom = $custom;
228
229
return
$this;
230
}
231
232
public
function
build
():
PaymentMethodInfoDraft
233
{
234
return
new
PaymentMethodInfoDraftModel
(
235
$this->paymentInterface,
236
$this->method,
237
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name,
238
$this->token instanceof
PaymentMethodTokenBuilder
? $this->token->
build
() : $this->token,
239
$this->interfaceAccount,
240
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom
241
);
242
}
243
244
public
static
function
of
():
PaymentMethodInfoDraftBuilder
245
{
246
return
new
self
();
247
}
248
}
Commercetools\Api\Models\Common\LocalizedStringBuilder
Definition
LocalizedStringBuilder.php:20
Commercetools\Api\Models\Common\LocalizedStringBuilder\build
build()
Definition
LocalizedStringBuilder.php:42
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder
Definition
PaymentMethodInfoDraftBuilder.php:28
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
PaymentMethodInfoDraftBuilder.php:192
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withTokenBuilder
withTokenBuilder(?PaymentMethodTokenBuilder $token)
Definition
PaymentMethodInfoDraftBuilder.php:214
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withMethod
withMethod(?string $method)
Definition
PaymentMethodInfoDraftBuilder.php:148
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\getMethod
getMethod()
Definition
PaymentMethodInfoDraftBuilder.php:84
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\getName
getName()
Definition
PaymentMethodInfoDraftBuilder.php:95
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\getInterfaceAccount
getInterfaceAccount()
Definition
PaymentMethodInfoDraftBuilder.php:117
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\build
build()
Definition
PaymentMethodInfoDraftBuilder.php:232
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withNameBuilder
withNameBuilder(?LocalizedStringBuilder $name)
Definition
PaymentMethodInfoDraftBuilder.php:203
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
PaymentMethodInfoDraftBuilder.php:225
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withPaymentInterface
withPaymentInterface(?string $paymentInterface)
Definition
PaymentMethodInfoDraftBuilder.php:137
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withToken
withToken(?PaymentMethodToken $token)
Definition
PaymentMethodInfoDraftBuilder.php:170
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\getCustom
getCustom()
Definition
PaymentMethodInfoDraftBuilder.php:128
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withName
withName(?LocalizedString $name)
Definition
PaymentMethodInfoDraftBuilder.php:159
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\getPaymentInterface
getPaymentInterface()
Definition
PaymentMethodInfoDraftBuilder.php:73
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\getToken
getToken()
Definition
PaymentMethodInfoDraftBuilder.php:106
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\withInterfaceAccount
withInterfaceAccount(?string $interfaceAccount)
Definition
PaymentMethodInfoDraftBuilder.php:181
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftBuilder\of
static of()
Definition
PaymentMethodInfoDraftBuilder.php:244
Commercetools\Api\Models\Payment\PaymentMethodInfoDraftModel
Definition
PaymentMethodInfoDraftModel.php:27
Commercetools\Api\Models\PaymentMethod\PaymentMethodTokenBuilder
Definition
PaymentMethodTokenBuilder.php:22
Commercetools\Api\Models\PaymentMethod\PaymentMethodTokenBuilder\build
build()
Definition
PaymentMethodTokenBuilder.php:63
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition
CustomFieldsDraftBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\Api\Models\Payment\PaymentMethodInfoDraft
Definition
PaymentMethodInfoDraft.php:18
Commercetools\Api\Models\PaymentMethod\PaymentMethodToken
Definition
PaymentMethodToken.php:15
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition
CustomFieldsDraft.php:15
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.8