pub struct CreateInvitationRequest {Show 13 fields
pub widget_configuration_id: String,
pub target: CreateInvitationTarget,
pub inviter: Inviter,
pub groups: Option<Vec<CreateInvitationScope>>,
pub scope_id: Option<String>,
pub scope_type_flat: Option<String>,
pub scope_name: Option<String>,
pub scopes: Option<Vec<CreateInvitationScope>>,
pub source: Option<String>,
pub subtype: Option<String>,
pub template_variables: Option<HashMap<String, String>>,
pub metadata: Option<HashMap<String, Value>>,
pub unfurl_config: Option<UnfurlConfig>,
}Expand description
Request body for creating an invitation
Fields§
§widget_configuration_id: String§target: CreateInvitationTarget§inviter: Inviter§groups: Option<Vec<CreateInvitationScope>>§scope_id: Option<String>Preferred: flat scope ID for single scope (takes priority over groups/scopes)
scope_type_flat: Option<String>Scope type when using flat scope_id param
scope_name: Option<String>Scope name when using flat scope_id param
scopes: Option<Vec<CreateInvitationScope>>Deprecated: use scope_id/scope_type_flat/scope_name or groups
source: Option<String>§subtype: Option<String>Customer-defined subtype for analytics segmentation (e.g., “pymk”, “find-friends”)
template_variables: Option<HashMap<String, String>>§metadata: Option<HashMap<String, Value>>§unfurl_config: Option<UnfurlConfig>Implementations§
Source§impl CreateInvitationRequest
impl CreateInvitationRequest
pub fn new( widget_configuration_id: &str, target: CreateInvitationTarget, inviter: Inviter, ) -> Self
pub fn with_groups(self, groups: Vec<CreateInvitationScope>) -> Self
Sourcepub fn with_scope(
self,
scope_id: &str,
scope_type: &str,
scope_name: &str,
) -> Self
pub fn with_scope( self, scope_id: &str, scope_type: &str, scope_name: &str, ) -> Self
Set a single scope using flat params (preferred over with_groups)
pub fn with_source(self, source: &str) -> Self
pub fn with_subtype(self, subtype: &str) -> Self
pub fn with_template_variables(self, vars: HashMap<String, String>) -> Self
pub fn with_metadata(self, metadata: HashMap<String, Value>) -> Self
pub fn with_unfurl_config(self, unfurl_config: UnfurlConfig) -> Self
Trait Implementations§
Source§impl Clone for CreateInvitationRequest
impl Clone for CreateInvitationRequest
Source§fn clone(&self) -> CreateInvitationRequest
fn clone(&self) -> CreateInvitationRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateInvitationRequest
impl Debug for CreateInvitationRequest
Source§impl<'de> Deserialize<'de> for CreateInvitationRequest
impl<'de> Deserialize<'de> for CreateInvitationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateInvitationRequest
impl RefUnwindSafe for CreateInvitationRequest
impl Send for CreateInvitationRequest
impl Sync for CreateInvitationRequest
impl Unpin for CreateInvitationRequest
impl UnsafeUnpin for CreateInvitationRequest
impl UnwindSafe for CreateInvitationRequest
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
Mutably borrows from an owned value. Read more