pub struct PromotionFeedItem {Show 13 fields
pub promotion_target: String,
pub discount_modifier: i32,
pub promotion_start_date: String,
pub promotion_end_date: String,
pub occasion: i32,
pub final_urls: Vec<String>,
pub final_mobile_urls: Vec<String>,
pub tracking_url_template: String,
pub url_custom_parameters: Vec<CustomParameter>,
pub final_url_suffix: String,
pub language_code: String,
pub discount_type: Option<DiscountType>,
pub promotion_trigger: Option<PromotionTrigger>,
}
Expand description
Represents a Promotion extension.
Fields§
§promotion_target: String
A freeform description of what the promotion is targeting. This field is required.
discount_modifier: i32
Enum that modifies the qualification of the discount.
promotion_start_date: String
Start date of when the promotion is eligible to be redeemed.
promotion_end_date: String
Last date when the promotion is eligible to be redeemed.
occasion: i32
The occasion the promotion was intended for. If an occasion is set, the redemption window will need to fall within the date range associated with the occasion.
final_urls: Vec<String>
A list of possible final URLs after all cross domain redirects. This field is required.
final_mobile_urls: Vec<String>
A list of possible final mobile URLs after all cross domain redirects.
tracking_url_template: String
URL template for constructing a tracking URL.
url_custom_parameters: Vec<CustomParameter>
A list of mappings to be used for substituting URL custom parameter tags in the tracking_url_template, final_urls, and/or final_mobile_urls.
final_url_suffix: String
URL template for appending params to landing page URLs served with parallel tracking.
language_code: String
The language of the promotion. Represented as BCP 47 language tag.
discount_type: Option<DiscountType>
Discount type, can be percentage off or amount off.
promotion_trigger: Option<PromotionTrigger>
Promotion trigger. Can be by promotion code or promo by eligible order amount.
Implementations§
Source§impl PromotionFeedItem
impl PromotionFeedItem
Sourcepub fn discount_modifier(&self) -> PromotionExtensionDiscountModifier
pub fn discount_modifier(&self) -> PromotionExtensionDiscountModifier
Returns the enum value of discount_modifier
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_discount_modifier(
&mut self,
value: PromotionExtensionDiscountModifier,
)
pub fn set_discount_modifier( &mut self, value: PromotionExtensionDiscountModifier, )
Sets discount_modifier
to the provided enum value.
Sourcepub fn occasion(&self) -> PromotionExtensionOccasion
pub fn occasion(&self) -> PromotionExtensionOccasion
Returns the enum value of occasion
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_occasion(&mut self, value: PromotionExtensionOccasion)
pub fn set_occasion(&mut self, value: PromotionExtensionOccasion)
Sets occasion
to the provided enum value.
Trait Implementations§
Source§impl Clone for PromotionFeedItem
impl Clone for PromotionFeedItem
Source§fn clone(&self) -> PromotionFeedItem
fn clone(&self) -> PromotionFeedItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PromotionFeedItem
impl Debug for PromotionFeedItem
Source§impl Default for PromotionFeedItem
impl Default for PromotionFeedItem
Source§impl Message for PromotionFeedItem
impl Message for PromotionFeedItem
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.Source§impl PartialEq for PromotionFeedItem
impl PartialEq for PromotionFeedItem
impl StructuralPartialEq for PromotionFeedItem
Auto Trait Implementations§
impl Freeze for PromotionFeedItem
impl RefUnwindSafe for PromotionFeedItem
impl Send for PromotionFeedItem
impl Sync for PromotionFeedItem
impl Unpin for PromotionFeedItem
impl UnwindSafe for PromotionFeedItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request