invoices.php
1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
class Flora_Api_Service_Invoices extends Flora_Api_Service
{
const API_INVOICE_BYKEY = "invoices/invoice";
const API_INVOICE_PROCESS = "invoices/process";
const API_ORDER_BYKEY = "invoices/order";
/**
* @param $id
* @return Flora_Model_Shop_Order_Invoice
*/
public function getInvoiceByKey($id)
{
return $this->call(self::API_INVOICE_BYKEY, array("id" => $id));
}
/**
* @param $id
* @param $paysystem_id
* @param $amount
* @param $data
* @return Flora_Api_Response|Flora_Model|Flora_Model[]|mixed
*/
public function processInvoiceById($id, $paysystem_id, $amount, $data)
{
return $this->call(self::API_INVOICE_PROCESS, array(
"id" => $id, 'paysystem_id' => $paysystem_id, 'amount' => $amount
), $data);
}
/**
* @param $id
* @return Flora_Model_Shop_Order
*/
public function getOrderByKey($id)
{
return $this->call(self::API_ORDER_BYKEY, array("id" => $id));
}
}