Skip to content

Commit

Permalink
Merge pull request #18 from StoreFactory/feature/YP-3594
Browse files Browse the repository at this point in the history
Add method getPriceByPlanCode
  • Loading branch information
tristanbes authored May 4, 2017
2 parents 73f830c + 0b3e45a commit 52604f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/Api/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,15 @@ public function filterPlans(array $plans, array $filters): array

return $plans;
}

/**
* get price by planCode
*
*/
public function getPriceByPlanCode(string $planCode): string
{
$plan = $this->getPlan($planCode);

return (array_key_exists('recurring_price', $plan)) ? $plan['recurring_price'] : '';
}
}

0 comments on commit 52604f1

Please sign in to comment.