ItemSkuPriceUpdateRequest.php
3.19 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
<?php
/**
* TOP API: taobao.item.sku.price.update request
*
* @author auto create
* @since 1.0, 2012-12-13 16:33:03
*/
class ItemSkuPriceUpdateRequest
{
/**
* sku所属商品的价格。当用户更新sku,使商品价格不属于sku价格之间的时候,用于修改商品的价格,使sku能够更新成功
**/
private $itemPrice;
/**
* Sku文字的版本。可选值:zh_HK(繁体),zh_CN(简体);默认值:zh_CN
**/
private $lang;
/**
* Sku所属商品数字id,可通过 taobao.item.get 获取
**/
private $numIid;
/**
* Sku的商家外部id
**/
private $outerId;
/**
* Sku的销售价格。精确到2位小数;单位:元。如:200.07,表示:200元7分。修改后的sku价格要保证商品的价格在所有sku价格所形成的价格区间内(例如:商品价格为6元,sku价格有5元、10元两种,如果要修改5元sku的价格,那么修改的范围只能是0-6元之间;如果要修改10元的sku,那么修改的范围只能是6到无穷大的区间中)
**/
private $price;
/**
* Sku属性串。格式:pid:vid;pid:vid,如: 1627207:3232483;1630696:3284570,表示机身颜色:军绿色;手机套餐:一电一充
**/
private $properties;
/**
* Sku的库存数量。sku的总数量应该小于等于商品总数量(Item的NUM),sku数量变化后item的总数量也会随着变化。取值范围:大于等于零的整数
**/
private $quantity;
private $apiParas = array();
public function setItemPrice($itemPrice)
{
$this->itemPrice = $itemPrice;
$this->apiParas["item_price"] = $itemPrice;
}
public function getItemPrice()
{
return $this->itemPrice;
}
public function setLang($lang)
{
$this->lang = $lang;
$this->apiParas["lang"] = $lang;
}
public function getLang()
{
return $this->lang;
}
public function setNumIid($numIid)
{
$this->numIid = $numIid;
$this->apiParas["num_iid"] = $numIid;
}
public function getNumIid()
{
return $this->numIid;
}
public function setOuterId($outerId)
{
$this->outerId = $outerId;
$this->apiParas["outer_id"] = $outerId;
}
public function getOuterId()
{
return $this->outerId;
}
public function setPrice($price)
{
$this->price = $price;
$this->apiParas["price"] = $price;
}
public function getPrice()
{
return $this->price;
}
public function setProperties($properties)
{
$this->properties = $properties;
$this->apiParas["properties"] = $properties;
}
public function getProperties()
{
return $this->properties;
}
public function setQuantity($quantity)
{
$this->quantity = $quantity;
$this->apiParas["quantity"] = $quantity;
}
public function getQuantity()
{
return $this->quantity;
}
public function getApiMethodName()
{
return "taobao.item.sku.price.update";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->numIid,"numIid");
RequestCheckUtil::checkMinValue($this->numIid,0,"numIid");
RequestCheckUtil::checkNotNull($this->properties,"properties");
RequestCheckUtil::checkMinValue($this->quantity,0,"quantity");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}