commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentMethodInfoBuilder.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\LocalizedStringBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
PaymentMethodInfoBuilder
implements
Builder
24
{
29
private
$paymentInterface;
30
35
private
$method;
36
41
private
$name;
42
51
public
function
getPaymentInterface
()
52
{
53
return
$this->paymentInterface;
54
}
55
62
public
function
getMethod
()
63
{
64
return
$this->method;
65
}
66
73
public
function
getName
()
74
{
75
return
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name;
76
}
77
82
public
function
withPaymentInterface
(?
string
$paymentInterface)
83
{
84
$this->paymentInterface = $paymentInterface;
85
86
return
$this;
87
}
88
93
public
function
withMethod
(?
string
$method)
94
{
95
$this->method = $method;
96
97
return
$this;
98
}
99
104
public
function
withName
(?
LocalizedString
$name)
105
{
106
$this->name = $name;
107
108
return
$this;
109
}
110
115
public
function
withNameBuilder
(?
LocalizedStringBuilder
$name)
116
{
117
$this->name = $name;
118
119
return
$this;
120
}
121
122
public
function
build
():
PaymentMethodInfo
123
{
124
return
new
PaymentMethodInfoModel
(
125
$this->paymentInterface,
126
$this->method,
127
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name
128
);
129
}
130
131
public
static
function
of
():
PaymentMethodInfoBuilder
132
{
133
return
new
self
();
134
}
135
}
Commercetools\Api\Models\Common\LocalizedStringBuilder
Definition:
LocalizedStringBuilder.php:20
Commercetools\Api\Models\Common\LocalizedStringBuilder\build
build()
Definition:
LocalizedStringBuilder.php:42
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder
Definition:
PaymentMethodInfoBuilder.php:24
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withPaymentInterface
withPaymentInterface(?string $paymentInterface)
Definition:
PaymentMethodInfoBuilder.php:82
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\of
static of()
Definition:
PaymentMethodInfoBuilder.php:131
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withNameBuilder
withNameBuilder(?LocalizedStringBuilder $name)
Definition:
PaymentMethodInfoBuilder.php:115
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withName
withName(?LocalizedString $name)
Definition:
PaymentMethodInfoBuilder.php:104
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\withMethod
withMethod(?string $method)
Definition:
PaymentMethodInfoBuilder.php:93
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\build
build()
Definition:
PaymentMethodInfoBuilder.php:122
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getMethod
getMethod()
Definition:
PaymentMethodInfoBuilder.php:62
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getPaymentInterface
getPaymentInterface()
Definition:
PaymentMethodInfoBuilder.php:51
Commercetools\Api\Models\Payment\PaymentMethodInfoBuilder\getName
getName()
Definition:
PaymentMethodInfoBuilder.php:73
Commercetools\Api\Models\Payment\PaymentMethodInfoModel
Definition:
PaymentMethodInfoModel.php:23
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\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Payment
Definition:
Payment.php:9
Generated by
1.9.1