Skip to content

Commit 40e496e

Browse files
author
Okubanjo Oluwafunsho
committed
Added support for updating a page's details
Update the details about a particular page using its page slug or id
1 parent 087fa4b commit 40e496e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Paystack.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,26 @@ public function fetchPage($page_id){
524524

525525
}
526526

527+
/**
528+
* Update the details about a particular page
529+
* @param $page_id
530+
* @return array
531+
*/
532+
public function updatePage($page_id){
533+
534+
$data = [
535+
536+
"name" => request()->name,
537+
"description" => request()->description,
538+
"amount" => request()->amount
539+
];
540+
541+
$this->setRequestOptions();
542+
543+
return $this->setGetResponse('/page/'.$page_id, $data)->getResponse();
544+
545+
}
546+
527547
}
528548

529549

0 commit comments

Comments
 (0)