Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method getPriceByPlanCode #18

Merged
merged 2 commits into from
May 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/Api/Plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,14 @@ 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'] : '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline before return

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after commat ,$plan)

}
}