commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentChangeTransactionStateActionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Payment
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
PaymentChangeTransactionStateActionModel
extends
JsonObjectModel
implements
PaymentChangeTransactionStateAction
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'changeTransactionState'
;
27
protected
$action
;
28
33
protected
$transactionId
;
34
39
protected
$state
;
40
41
45
public
function
__construct
(
46
?
string
$transactionId
=
null
,
47
?
string
$state
=
null
,
48
?
string
$action
=
null
49
) {
50
$this->transactionId =
$transactionId
;
51
$this->state =
$state
;
52
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
53
}
54
59
public
function
getAction
()
60
{
61
if
(is_null($this->action)) {
63
$data = $this->
raw
(self::FIELD_ACTION);
64
if
(is_null($data)) {
65
return
null
;
66
}
67
$this->action = (string) $data;
68
}
69
70
return
$this->action
;
71
}
72
79
public
function
getTransactionId
()
80
{
81
if
(is_null($this->transactionId)) {
83
$data = $this->
raw
(self::FIELD_TRANSACTION_ID);
84
if
(is_null($data)) {
85
return
null
;
86
}
87
$this->transactionId = (string) $data;
88
}
89
90
return
$this->transactionId
;
91
}
92
99
public
function
getState
()
100
{
101
if
(is_null($this->state)) {
103
$data = $this->
raw
(self::FIELD_STATE);
104
if
(is_null($data)) {
105
return
null
;
106
}
107
$this->state = (string) $data;
108
}
109
110
return
$this->state
;
111
}
112
113
117
public
function
setTransactionId
(?
string
$transactionId
): void
118
{
119
$this->transactionId =
$transactionId
;
120
}
121
125
public
function
setState
(?
string
$state
): void
126
{
127
$this->state =
$state
;
128
}
129
}
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel
Definition:
PaymentChangeTransactionStateActionModel.php:21
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\$state
$state
Definition:
PaymentChangeTransactionStateActionModel.php:39
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\setState
setState(?string $state)
Definition:
PaymentChangeTransactionStateActionModel.php:125
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\$transactionId
$transactionId
Definition:
PaymentChangeTransactionStateActionModel.php:33
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\getAction
getAction()
Definition:
PaymentChangeTransactionStateActionModel.php:59
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\getState
getState()
Definition:
PaymentChangeTransactionStateActionModel.php:99
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\$action
$action
Definition:
PaymentChangeTransactionStateActionModel.php:27
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\getTransactionId
getTransactionId()
Definition:
PaymentChangeTransactionStateActionModel.php:79
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\setTransactionId
setTransactionId(?string $transactionId)
Definition:
PaymentChangeTransactionStateActionModel.php:117
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
PaymentChangeTransactionStateActionModel.php:22
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateActionModel\__construct
__construct(?string $transactionId=null, ?string $state=null, ?string $action=null)
Definition:
PaymentChangeTransactionStateActionModel.php:45
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Payment\PaymentChangeTransactionStateAction
Definition:
PaymentChangeTransactionStateAction.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Payment
Definition:
Payment.php:9
Generated by
1.9.1