WlbItemAuthorizationAddRequest.php
3.29 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
/**
* TOP API: taobao.wlb.item.authorization.add request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class WlbItemAuthorizationAddRequest
{
/**
* 授权类型:1=全量授权,0=部分授权
当部分授权时,需要指定授权数量quantity
**/
private $authType;
/**
* 授权结束时间
**/
private $authorizeEndTime;
/**
* 授权开始时间
**/
private $authorizeStartTime;
/**
* 被授权人用户id
**/
private $consignUserNick;
/**
* 商品id列表,以英文逗号,分隔,最多可放入50个商品ID。
**/
private $itemIdList;
/**
* 规则名称
**/
private $name;
/**
* 授权数量
**/
private $quantity;
/**
* 授权规则:目前只有GRANT_FIX,按照数量授权
**/
private $ruleCode;
private $apiParas = array();
public function setAuthType($authType)
{
$this->authType = $authType;
$this->apiParas["auth_type"] = $authType;
}
public function getAuthType()
{
return $this->authType;
}
public function setAuthorizeEndTime($authorizeEndTime)
{
$this->authorizeEndTime = $authorizeEndTime;
$this->apiParas["authorize_end_time"] = $authorizeEndTime;
}
public function getAuthorizeEndTime()
{
return $this->authorizeEndTime;
}
public function setAuthorizeStartTime($authorizeStartTime)
{
$this->authorizeStartTime = $authorizeStartTime;
$this->apiParas["authorize_start_time"] = $authorizeStartTime;
}
public function getAuthorizeStartTime()
{
return $this->authorizeStartTime;
}
public function setConsignUserNick($consignUserNick)
{
$this->consignUserNick = $consignUserNick;
$this->apiParas["consign_user_nick"] = $consignUserNick;
}
public function getConsignUserNick()
{
return $this->consignUserNick;
}
public function setItemIdList($itemIdList)
{
$this->itemIdList = $itemIdList;
$this->apiParas["item_id_list"] = $itemIdList;
}
public function getItemIdList()
{
return $this->itemIdList;
}
public function setName($name)
{
$this->name = $name;
$this->apiParas["name"] = $name;
}
public function getName()
{
return $this->name;
}
public function setQuantity($quantity)
{
$this->quantity = $quantity;
$this->apiParas["quantity"] = $quantity;
}
public function getQuantity()
{
return $this->quantity;
}
public function setRuleCode($ruleCode)
{
$this->ruleCode = $ruleCode;
$this->apiParas["rule_code"] = $ruleCode;
}
public function getRuleCode()
{
return $this->ruleCode;
}
public function getApiMethodName()
{
return "taobao.wlb.item.authorization.add";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->authType,"authType");
RequestCheckUtil::checkNotNull($this->authorizeEndTime,"authorizeEndTime");
RequestCheckUtil::checkNotNull($this->authorizeStartTime,"authorizeStartTime");
RequestCheckUtil::checkNotNull($this->consignUserNick,"consignUserNick");
RequestCheckUtil::checkNotNull($this->itemIdList,"itemIdList");
RequestCheckUtil::checkNotNull($this->name,"name");
RequestCheckUtil::checkMaxLength($this->name,255,"name");
RequestCheckUtil::checkNotNull($this->ruleCode,"ruleCode");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}