3declare(strict_types=1);
111 if (is_null($this->
id)) {
113 $data = $this->
raw(self::FIELD_ID);
114 if (is_null($data)) {
117 $this->
id = (string) $data;
131 if (is_null($this->version)) {
133 $data = $this->
raw(self::FIELD_VERSION);
134 if (is_null($data)) {
137 $this->version = (int) $data;
151 if (is_null($this->customer)) {
153 $data = $this->
raw(self::FIELD_CUSTOMER);
154 if (is_null($data)) {
158 $this->customer = CustomerReferenceModel::of($data);
172 if (is_null($this->anonymousId)) {
174 $data = $this->
raw(self::FIELD_ANONYMOUS_ID);
175 if (is_null($data)) {
178 $this->anonymousId = (string) $data;
193 if (is_null($this->amountPlanned)) {
195 $data = $this->
raw(self::FIELD_AMOUNT_PLANNED);
196 if (is_null($data)) {
200 $this->amountPlanned = CentPrecisionMoneyModel::of($data);
214 if (is_null($this->paymentMethodInfo)) {
216 $data = $this->
raw(self::FIELD_PAYMENT_METHOD_INFO);
217 if (is_null($data)) {
221 $this->paymentMethodInfo = PaymentMethodInfoModel::of($data);
235 if (is_null($this->transactions)) {
237 $data = $this->
raw(self::FIELD_TRANSACTIONS);
238 if (is_null($data)) {
241 $this->transactions = TransactionCollection::fromArray($data);
255 if (is_null($this->custom)) {
257 $data = $this->
raw(self::FIELD_CUSTOM);
258 if (is_null($data)) {
262 $this->custom = CustomFieldsModel::of($data);