1 | <?php |
||
13 | class BulkSender extends ApiCore |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $number; |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $amount; |
||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $remarks = 'Some remarks'; |
||
27 | /** |
||
28 | * @var int |
||
29 | */ |
||
30 | private $trials = 3; |
||
31 | |||
32 | |||
33 | /** |
||
34 | * Set number to receive the funds |
||
35 | * |
||
36 | * @param string $number |
||
37 | * @return $this |
||
38 | */ |
||
39 | public function to($number): self |
||
44 | |||
45 | public function withRemarks($remarks): self |
||
50 | |||
51 | /** |
||
52 | * The amount to transact |
||
53 | * |
||
54 | * @param $amount |
||
55 | * @return $this |
||
56 | */ |
||
57 | public function amount($amount): self |
||
62 | |||
63 | /** |
||
64 | * @param string|null $number |
||
65 | * @param int|null $amount |
||
66 | * @param string|null $remarks |
||
67 | * @return mixed |
||
68 | * @throws \Samerior\MobileMoney\Mpesa\Exceptions\MpesaException |
||
69 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
70 | * @throws MpesaException |
||
71 | */ |
||
72 | public function send($number = null, $amount = null, $remarks = null) |
||
98 | |||
99 | /** |
||
100 | * @return mixed |
||
101 | * @throws \Samerior\MobileMoney\Mpesa\Exceptions\MpesaException |
||
102 | * @throws \Exception |
||
103 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
104 | */ |
||
105 | public function balance() |
||
120 | } |
||
121 |