File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,22 +37,17 @@ Simple usage looks like:
3737
3838``` php
3939use StarfolkSoftware\Flutterwave\Client as FlutterwaveClient;
40- use StarfolkSoftware\Flutterwave\Options\CreatePlanOptions;
41- use StarfolkSoftware\Flutterwave\Options;
4240
43- $flutterwave = new FlutterwaveClient(new Options( [
41+ $flutterwave = new FlutterwaveClient([
4442 'secretKey' => 'secret',
45- ])) ;
43+ ]);
4644
47- $response = $flutterwave
48- ->plan()
49- ->create(
50- new CreatePlanOptions([
45+ $response = $flutterwave->plans()
46+ ->create([
5147 'name' => 'Test Plan',
5248 'amount' => 100,
5349 'interval' => 'monthly'
54- ])
55- );
50+ ]);
5651
5752echo $response;
5853```
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public function getHttpClient(): HttpMethodsClientInterface
6969 *
7070 * @return Plan
7171 */
72- public function plan (): Plan
72+ public function plans (): Plan
7373 {
7474 return new Plan ($ this );
7575 }
@@ -79,7 +79,7 @@ public function plan(): Plan
7979 *
8080 * @return Subscription
8181 */
82- public function subscription (): Subscription
82+ public function subscriptions (): Subscription
8383 {
8484 return new Subscription ($ this );
8585 }
@@ -89,7 +89,7 @@ public function subscription(): Subscription
8989 *
9090 * @return Charge
9191 */
92- public function charge (): Charge
92+ public function charges (): Charge
9393 {
9494 return new Charge ($ this );
9595 }
@@ -99,7 +99,7 @@ public function charge(): Charge
9999 *
100100 * @return Transaction
101101 */
102- public function transaction (): Transaction
102+ public function transactions (): Transaction
103103 {
104104 return new Transaction ($ this );
105105 }
You can’t perform that action at this time.
0 commit comments