IncrementCustomersGetRequest.php
2.55 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/**
* TOP API: taobao.increment.customers.get request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class IncrementCustomersGetRequest
{
/**
* 需要返回的字段。可填写的字段参见AppCustomer中的返回字段。如:nick,created,status,type,subscriptions。
**/
private $fields;
/**
* 查询用户的昵称。当为空时通过分页方式查询appkey开通的所有用户,最多填入20个昵称。
**/
private $nicks;
/**
* 分页查询时,查询的页码。此参数只有nicks为空时起作用。
**/
private $pageNo;
/**
* 分布查询时,页的大小。此参数只有当nicks为空时起作用。
**/
private $pageSize;
/**
* 查询用户开通的功能。值可为get,notify和syn分别表示增量api取消息,主动发送消息和同步数据功能。这三个值不分次序。在查询时,type里面的参数会根据应用订阅的类型进行相应的过虑。如应用只订阅主动通知,则默认值过滤后为get,notify,如果应用只订阅数据同步服务,默认值过滤后为syn。
**/
private $type;
private $apiParas = array();
public function setFields($fields)
{
$this->fields = $fields;
$this->apiParas["fields"] = $fields;
}
public function getFields()
{
return $this->fields;
}
public function setNicks($nicks)
{
$this->nicks = $nicks;
$this->apiParas["nicks"] = $nicks;
}
public function getNicks()
{
return $this->nicks;
}
public function setPageNo($pageNo)
{
$this->pageNo = $pageNo;
$this->apiParas["page_no"] = $pageNo;
}
public function getPageNo()
{
return $this->pageNo;
}
public function setPageSize($pageSize)
{
$this->pageSize = $pageSize;
$this->apiParas["page_size"] = $pageSize;
}
public function getPageSize()
{
return $this->pageSize;
}
public function setType($type)
{
$this->type = $type;
$this->apiParas["type"] = $type;
}
public function getType()
{
return $this->type;
}
public function getApiMethodName()
{
return "taobao.increment.customers.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkMaxListSize($this->nicks,20,"nicks");
RequestCheckUtil::checkMinValue($this->pageNo,0,"pageNo");
RequestCheckUtil::checkMaxValue($this->pageSize,200,"pageSize");
RequestCheckUtil::checkMinValue($this->pageSize,0,"pageSize");
RequestCheckUtil::checkMaxListSize($this->type,3,"type");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}