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
PaymentMethodInfoBuilder.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\CustomFields
;
16
use
Commercetools\Api\Models\Type\CustomFieldsBuilder
;
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
PaymentMethodInfoBuilder
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
72
public
function
getPaymentInterface
()
73
{
74
return
$this->paymentInterface;
75
}
76
83
public
function
getMethod
()
84
{
85
return
$this->method;
86
}
87
94
public
function
getName
()
95
{
96
return
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name;
97
}
98
105
public
function
getToken
()
106
{
107
return
$this->token instanceof
PaymentMethodTokenBuilder
? $this->token->
build
() : $this->token;
108
}
109
116
public
function
getInterfaceAccount
()
117
{
118
return
$this->interfaceAccount;
119
}
120
127
public
function
getCustom
()
128
{
129
return
$this->custom instanceof
CustomFieldsBuilder
? $this->custom->
build
() : $this->custom;
130
}
131
136
public
function
withPaymentInterface
(?
string
$paymentInterface)
137
{
138
$this->paymentInterface = $paymentInterface;
139
140
return
$this;
141
}
142
147
public
function
withMethod
(?
string
$method)
148
{
149
$this->method = $method;
150
151
return
$this;
152
}
153
158
public
function
withName
(?
LocalizedString
$name)
159
{
160
$this->name = $name;
161
162
return
$this;
163
}
164
169
public
function
withToken
(?
PaymentMethodToken
$token)
170
{
171
$this->token = $token;
172
173
return
$this;
174
}
175
180
public
function
withInterfaceAccount
(?
string
$interfaceAccount)
181
{
182
$this->interfaceAccount = $interfaceAccount;
183
184
return
$this;
185
}
186
191
public
function
withCustom
(?
CustomFields
$custom)
192
{
193
$this->custom = $custom;
194
195
return
$this;
196
}
197
202
public
function
withNameBuilder
(?
LocalizedStringBuilder
$name)
203
{
204
$this->name = $name;
205
206
return
$this;
207
}
208
213
public
function
withTokenBuilder
(?
PaymentMethodTokenBuilder
$token)
214
{
215
$this->token = $token;
216
217
return
$this;
218
}
219
224
public
function
withCustomBuilder
(?
CustomFieldsBuilder
$custom)
225
{
226
$this->custom = $custom;
227
228
return
$this;
229
}
230
231
public
function
build
():
PaymentMethodInfo
232
{
233
return
new
PaymentMethodInfoModel
(
234
$this->paymentInterface,
235
$this->method,
236
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name,
237
$this->token instanceof
PaymentMethodTokenBuilder
? $this->token->
build
() : $this->token,
238
$this->interfaceAccount,
239
$this->custom instanceof
CustomFieldsBuilder
? $this->custom->
build
() : $this->custom
240
);
241
}
242
243
public
static
function
of
():
PaymentMethodInfoBuilder
244
{
245
return
new
self
();
246
}
247
}
Commercetools\Api\Models\Common\LocalizedStringBuilder
Definition
LocalizedStringBuilder.php:20
Commercetools\Api\Models\Common\LocalizedStringBuilder\build
build()
Definition
LocalizedStringBuilder.php:42
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder
Definition
PaymentMethodInfoBuilder.php:28
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withPaymentInterface
withPaymentInterface(?string $paymentInterface)
Definition
PaymentMethodInfoBuilder.php:136
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withInterfaceAccount
withInterfaceAccount(?string $interfaceAccount)
Definition
PaymentMethodInfoBuilder.php:180
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\of
static of()
Definition
PaymentMethodInfoBuilder.php:243
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withTokenBuilder
withTokenBuilder(?PaymentMethodTokenBuilder $token)
Definition
PaymentMethodInfoBuilder.php:213
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withNameBuilder
withNameBuilder(?LocalizedStringBuilder $name)
Definition
PaymentMethodInfoBuilder.php:202
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withToken
withToken(?PaymentMethodToken $token)
Definition
PaymentMethodInfoBuilder.php:169
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withName
withName(?LocalizedString $name)
Definition
PaymentMethodInfoBuilder.php:158
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withMethod
withMethod(?string $method)
Definition
PaymentMethodInfoBuilder.php:147
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withCustom
withCustom(?CustomFields $custom)
Definition
PaymentMethodInfoBuilder.php:191
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsBuilder $custom)
Definition
PaymentMethodInfoBuilder.php:224
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\build
build()
Definition
PaymentMethodInfoBuilder.php:231
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getMethod
getMethod()
Definition
PaymentMethodInfoBuilder.php:83
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getPaymentInterface
getPaymentInterface()
Definition
PaymentMethodInfoBuilder.php:72
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getName
getName()
Definition
PaymentMethodInfoBuilder.php:94
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getInterfaceAccount
getInterfaceAccount()
Definition
PaymentMethodInfoBuilder.php:116
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getCustom
getCustom()
Definition
PaymentMethodInfoBuilder.php:127
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getToken
getToken()
Definition
PaymentMethodInfoBuilder.php:105
Commercetools\Api\Models\Payment\PaymentMethodInfoModel
Definition
PaymentMethodInfoModel.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\CustomFieldsBuilder
Definition
CustomFieldsBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsBuilder\build
build()
Definition
CustomFieldsBuilder.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\PaymentMethodInfo
Definition
PaymentMethodInfo.php:18
Commercetools\Api\Models\PaymentMethod\PaymentMethodToken
Definition
PaymentMethodToken.php:15
Commercetools\Api\Models\Type\CustomFields
Definition
CustomFields.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