Skip to content

Commit 7dc3598

Browse files
committed
AdSlot.rules & make get_pricing_bounds pub
1 parent 1af1380 commit 7dc3598

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

primitives/src/ad_slot.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{BigNum, TargetingTag, ValidatorId};
1+
use crate::{BigNum, TargetingTag, ValidatorId, targeting::Rule};
22
use chrono::serde::{ts_milliseconds, ts_milliseconds_option};
33
use chrono::{DateTime, Utc};
44
use serde::{Deserialize, Serialize};
@@ -44,6 +44,9 @@ pub struct AdSlot {
4444
pub tags: Vec<TargetingTag>,
4545
#[serde(default)]
4646
pub auto_tags: Vec<TargetingTag>,
47+
/// Targeting rules
48+
#[serde(default)]
49+
pub rules: Vec<Rule>,
4750
/// Valid ipfs hash for Ad Unit object. It will be used as fallback data (optional)
4851
#[serde(default)]
4952
pub fallback_unit: Option<String>,

primitives/src/targeting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl Input {
143143
}
144144
}
145145

146-
fn get_pricing_bounds(channel: &Channel, event_type: &str) -> Pricing {
146+
pub fn get_pricing_bounds(channel: &Channel, event_type: &str) -> Pricing {
147147
channel
148148
.spec
149149
.pricing_bounds

0 commit comments

Comments
 (0)