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
MyPaymentDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Me
;
10
11
use
Commercetools\Api\Models\Common\Money
;
12
use
Commercetools\Api\Models\Common\MoneyBuilder
;
13
use
Commercetools\Api\Models\Payment\PaymentMethodInfo
;
14
use
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder
;
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
MyPaymentDraftBuilder
implements
Builder
28
{
33
private
$amountPlanned;
34
39
private
$paymentMethodInfo;
40
45
private
$custom;
46
51
private
$transaction;
52
60
public
function
getAmountPlanned
()
61
{
62
return
$this->amountPlanned instanceof
MoneyBuilder
? $this->amountPlanned->
build
() : $this->amountPlanned;
63
}
64
71
public
function
getPaymentMethodInfo
()
72
{
73
return
$this->paymentMethodInfo instanceof
PaymentMethodInfoBuilder
? $this->paymentMethodInfo->
build
() : $this->paymentMethodInfo;
74
}
75
82
public
function
getCustom
()
83
{
84
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
85
}
86
93
public
function
getTransaction
()
94
{
95
return
$this->transaction instanceof
MyTransactionDraftBuilder
? $this->transaction->
build
() : $this->transaction;
96
}
97
102
public
function
withAmountPlanned
(?
Money
$amountPlanned)
103
{
104
$this->amountPlanned = $amountPlanned;
105
106
return
$this;
107
}
108
113
public
function
withPaymentMethodInfo
(?
PaymentMethodInfo
$paymentMethodInfo)
114
{
115
$this->paymentMethodInfo = $paymentMethodInfo;
116
117
return
$this;
118
}
119
124
public
function
withCustom
(?
CustomFieldsDraft
$custom)
125
{
126
$this->custom = $custom;
127
128
return
$this;
129
}
130
135
public
function
withTransaction
(?
MyTransactionDraft
$transaction)
136
{
137
$this->transaction = $transaction;
138
139
return
$this;
140
}
141
146
public
function
withAmountPlannedBuilder
(?
MoneyBuilder
$amountPlanned)
147
{
148
$this->amountPlanned = $amountPlanned;
149
150
return
$this;
151
}
152
157
public
function
withPaymentMethodInfoBuilder
(?
PaymentMethodInfoBuilder
$paymentMethodInfo)
158
{
159
$this->paymentMethodInfo = $paymentMethodInfo;
160
161
return
$this;
162
}
163
168
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
169
{
170
$this->custom = $custom;
171
172
return
$this;
173
}
174
179
public
function
withTransactionBuilder
(?
MyTransactionDraftBuilder
$transaction)
180
{
181
$this->transaction = $transaction;
182
183
return
$this;
184
}
185
186
public
function
build
():
MyPaymentDraft
187
{
188
return
new
MyPaymentDraftModel
(
189
$this->amountPlanned instanceof
MoneyBuilder
? $this->amountPlanned->
build
() : $this->amountPlanned,
190
$this->paymentMethodInfo instanceof
PaymentMethodInfoBuilder
? $this->paymentMethodInfo->
build
() : $this->paymentMethodInfo,
191
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom,
192
$this->transaction instanceof
MyTransactionDraftBuilder
? $this->transaction->
build
() : $this->transaction
193
);
194
}
195
196
public
static
function
of
():
MyPaymentDraftBuilder
197
{
198
return
new
self
();
199
}
200
}
Commercetools\Api\Models\Common\MoneyBuilder
Definition
MoneyBuilder.php:22
Commercetools\Api\Models\Common\MoneyBuilder\build
build()
Definition
MoneyBuilder.php:84
Commercetools\Api\Models\Me\MyPaymentDraftBuilder
Definition
MyPaymentDraftBuilder.php:28
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withPaymentMethodInfo
withPaymentMethodInfo(?PaymentMethodInfo $paymentMethodInfo)
Definition
MyPaymentDraftBuilder.php:113
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
MyPaymentDraftBuilder.php:168
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\getTransaction
getTransaction()
Definition
MyPaymentDraftBuilder.php:93
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withTransactionBuilder
withTransactionBuilder(?MyTransactionDraftBuilder $transaction)
Definition
MyPaymentDraftBuilder.php:179
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\getCustom
getCustom()
Definition
MyPaymentDraftBuilder.php:82
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withTransaction
withTransaction(?MyTransactionDraft $transaction)
Definition
MyPaymentDraftBuilder.php:135
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
MyPaymentDraftBuilder.php:124
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withAmountPlannedBuilder
withAmountPlannedBuilder(?MoneyBuilder $amountPlanned)
Definition
MyPaymentDraftBuilder.php:146
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\getPaymentMethodInfo
getPaymentMethodInfo()
Definition
MyPaymentDraftBuilder.php:71
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\getAmountPlanned
getAmountPlanned()
Definition
MyPaymentDraftBuilder.php:60
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\of
static of()
Definition
MyPaymentDraftBuilder.php:196
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\build
build()
Definition
MyPaymentDraftBuilder.php:186
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withAmountPlanned
withAmountPlanned(?Money $amountPlanned)
Definition
MyPaymentDraftBuilder.php:102
Commercetools\Api\Models\Me\MyPaymentDraftBuilder\withPaymentMethodInfoBuilder
withPaymentMethodInfoBuilder(?PaymentMethodInfoBuilder $paymentMethodInfo)
Definition
MyPaymentDraftBuilder.php:157
Commercetools\Api\Models\Me\MyPaymentDraftModel
Definition
MyPaymentDraftModel.php:27
Commercetools\Api\Models\Me\MyTransactionDraftBuilder
Definition
MyTransactionDraftBuilder.php:27
Commercetools\Api\Models\Me\MyTransactionDraftBuilder\build
build()
Definition
MyTransactionDraftBuilder.php:192
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder
Definition
PaymentMethodInfoBuilder.php:24
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\build
build()
Definition
PaymentMethodInfoBuilder.php:122
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\Money
Definition
Money.php:15
Commercetools\Api\Models\Me\MyPaymentDraft
Definition
MyPaymentDraft.php:18
Commercetools\Api\Models\Me\MyTransactionDraft
Definition
MyTransactionDraft.php:18
Commercetools\Api\Models\Payment\PaymentMethodInfo
Definition
PaymentMethodInfo.php:16
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\Me
Definition
MyBusinessUnitAddAddressAction.php:9
Generated by
1.9.8