Skip to content

Commit

Permalink
chore: update SDK from api-definitions (#717)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <[email protected]>
  • Loading branch information
rebilly-machine-user and rebilly-machine-user authored Sep 20, 2024
1 parent fc1e6a2 commit e00deb3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-berries-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(api-definitions): Remove pricing from TrialOnlyPlan Rebilly/rebilly#7665
4 changes: 0 additions & 4 deletions src/Model/FlexiblePlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions src/Model/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
22 changes: 0 additions & 22 deletions src/Model/TrialOnlyPlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit e00deb3

Please sign in to comment.