|
- <?php
- /**
- * TOP API: taobao.xhotel.rates.update request
- *
- * @author auto create
- * @since 1.0, 2017.05.03
- */
-
- namespace backend\modules\hotel\models\Ali;
-
- use common\models\commonModel;
-
- class XhotelRatesUpdateRequest extends commonModel
- {
- const ERROR_MSG=[
- 7=>'接口调用频繁,需要重新操作',
- 15=>'阿里后台rpid是否存在且价格不能设置为0',
- ];
-
- /**
- * 批量修改价格和房价专有库存信息,json格式,可同时修改多套房型+价格计划的价格:A:use_room_inventory:是否使用房型共享库存,可选值 true false 1、true时:使用房型共享库存 2、false时:使用房价专有库存,此时要求房价专有库存必填。B:date 日期必须为 T---T+180 日内的日期(T为当天),不能重复。 C:price 价格 int类型 取值范围1-99999999 单位为分D:quota 房价专有库存 int 类型 取值范围 0-999(数量库存) 60000(状态库存关) 61000(状态库存开) E:status 价格开关,0为关,1为开。lock_start_time为锁库存开始时间,lock_end_time为锁库存结束时间,如果当前时间在这个时间范围内,那么不允许修改库存。示例值:(1)[{"out_rid":"ABCDE_123","rateplan_code":"ABCDE_WHL01","vendor":"","lock_start_time":"","lock_end_time":"","data":{"use_room_inventory":false,"inventory_price":[{"date":2013-11-18,"quota":1,"price":1000,"status":1},{"date":2013-11-19,"quota":1,"price":1000,"status":0}]}},{"out_rid":"ABCDE_234","rateplan_code":"ABCDE_WHL01","vendor":"","data":{"use_room_inventory":false,"inventory_price":[{"date":2013-11-18,"quota":1,"price":1000,"status":1},{"date":2013-11-19,"quota":1,"price":1000,"status":0}]}}]
- **/
- public $rate_inventory_price_map;
-
- public $apiParas = array();
-
- public function setAttributes($values, $safeOnly = true)
- {
- if (is_array($values)) {
- $attributes = array_flip($safeOnly ? $this->safeAttributes() : $this->attributes());
- foreach ($values as $name => $value) {
- if (isset($attributes[$name])) {
- $this->apiParas[$name] = $value;
- } elseif ($safeOnly) {
- $this->onUnsafeAttribute($name, $value);
- }
- }
- }
- parent::setAttributes($values, $safeOnly);
- }
-
- public function rules()
- {
- return [
- [['rate_inventory_price_map'], 'required'],
- ];
- }
-
- public function setRateInventoryPriceMap($rateInventoryPriceMap)
- {
- $this->rate_inventory_price_map = $rateInventoryPriceMap;
- $this->apiParas["rate_inventory_price_map"] = $rateInventoryPriceMap;
- }
-
- public function getRateInventoryPriceMap()
- {
- return $this->rate_inventory_price_map;
- }
-
- public function getApiMethodName()
- {
- return "taobao.xhotel.rates.update";
- }
-
- public function getApiParas()
- {
- return $this->apiParas;
- }
-
- public function putOtherTextParam($key, $value)
- {
- $this->apiParas[$key] = $value;
- $this->$key = $value;
- }
- }
|