TaobaokeReportGetRequest.php
1.9 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
<?php
/**
* TOP API: taobao.taobaoke.report.get request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class TaobaokeReportGetRequest
{
/**
* 需要查询报表的日期,有效的日期为最近3个月内的某一天,格式为:yyyyMMdd,如20090520.
**/
private $date;
/**
* 需返回的字段列表.可选值:TaobaokeReportMember淘宝客报表成员结构体中的所有字段;字段之间用","分隔.
**/
private $fields;
/**
* 当前页数.只能获取1-499页数据.
**/
private $pageNo;
/**
* 每页返回结果数,默认是40条.最大每页100
**/
private $pageSize;
private $apiParas = array();
public function setDate($date)
{
$this->date = $date;
$this->apiParas["date"] = $date;
}
public function getDate()
{
return $this->date;
}
public function setFields($fields)
{
$this->fields = $fields;
$this->apiParas["fields"] = $fields;
}
public function getFields()
{
return $this->fields;
}
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 getApiMethodName()
{
return "taobao.taobaoke.report.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->date,"date");
RequestCheckUtil::checkNotNull($this->fields,"fields");
RequestCheckUtil::checkMaxValue($this->pageNo,499,"pageNo");
RequestCheckUtil::checkMinValue($this->pageNo,1,"pageNo");
RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}