pdd/requests/
pdd_ad_api_unit_bid_update.rs

1use crate::Request;
2
3use serde::{Deserialize, Serialize};
4
5
6/// 更新单个定向/资源位
7#[derive(Serialize, Deserialize, Debug, Default)]
8pub struct AdUnitBids {
9    
10    /// 出价Id
11    #[serde(rename = "bidId")]
12    pub bid_id: Option<i64>,
13    
14    /// 出价,万分比
15    #[serde(rename = "bidValue")]
16    pub bid_value: Option<i64>,
17    
18}
19
20/// 更新单个定向/资源位
21#[derive(Serialize, Deserialize, Debug, Default)]
22pub struct PddAdApiUnitBidUpdate {
23    
24    /// 广告单元Id
25    #[serde(rename = "adId")]
26    pub ad_id: Option<i64>,
27    
28    /// 更新列表
29    #[serde(rename = "adUnitBids")]
30    pub ad_unit_bids: Option<Vec<AdUnitBids>>,
31    
32    /// 出价资源类型。1表示人群定向,2表示资源位。
33    #[serde(rename = "bidReferenceType")]
34    pub bid_reference_type: Option<i32>,
35    
36}
37
38
39/// 更新单个定向/资源位
40impl Request for PddAdApiUnitBidUpdate {
41    fn get_type() -> String {
42        "pdd.ad.api.unit.bid.update".to_string()
43    }
44
45    fn get_response_name() -> String {
46        "response".to_string()
47    }
48}