srmklive /
chargify
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Srmklive\Chargify\Traits\ChargifyAPI; |
||||
| 4 | |||||
| 5 | trait Adjustments |
||||
| 6 | { |
||||
| 7 | /** |
||||
| 8 | * Create an adjustment for a subscription. |
||||
| 9 | * |
||||
| 10 | * @param int $subscription_id |
||||
| 11 | * @param int $amount |
||||
| 12 | * @param string $memo |
||||
| 13 | * |
||||
| 14 | * @return array |
||||
| 15 | */ |
||||
| 16 | public function adjust_subscription_balance($subscription_id, $amount, $memo): array |
||||
| 17 | { |
||||
| 18 | $this->options['json'] = [ |
||||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||||
| 19 | 'adjustment' => [ |
||||
| 20 | 'amount' => $amount, |
||||
| 21 | 'memo' => $memo, |
||||
| 22 | ], |
||||
| 23 | ]; |
||||
| 24 | |||||
| 25 | $this->apiEndPoint = "/subscriptions/{$subscription_id}/adjustments.json"; |
||||
| 26 | |||||
| 27 | $this->verb = 'post'; |
||||
| 28 | |||||
| 29 | return $this->doChargifyRequest(); |
||||
|
0 ignored issues
–
show
It seems like
doChargifyRequest() 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...
|
|||||
| 30 | } |
||||
| 31 | } |
||||
| 32 |