diff --git a/.changeset/five-berries-drive.md b/.changeset/five-berries-drive.md new file mode 100644 index 00000000..ead33e4b --- /dev/null +++ b/.changeset/five-berries-drive.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Remove pricing from TrialOnlyPlan Rebilly/rebilly#7665 diff --git a/src/Model/FlexiblePlan.php b/src/Model/FlexiblePlan.php index a0b63c8a..c937b709 100644 --- a/src/Model/FlexiblePlan.php +++ b/src/Model/FlexiblePlan.php @@ -53,10 +53,6 @@ public function setCurrency(string $currency): static; public function getCurrencySign(): ?string; - public function getPricing(): PlanPriceFormula; - - public function setPricing(PlanPriceFormula|array $pricing): static; - public function getSetup(): ?PlanSetup; public function setSetup(null|PlanSetup|array $setup): static; diff --git a/src/Model/Plan.php b/src/Model/Plan.php index 68f99022..2f1bc8b9 100644 --- a/src/Model/Plan.php +++ b/src/Model/Plan.php @@ -54,10 +54,6 @@ public function setCurrency(string $currency): static; public function getCurrencySign(): ?string; - public function getPricing(): PlanPriceFormula; - - public function setPricing(PlanPriceFormula|array $pricing): static; - public function getSetup(): ?PlanSetup; public function setSetup(null|PlanSetup|array $setup): static; diff --git a/src/Model/TrialOnlyPlan.php b/src/Model/TrialOnlyPlan.php index 300bbd43..8a4a8e2b 100644 --- a/src/Model/TrialOnlyPlan.php +++ b/src/Model/TrialOnlyPlan.php @@ -46,9 +46,6 @@ public function __construct(array $data = []) if (array_key_exists('currencySign', $data)) { $this->setCurrencySign($data['currencySign']); } - if (array_key_exists('pricing', $data)) { - $this->setPricing($data['pricing']); - } if (array_key_exists('setup', $data)) { $this->setSetup($data['setup']); } @@ -181,22 +178,6 @@ public function getCurrencySign(): ?string return $this->fields['currencySign'] ?? null; } - public function getPricing(): PlanPriceFormula - { - return $this->fields['pricing']; - } - - public function setPricing(PlanPriceFormula|array $pricing): static - { - if (!($pricing instanceof PlanPriceFormula)) { - $pricing = PlanPriceFormulaFactory::from($pricing); - } - - $this->fields['pricing'] = $pricing; - - return $this; - } - public function getSetup(): ?PlanSetup { return $this->fields['setup'] ?? null; @@ -324,9 +305,6 @@ public function jsonSerialize(): array if (array_key_exists('currencySign', $this->fields)) { $data['currencySign'] = $this->fields['currencySign']; } - if (array_key_exists('pricing', $this->fields)) { - $data['pricing'] = $this->fields['pricing']->jsonSerialize(); - } if (array_key_exists('setup', $this->fields)) { $data['setup'] = $this->fields['setup']?->jsonSerialize(); }