@@ 159-167 (lines=9) @@ | ||
156 | * @param string $client_id |
|
157 | * @return object |
|
158 | */ |
|
159 | public function getClient($client_id = null){ |
|
160 | if(!$client_id || $client_id === null){ |
|
161 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid Client Id"); |
|
162 | } |
|
163 | ||
164 | $url = "/clients/{$client_id}"; |
|
165 | ||
166 | return $this->sendRequest('get', $url); |
|
167 | } |
|
168 | ||
169 | ||
170 | ||
@@ 205-213 (lines=9) @@ | ||
202 | * [deleteClient] |
|
203 | * @param string $client_id [description] |
|
204 | */ |
|
205 | public function deleteClient($client_id = null){ |
|
206 | if(!$client_id || $client_id === null){ |
|
207 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid Client Id"); |
|
208 | } |
|
209 | ||
210 | $url = "/clients/{$client_id}"; |
|
211 | ||
212 | return $this->sendRequest('delete', $url); |
|
213 | } |
|
214 | ||
215 | ||
216 | ||
@@ 279-287 (lines=9) @@ | ||
276 | * @param string $reference_code [Mandatory - Invoice Reference Code] |
|
277 | * @return object |
|
278 | */ |
|
279 | public function getInvoice($reference_code = null){ |
|
280 | if(!$reference_code || $reference_code === null){ |
|
281 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code"); |
|
282 | } |
|
283 | ||
284 | $url = "/invoices/{$reference_code}"; |
|
285 | ||
286 | return $this->sendRequest('get', $url); |
|
287 | } |
|
288 | ||
289 | /** |
|
290 | * [sendInvoice] |
|
@@ 294-302 (lines=9) @@ | ||
291 | * @param string $reference_code [Mandatory - Invoice Reference Code] |
|
292 | * @return object |
|
293 | */ |
|
294 | public function sendInvoice($reference_code = null){ |
|
295 | if(!$reference_code || $reference_code === null){ |
|
296 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code"); |
|
297 | } |
|
298 | ||
299 | $url = "/invoices/send/{$reference_code}"; |
|
300 | ||
301 | return $this->sendRequest('get', $url); |
|
302 | } |
|
303 | ||
304 | ||
305 | ||
@@ 353-361 (lines=9) @@ | ||
350 | * @param string $reference_code [Mandatory - Invoice Reference Code] |
|
351 | * @return object |
|
352 | */ |
|
353 | public function deleteInvoice($reference_code = null){ |
|
354 | if(!$reference_code || $reference_code === null){ |
|
355 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code"); |
|
356 | } |
|
357 | ||
358 | $url = "/invoices/{$reference_code}"; |
|
359 | ||
360 | return $this->sendRequest('delete', $url); |
|
361 | } |
|
362 | ||
363 | ||
364 | ||
@@ 405-413 (lines=9) @@ | ||
402 | * @param string $reference_code [Mandatory - Transfer Reference Code] |
|
403 | * @return object |
|
404 | */ |
|
405 | public function getTransfer($reference_code = null){ |
|
406 | if(!$reference_code || $reference_code === null){ |
|
407 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code"); |
|
408 | } |
|
409 | ||
410 | $url = "/transfers/{$reference_code}"; |
|
411 | ||
412 | return $this->sendRequest('get', $url); |
|
413 | } |
|
414 | ||
415 | ||
416 | ||
@@ 465-473 (lines=9) @@ | ||
462 | * @param string $reference_code [Mandatory - Invoice Reference Code] |
|
463 | * @return object |
|
464 | */ |
|
465 | public function deleteTransfer($reference_code = null){ |
|
466 | if(!$reference_code || $reference_code === null){ |
|
467 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code"); |
|
468 | } |
|
469 | ||
470 | $url = "/transfers/{$reference_code}"; |
|
471 | ||
472 | return $this->sendRequest('delete', $url); |
|
473 | } |
|
474 | ||
475 | ||
476 | ||
@@ 528-536 (lines=9) @@ | ||
525 | * [getPayment] |
|
526 | * @param string $reference_code [Mandatory - Invoice Reference Code] |
|
527 | */ |
|
528 | public function getPayment($reference_code = null){ |
|
529 | if(!$reference_code || $reference_code === null){ |
|
530 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid reference_code"); |
|
531 | } |
|
532 | ||
533 | $url = "/payments/{$reference_code}"; |
|
534 | ||
535 | return $this->sendRequest('get', $url); |
|
536 | } |
|
537 | ||
538 | ||
539 | ||
@@ 632-640 (lines=9) @@ | ||
629 | * @param int $product_id [Mandatory - Product ID] |
|
630 | * @return object |
|
631 | */ |
|
632 | public function getProduct($product_id = null){ |
|
633 | if(!$product_id || $product_id === null){ |
|
634 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid product_id"); |
|
635 | } |
|
636 | ||
637 | $url = "/products/{$product_id}"; |
|
638 | ||
639 | return $this->sendRequest('get', $url); |
|
640 | } |
|
641 | ||
642 | ||
643 | ||
@@ 701-709 (lines=9) @@ | ||
698 | * @param $product_id [Mandatory - Product ID] |
|
699 | * @return object |
|
700 | */ |
|
701 | public function deleteProduct($product_id = null){ |
|
702 | if(!$product_id || $product_id === null){ |
|
703 | throw new IsNullOrInvalid("Error Processing Request - Null/Invalid Product Id"); |
|
704 | } |
|
705 | ||
706 | $url = "/products/{$product_id}"; |
|
707 | ||
708 | return $this->sendRequest('delete', $url); |
|
709 | } |
|
710 | ||
711 | ||
712 |