ProductUpdateRequest.php
3.32 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?php
/**
* TOP API: taobao.product.update request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class ProductUpdateRequest
{
/**
* 非关键属性.调用taobao.itemprops.get获取pid,调用taobao.itempropvalues.get获取vid;格式:pid:vid;pid:vid
**/
private $binds;
/**
* 产品描述.最大25000个字节
**/
private $desc;
/**
* 产品主图.最大500K,目前仅支持GIF,JPG
**/
private $image;
/**
* 是否是主图
**/
private $major;
/**
* 产品名称.最大60个字节
**/
private $name;
/**
* 自定义非关键属性
**/
private $nativeUnkeyprops;
/**
* 外部产品ID
**/
private $outerId;
/**
* 保证清单。
**/
private $packingList;
/**
* 产品市场价.精确到2位小数;单位为元.如:200.07
**/
private $price;
/**
* 产品ID
**/
private $productId;
/**
* 销售属性.调用taobao.itemprops.get获取pid,调用taobao.itempropvalues.get获取vid;格式:pid:vid;pid:vid
**/
private $saleProps;
private $apiParas = array();
public function setBinds($binds)
{
$this->binds = $binds;
$this->apiParas["binds"] = $binds;
}
public function getBinds()
{
return $this->binds;
}
public function setDesc($desc)
{
$this->desc = $desc;
$this->apiParas["desc"] = $desc;
}
public function getDesc()
{
return $this->desc;
}
public function setImage($image)
{
$this->image = $image;
$this->apiParas["image"] = $image;
}
public function getImage()
{
return $this->image;
}
public function setMajor($major)
{
$this->major = $major;
$this->apiParas["major"] = $major;
}
public function getMajor()
{
return $this->major;
}
public function setName($name)
{
$this->name = $name;
$this->apiParas["name"] = $name;
}
public function getName()
{
return $this->name;
}
public function setNativeUnkeyprops($nativeUnkeyprops)
{
$this->nativeUnkeyprops = $nativeUnkeyprops;
$this->apiParas["native_unkeyprops"] = $nativeUnkeyprops;
}
public function getNativeUnkeyprops()
{
return $this->nativeUnkeyprops;
}
public function setOuterId($outerId)
{
$this->outerId = $outerId;
$this->apiParas["outer_id"] = $outerId;
}
public function getOuterId()
{
return $this->outerId;
}
public function setPackingList($packingList)
{
$this->packingList = $packingList;
$this->apiParas["packing_list"] = $packingList;
}
public function getPackingList()
{
return $this->packingList;
}
public function setPrice($price)
{
$this->price = $price;
$this->apiParas["price"] = $price;
}
public function getPrice()
{
return $this->price;
}
public function setProductId($productId)
{
$this->productId = $productId;
$this->apiParas["product_id"] = $productId;
}
public function getProductId()
{
return $this->productId;
}
public function setSaleProps($saleProps)
{
$this->saleProps = $saleProps;
$this->apiParas["sale_props"] = $saleProps;
}
public function getSaleProps()
{
return $this->saleProps;
}
public function getApiMethodName()
{
return "taobao.product.update";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->productId,"productId");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}