1 | <?php |
||||
2 | |||||
3 | namespace Srmklive\PayPal\Traits\PayPalAPI\BillingPlans; |
||||
4 | |||||
5 | use Throwable; |
||||
6 | |||||
7 | trait PricingSchemes |
||||
8 | { |
||||
9 | protected $pricing_schemes = []; |
||||
10 | |||||
11 | /** |
||||
12 | * Add pricing scheme for the billing plan. |
||||
13 | * |
||||
14 | * @param string $interval_unit |
||||
15 | * @param int $interval_count |
||||
16 | * @param float $price |
||||
17 | * @param bool $trial |
||||
18 | * |
||||
19 | * @throws Throwable |
||||
20 | * |
||||
21 | * @return \Srmklive\PayPal\Services\PayPal |
||||
22 | */ |
||||
23 | public function addPricingScheme(string $interval_unit, int $interval_count, float $price, bool $trial = false): \Srmklive\PayPal\Services\PayPal |
||||
24 | { |
||||
25 | $this->pricing_schemes[] = $this->addPlanBillingCycle($interval_unit, $interval_count, $price, $trial); |
||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
26 | |||||
27 | return $this; |
||||
28 | } |
||||
29 | |||||
30 | /** |
||||
31 | * Process pricing updates for an existing billing plan. |
||||
32 | * |
||||
33 | * @throws \Throwable |
||||
34 | * |
||||
35 | * @return array|\Psr\Http\Message\StreamInterface|string |
||||
36 | */ |
||||
37 | public function processBillingPlanPricingUpdates() |
||||
38 | { |
||||
39 | return $this->updatePlanPricing($this->billing_plan['id'], $this->pricing_schemes); |
||||
0 ignored issues
–
show
It seems like
updatePlanPricing() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
40 | } |
||||
41 | } |
||||
42 |