commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
PaymentAllocationDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $id;
29
34 protected $paymentMethod;
35
40 protected $allocation;
41
42
46 public function __construct(
47 ?string $id = null,
50 ) {
51 $this->id = $id;
52 $this->paymentMethod = $paymentMethod;
53 $this->allocation = $allocation;
54 }
55
62 public function getId()
63 {
64 if (is_null($this->id)) {
66 $data = $this->raw(self::FIELD_ID);
67 if (is_null($data)) {
68 return null;
69 }
70 $this->id = (string) $data;
71 }
72
73 return $this->id;
74 }
75
82 public function getPaymentMethod()
83 {
84 if (is_null($this->paymentMethod)) {
86 $data = $this->raw(self::FIELD_PAYMENT_METHOD);
87 if (is_null($data)) {
88 return null;
89 }
90
91 $this->paymentMethod = PaymentMethodReferenceModel::of($data);
92 }
93
95 }
96
103 public function getAllocation()
104 {
105 if (is_null($this->allocation)) {
107 $data = $this->raw(self::FIELD_ALLOCATION);
108 if (is_null($data)) {
109 return null;
110 }
112 $this->allocation = $className::of($data);
113 }
114
115 return $this->allocation;
116 }
117
118
122 public function setId(?string $id): void
123 {
124 $this->id = $id;
125 }
126
131 {
132 $this->paymentMethod = $paymentMethod;
133 }
134
139 {
140 $this->allocation = $allocation;
141 }
142}
__construct(?string $id=null, ?PaymentMethodReference $paymentMethod=null, ?AllocationDraft $allocation=null)