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
MyPaymentDraftModel.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\MoneyModel
;
13
use
Commercetools\Api\Models\Payment\PaymentMethodInfo
;
14
use
Commercetools\Api\Models\Payment\PaymentMethodInfoModel
;
15
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
16
use
Commercetools\Api\Models\Type\CustomFieldsDraftModel
;
17
use
Commercetools\Base\DateTimeImmutableCollection
;
18
use
Commercetools\Base\JsonObject
;
19
use
Commercetools\Base\JsonObjectModel
;
20
use
Commercetools\Base\MapperFactory
;
21
use stdClass;
22
26
final
class
MyPaymentDraftModel
extends
JsonObjectModel
implements
MyPaymentDraft
27
{
32
protected
$amountPlanned
;
33
38
protected
$paymentMethodInfo
;
39
44
protected
$custom
;
45
50
protected
$transaction
;
51
52
56
public
function
__construct
(
57
?
Money
$amountPlanned
=
null
,
58
?
PaymentMethodInfo
$paymentMethodInfo
=
null
,
59
?
CustomFieldsDraft
$custom
=
null
,
60
?
MyTransactionDraft
$transaction
=
null
61
) {
62
$this->amountPlanned =
$amountPlanned
;
63
$this->paymentMethodInfo =
$paymentMethodInfo
;
64
$this->custom =
$custom
;
65
$this->transaction =
$transaction
;
66
}
67
75
public
function
getAmountPlanned
()
76
{
77
if
(is_null($this->amountPlanned)) {
79
$data = $this->
raw
(self::FIELD_AMOUNT_PLANNED);
80
if
(is_null($data)) {
81
return
null
;
82
}
83
84
$this->amountPlanned = MoneyModel::of($data);
85
}
86
87
return
$this->amountPlanned
;
88
}
89
96
public
function
getPaymentMethodInfo
()
97
{
98
if
(is_null($this->paymentMethodInfo)) {
100
$data = $this->
raw
(self::FIELD_PAYMENT_METHOD_INFO);
101
if
(is_null($data)) {
102
return
null
;
103
}
104
105
$this->paymentMethodInfo = PaymentMethodInfoModel::of($data);
106
}
107
108
return
$this->paymentMethodInfo
;
109
}
110
117
public
function
getCustom
()
118
{
119
if
(is_null($this->custom)) {
121
$data = $this->
raw
(self::FIELD_CUSTOM);
122
if
(is_null($data)) {
123
return
null
;
124
}
125
126
$this->custom = CustomFieldsDraftModel::of($data);
127
}
128
129
return
$this->custom
;
130
}
131
138
public
function
getTransaction
()
139
{
140
if
(is_null($this->transaction)) {
142
$data = $this->
raw
(self::FIELD_TRANSACTION);
143
if
(is_null($data)) {
144
return
null
;
145
}
146
147
$this->transaction =
MyTransactionDraftModel::of
($data);
148
}
149
150
return
$this->transaction
;
151
}
152
153
157
public
function
setAmountPlanned
(?
Money
$amountPlanned
): void
158
{
159
$this->amountPlanned =
$amountPlanned
;
160
}
161
165
public
function
setPaymentMethodInfo
(?
PaymentMethodInfo
$paymentMethodInfo
): void
166
{
167
$this->paymentMethodInfo =
$paymentMethodInfo
;
168
}
169
173
public
function
setCustom
(?
CustomFieldsDraft
$custom
): void
174
{
175
$this->custom =
$custom
;
176
}
177
181
public
function
setTransaction
(?
MyTransactionDraft
$transaction
): void
182
{
183
$this->transaction =
$transaction
;
184
}
185
}
Commercetools\Api\Models\Common\MoneyModel
Definition
MoneyModel.php:21
Commercetools\Api\Models\Me\MyPaymentDraftModel
Definition
MyPaymentDraftModel.php:27
Commercetools\Api\Models\Me\MyPaymentDraftModel\$custom
$custom
Definition
MyPaymentDraftModel.php:44
Commercetools\Api\Models\Me\MyPaymentDraftModel\getPaymentMethodInfo
getPaymentMethodInfo()
Definition
MyPaymentDraftModel.php:96
Commercetools\Api\Models\Me\MyPaymentDraftModel\setPaymentMethodInfo
setPaymentMethodInfo(?PaymentMethodInfo $paymentMethodInfo)
Definition
MyPaymentDraftModel.php:165
Commercetools\Api\Models\Me\MyPaymentDraftModel\getTransaction
getTransaction()
Definition
MyPaymentDraftModel.php:138
Commercetools\Api\Models\Me\MyPaymentDraftModel\$paymentMethodInfo
$paymentMethodInfo
Definition
MyPaymentDraftModel.php:38
Commercetools\Api\Models\Me\MyPaymentDraftModel\__construct
__construct(?Money $amountPlanned=null, ?PaymentMethodInfo $paymentMethodInfo=null, ?CustomFieldsDraft $custom=null, ?MyTransactionDraft $transaction=null)
Definition
MyPaymentDraftModel.php:56
Commercetools\Api\Models\Me\MyPaymentDraftModel\$transaction
$transaction
Definition
MyPaymentDraftModel.php:50
Commercetools\Api\Models\Me\MyPaymentDraftModel\setTransaction
setTransaction(?MyTransactionDraft $transaction)
Definition
MyPaymentDraftModel.php:181
Commercetools\Api\Models\Me\MyPaymentDraftModel\setCustom
setCustom(?CustomFieldsDraft $custom)
Definition
MyPaymentDraftModel.php:173
Commercetools\Api\Models\Me\MyPaymentDraftModel\setAmountPlanned
setAmountPlanned(?Money $amountPlanned)
Definition
MyPaymentDraftModel.php:157
Commercetools\Api\Models\Me\MyPaymentDraftModel\getCustom
getCustom()
Definition
MyPaymentDraftModel.php:117
Commercetools\Api\Models\Me\MyPaymentDraftModel\$amountPlanned
$amountPlanned
Definition
MyPaymentDraftModel.php:32
Commercetools\Api\Models\Me\MyPaymentDraftModel\getAmountPlanned
getAmountPlanned()
Definition
MyPaymentDraftModel.php:75
Commercetools\Api\Models\Payment\PaymentMethodInfoModel
Definition
PaymentMethodInfoModel.php:23
Commercetools\Api\Models\Type\CustomFieldsDraftModel
Definition
CustomFieldsDraftModel.php:21
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
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\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Me
Definition
MyBusinessUnitAddAddressAction.php:9
Generated by
1.9.8