commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
LineItemRecurrenceInfoDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
29
35
36
40 public function __construct(
42 ?string $priceSelectionMode = null
43 ) {
44 $this->recurrencePolicy = $recurrencePolicy;
45 $this->priceSelectionMode = $priceSelectionMode;
46 }
47
54 public function getRecurrencePolicy()
55 {
56 if (is_null($this->recurrencePolicy)) {
58 $data = $this->raw(self::FIELD_RECURRENCE_POLICY);
59 if (is_null($data)) {
60 return null;
61 }
62
63 $this->recurrencePolicy = RecurrencePolicyResourceIdentifierModel::of($data);
64 }
65
67 }
68
75 public function getPriceSelectionMode()
76 {
77 if (is_null($this->priceSelectionMode)) {
79 $data = $this->raw(self::FIELD_PRICE_SELECTION_MODE);
80 if (is_null($data)) {
81 return null;
82 }
83 $this->priceSelectionMode = (string) $data;
84 }
85
87 }
88
89
94 {
95 $this->recurrencePolicy = $recurrencePolicy;
96 }
97
101 public function setPriceSelectionMode(?string $priceSelectionMode): void
102 {
103 $this->priceSelectionMode = $priceSelectionMode;
104 }
105}
__construct(?RecurrencePolicyResourceIdentifier $recurrencePolicy=null, ?string $priceSelectionMode=null)