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
PaymentMethodInfoModel.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\LocalizedStringModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
PaymentMethodInfoModel
extends
JsonObjectModel
implements
PaymentMethodInfo
23
{
28
protected
$paymentInterface
;
29
34
protected
$method
;
35
40
protected
$name
;
41
42
46
public
function
__construct
(
47
?
string
$paymentInterface
=
null
,
48
?
string
$method
=
null
,
49
?
LocalizedString
$name
=
null
50
) {
51
$this->paymentInterface =
$paymentInterface
;
52
$this->method =
$method
;
53
$this->name =
$name
;
54
}
55
64
public
function
getPaymentInterface
()
65
{
66
if
(is_null($this->paymentInterface)) {
68
$data = $this->
raw
(self::FIELD_PAYMENT_INTERFACE);
69
if
(is_null($data)) {
70
return
null
;
71
}
72
$this->paymentInterface = (string) $data;
73
}
74
75
return
$this->paymentInterface
;
76
}
77
84
public
function
getMethod
()
85
{
86
if
(is_null($this->method)) {
88
$data = $this->
raw
(self::FIELD_METHOD);
89
if
(is_null($data)) {
90
return
null
;
91
}
92
$this->method = (string) $data;
93
}
94
95
return
$this->method
;
96
}
97
104
public
function
getName
()
105
{
106
if
(is_null($this->name)) {
108
$data = $this->
raw
(self::FIELD_NAME);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
113
$this->name = LocalizedStringModel::of($data);
114
}
115
116
return
$this->name
;
117
}
118
119
123
public
function
setPaymentInterface
(?
string
$paymentInterface
): void
124
{
125
$this->paymentInterface =
$paymentInterface
;
126
}
127
131
public
function
setMethod
(?
string
$method
): void
132
{
133
$this->method =
$method
;
134
}
135
139
public
function
setName
(?
LocalizedString
$name
): void
140
{
141
$this->name =
$name
;
142
}
143
}
Commercetools\Api\Models\Common\LocalizedStringModel
Definition
LocalizedStringModel.php:17
Commercetools\Api\Models\Payment\PaymentMethodInfoModel
Definition
PaymentMethodInfoModel.php:23
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\setPaymentInterface
setPaymentInterface(?string $paymentInterface)
Definition
PaymentMethodInfoModel.php:123
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\getName
getName()
Definition
PaymentMethodInfoModel.php:104
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\setMethod
setMethod(?string $method)
Definition
PaymentMethodInfoModel.php:131
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\getMethod
getMethod()
Definition
PaymentMethodInfoModel.php:84
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\setName
setName(?LocalizedString $name)
Definition
PaymentMethodInfoModel.php:139
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\__construct
__construct(?string $paymentInterface=null, ?string $method=null, ?LocalizedString $name=null)
Definition
PaymentMethodInfoModel.php:46
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\$name
$name
Definition
PaymentMethodInfoModel.php:40
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\$paymentInterface
$paymentInterface
Definition
PaymentMethodInfoModel.php:28
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\$method
$method
Definition
PaymentMethodInfoModel.php:34
Commercetools\Api\Models\Payment\PaymentMethodInfoModel\getPaymentInterface
getPaymentInterface()
Definition
PaymentMethodInfoModel.php:64
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\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\Api\Models\Payment\PaymentMethodInfo
Definition
PaymentMethodInfo.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Payment
Definition
Payment.php:9
Generated by
1.9.8