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
Me
MyPaymentBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Me
;
10
11
use
Commercetools\Api\Models\Common\CentPrecisionMoney
;
12
use
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder
;
13
use
Commercetools\Api\Models\Customer\CustomerReference
;
14
use
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
;
15
use
Commercetools\Api\Models\Payment\PaymentMethodInfo
;
16
use
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder
;
17
use
Commercetools\Api\Models\Payment\TransactionCollection
;
18
use
Commercetools\Api\Models\Type\CustomFields
;
19
use
Commercetools\Api\Models\Type\CustomFieldsBuilder
;
20
use
Commercetools\Base\Builder
;
21
use
Commercetools\Base\DateTimeImmutableCollection
;
22
use
Commercetools\Base\JsonObject
;
23
use
Commercetools\Base\JsonObjectModel
;
24
use
Commercetools\Base\MapperFactory
;
25
use stdClass;
26
30
final
class
MyPaymentBuilder
implements
Builder
31
{
36
private
$id;
37
42
private
$version;
43
48
private
$customer;
49
54
private
$anonymousId;
55
60
private
$amountPlanned;
61
66
private
$paymentMethodInfo;
67
72
private
$transactions;
73
78
private
$custom;
79
86
public
function
getId
()
87
{
88
return
$this->id;
89
}
90
97
public
function
getVersion
()
98
{
99
return
$this->version;
100
}
101
108
public
function
getCustomer
()
109
{
110
return
$this->customer instanceof
CustomerReferenceBuilder
? $this->customer->
build
() : $this->customer;
111
}
112
119
public
function
getAnonymousId
()
120
{
121
return
$this->anonymousId;
122
}
123
131
public
function
getAmountPlanned
()
132
{
133
return
$this->amountPlanned instanceof
CentPrecisionMoneyBuilder
? $this->amountPlanned->
build
() : $this->amountPlanned;
134
}
135
142
public
function
getPaymentMethodInfo
()
143
{
144
return
$this->paymentMethodInfo instanceof
PaymentMethodInfoBuilder
? $this->paymentMethodInfo->
build
() : $this->paymentMethodInfo;
145
}
146
153
public
function
getTransactions
()
154
{
155
return
$this->transactions;
156
}
157
164
public
function
getCustom
()
165
{
166
return
$this->custom instanceof
CustomFieldsBuilder
? $this->custom->
build
() : $this->custom;
167
}
168
173
public
function
withId
(?
string
$id)
174
{
175
$this->
id
= $id;
176
177
return
$this;
178
}
179
184
public
function
withVersion
(?
int
$version)
185
{
186
$this->version = $version;
187
188
return
$this;
189
}
190
195
public
function
withCustomer
(?
CustomerReference
$customer)
196
{
197
$this->customer = $customer;
198
199
return
$this;
200
}
201
206
public
function
withAnonymousId
(?
string
$anonymousId)
207
{
208
$this->anonymousId = $anonymousId;
209
210
return
$this;
211
}
212
217
public
function
withAmountPlanned
(?
CentPrecisionMoney
$amountPlanned)
218
{
219
$this->amountPlanned = $amountPlanned;
220
221
return
$this;
222
}
223
228
public
function
withPaymentMethodInfo
(?
PaymentMethodInfo
$paymentMethodInfo)
229
{
230
$this->paymentMethodInfo = $paymentMethodInfo;
231
232
return
$this;
233
}
234
239
public
function
withTransactions
(?
TransactionCollection
$transactions)
240
{
241
$this->transactions = $transactions;
242
243
return
$this;
244
}
245
250
public
function
withCustom
(?
CustomFields
$custom)
251
{
252
$this->custom = $custom;
253
254
return
$this;
255
}
256
261
public
function
withCustomerBuilder
(?
CustomerReferenceBuilder
$customer)
262
{
263
$this->customer = $customer;
264
265
return
$this;
266
}
267
272
public
function
withAmountPlannedBuilder
(?
CentPrecisionMoneyBuilder
$amountPlanned)
273
{
274
$this->amountPlanned = $amountPlanned;
275
276
return
$this;
277
}
278
283
public
function
withPaymentMethodInfoBuilder
(?
PaymentMethodInfoBuilder
$paymentMethodInfo)
284
{
285
$this->paymentMethodInfo = $paymentMethodInfo;
286
287
return
$this;
288
}
289
294
public
function
withCustomBuilder
(?
CustomFieldsBuilder
$custom)
295
{
296
$this->custom = $custom;
297
298
return
$this;
299
}
300
301
public
function
build
():
MyPayment
302
{
303
return
new
MyPaymentModel
(
304
$this->
id
,
305
$this->version,
306
$this->customer instanceof
CustomerReferenceBuilder
? $this->customer->
build
() : $this->customer,
307
$this->anonymousId,
308
$this->amountPlanned instanceof
CentPrecisionMoneyBuilder
? $this->amountPlanned->
build
() : $this->amountPlanned,
309
$this->paymentMethodInfo instanceof
PaymentMethodInfoBuilder
? $this->paymentMethodInfo->
build
() : $this->paymentMethodInfo,
310
$this->transactions,
311
$this->custom instanceof
CustomFieldsBuilder
? $this->custom->
build
() : $this->custom
312
);
313
}
314
315
public
static
function
of
():
MyPaymentBuilder
316
{
317
return
new
self
();
318
}
319
}
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder
Definition
CentPrecisionMoneyBuilder.php:22
Commercetools\Api\Models\Common\CentPrecisionMoneyBuilder\build
build()
Definition
CentPrecisionMoneyBuilder.php:112
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
Definition
CustomerReferenceBuilder.php:24
Commercetools\Api\Models\Customer\CustomerReferenceBuilder\build
build()
Definition
CustomerReferenceBuilder.php:92
Commercetools\Api\Models\Me\MyPaymentBuilder
Definition
MyPaymentBuilder.php:31
Commercetools\Api\Models\Me\MyPaymentBuilder\withPaymentMethodInfo
withPaymentMethodInfo(?PaymentMethodInfo $paymentMethodInfo)
Definition
MyPaymentBuilder.php:228
Commercetools\Api\Models\Me\MyPaymentBuilder\withVersion
withVersion(?int $version)
Definition
MyPaymentBuilder.php:184
Commercetools\Api\Models\Me\MyPaymentBuilder\getVersion
getVersion()
Definition
MyPaymentBuilder.php:97
Commercetools\Api\Models\Me\MyPaymentBuilder\withTransactions
withTransactions(?TransactionCollection $transactions)
Definition
MyPaymentBuilder.php:239
Commercetools\Api\Models\Me\MyPaymentBuilder\getAnonymousId
getAnonymousId()
Definition
MyPaymentBuilder.php:119
Commercetools\Api\Models\Me\MyPaymentBuilder\of
static of()
Definition
MyPaymentBuilder.php:315
Commercetools\Api\Models\Me\MyPaymentBuilder\build
build()
Definition
MyPaymentBuilder.php:301
Commercetools\Api\Models\Me\MyPaymentBuilder\withPaymentMethodInfoBuilder
withPaymentMethodInfoBuilder(?PaymentMethodInfoBuilder $paymentMethodInfo)
Definition
MyPaymentBuilder.php:283
Commercetools\Api\Models\Me\MyPaymentBuilder\withId
withId(?string $id)
Definition
MyPaymentBuilder.php:173
Commercetools\Api\Models\Me\MyPaymentBuilder\getTransactions
getTransactions()
Definition
MyPaymentBuilder.php:153
Commercetools\Api\Models\Me\MyPaymentBuilder\withCustom
withCustom(?CustomFields $custom)
Definition
MyPaymentBuilder.php:250
Commercetools\Api\Models\Me\MyPaymentBuilder\withCustomer
withCustomer(?CustomerReference $customer)
Definition
MyPaymentBuilder.php:195
Commercetools\Api\Models\Me\MyPaymentBuilder\withAnonymousId
withAnonymousId(?string $anonymousId)
Definition
MyPaymentBuilder.php:206
Commercetools\Api\Models\Me\MyPaymentBuilder\withAmountPlannedBuilder
withAmountPlannedBuilder(?CentPrecisionMoneyBuilder $amountPlanned)
Definition
MyPaymentBuilder.php:272
Commercetools\Api\Models\Me\MyPaymentBuilder\getCustomer
getCustomer()
Definition
MyPaymentBuilder.php:108
Commercetools\Api\Models\Me\MyPaymentBuilder\getAmountPlanned
getAmountPlanned()
Definition
MyPaymentBuilder.php:131
Commercetools\Api\Models\Me\MyPaymentBuilder\getId
getId()
Definition
MyPaymentBuilder.php:86
Commercetools\Api\Models\Me\MyPaymentBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsBuilder $custom)
Definition
MyPaymentBuilder.php:294
Commercetools\Api\Models\Me\MyPaymentBuilder\getPaymentMethodInfo
getPaymentMethodInfo()
Definition
MyPaymentBuilder.php:142
Commercetools\Api\Models\Me\MyPaymentBuilder\withAmountPlanned
withAmountPlanned(?CentPrecisionMoney $amountPlanned)
Definition
MyPaymentBuilder.php:217
Commercetools\Api\Models\Me\MyPaymentBuilder\withCustomerBuilder
withCustomerBuilder(?CustomerReferenceBuilder $customer)
Definition
MyPaymentBuilder.php:261
Commercetools\Api\Models\Me\MyPaymentBuilder\getCustom
getCustom()
Definition
MyPaymentBuilder.php:164
Commercetools\Api\Models\Me\MyPaymentModel
Definition
MyPaymentModel.php:30
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder
Definition
PaymentMethodInfoBuilder.php:24
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\build
build()
Definition
PaymentMethodInfoBuilder.php:122
Commercetools\Api\Models\Payment\TransactionCollection
Definition
TransactionCollection.php:22
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\CentPrecisionMoney
Definition
CentPrecisionMoney.php:15
Commercetools\Api\Models\Customer\CustomerReference
Definition
CustomerReference.php:16
Commercetools\Api\Models\Me\MyPayment
Definition
MyPayment.php:20
Commercetools\Api\Models\Payment\PaymentMethodInfo
Definition
PaymentMethodInfo.php:16
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\Me
Definition
MyBusinessUnitAddAddressAction.php:9
Generated by
1.9.8