Skip to content

Commit 0a008fc

Browse files
authored
Merge pull request #2 from Sohib/master
change methods' names
2 parents 324476c + c3de166 commit 0a008fc

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
composer.phar
44
vendor/
55
.idea
6+
67
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
78
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
89
# composer.lock

src/Moyasar/Invoices.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Invoices
1515
const CURRENCY = "currency";
1616
const DESCRIPTION = "description";
1717

18-
public static function make($amount, $description, $currency = "SAR")
18+
public static function create($amount, $description, $currency = "SAR")
1919
{
2020

2121
$data = [
@@ -27,11 +27,11 @@ public static function make($amount, $description, $currency = "SAR")
2727
return json_decode(Client::post("https://api.moyasar.com/v1/invoices", $data));
2828
}
2929

30-
public static function retrieve($id){
30+
public static function fetch($id){
3131
return json_decode(Client::get("https://api.moyasar.com/v1/invoices/$id"));
3232
}
3333

34-
public static function all(){
34+
public static function list(){
3535
return json_decode(Client::get("https://api.moyasar.com/v1/invoices"));
3636
}
3737

src/Moyasar/Payments.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Payments
1818
const SADAD = "sadad";
1919
const CREDIT_CARD = "creditcard";
2020

21-
public static function make($amount, $source, $description = "", $currency = "SAR")
21+
public static function create($amount, $source, $description = "", $currency = "SAR")
2222
{
2323

2424
$data = [
@@ -99,11 +99,11 @@ public static function refund($id, $amount = 0)
9999
}
100100

101101

102-
public static function retrieve($id){
102+
public static function fetch($id){
103103
return json_decode(Client::get("https://api.moyasar.com/v1/payments/$id"));
104104
}
105105

106-
public static function all(){
106+
public static function list(){
107107
return json_decode(Client::get("https://api.moyasar.com/v1/payments"));
108108

109109
}

0 commit comments

Comments
 (0)