commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
PaymentMethodInfoModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
29
34 protected $method;
35
40 protected $name;
41
42
46 public function __construct(
47 ?string $paymentInterface = null,
48 ?string $method = 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
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}
__construct(?string $paymentInterface=null, ?string $method=null, ?LocalizedString $name=null)