partner.php
1.11 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
41
42
43
44
45
<?php
class Flora_Api_Service_Partner extends Flora_Api_Service
{
const API_REF_GENERATE = 'partner/ref/generate';
const API_REF_CHECK = 'partner/ref/check';
const API_REF_HISTORY = 'partner/ref/history';
const API_REF_HISTORY_ALL = 'partner/ref/all';
/**
* @return string
*/
public function generateRefCode()
{
return $this->call(self::API_REF_GENERATE);
}
/**
* @param $code
* @return bool
*/
public function checkRefCode($code)
{
return $this->call(self::API_REF_CHECK, array('code' => $code));
}
/**
* @param $code
* @param int $limit
* @param int $offset
* @return array|stdClass[]
*/
public function historyRefCode($code, $limit = 0, $offset = 0)
{
return $this->call(self::API_REF_HISTORY, array('code' => $code, 'limit' => $limit, 'offset' => $offset));
}
/**
* @param int $after_id
* @return array|stdClass[]
*/
public function historyAllRefCodes($after_id = 0)
{
return $this->call(self::API_REF_HISTORY_ALL, array('after_id' => $after_id));
}
}