[][src]Struct voucherify_rs::voucher::Voucher

pub struct Voucher {
    pub object: Option<String>,
    pub created_at: Option<String>,
    pub code: Option<String>,
    pub campaign: Option<String>,
    pub category: Option<String>,
    pub voucher_type: Option<VoucherType>,
    pub is_referral_code: Option<bool>,
    pub start_date: Option<String>,
    pub expiration_date: Option<String>,
    pub publish: Option<Publish>,
    pub redemption: Option<Redemption>,
    pub active: Option<bool>,
    pub additional_info: Option<String>,
    pub metadata: Option<BTreeMap<String, Value>>,
    pub discount: Option<Discount>,
    pub gift: Option<Gift>,
    pub assets: Option<Assets>,
    pub referrer_id: Option<String>,
}

Fields

object: Option<String>created_at: Option<String>code: Option<String>campaign: Option<String>category: Option<String>voucher_type: Option<VoucherType>is_referral_code: Option<bool>start_date: Option<String>expiration_date: Option<String>publish: Option<Publish>redemption: Option<Redemption>active: Option<bool>additional_info: Option<String>metadata: Option<BTreeMap<String, Value>>discount: Option<Discount>gift: Option<Gift>assets: Option<Assets>referrer_id: Option<String>

Methods

impl Voucher[src]

pub fn new() -> Voucher[src]

pub fn code(self, code: String) -> Voucher[src]

pub fn category(self, category: String) -> Voucher[src]

pub fn voucher_type(self, voucher_type: VoucherType) -> Voucher[src]

pub fn start_date(self, start_date: String) -> Voucher[src]

pub fn expiration_date(self, expiration_date: String) -> Voucher[src]

pub fn discount(self, discount_type: DiscountType, amount: u32) -> Voucher[src]

pub fn build(self) -> Voucher[src]

Trait Implementations

impl Default for Voucher[src]

impl PartialEq<Voucher> for Voucher[src]

impl Debug for Voucher[src]

impl Deserialize for Voucher[src]

impl Serialize for Voucher[src]

Auto Trait Implementations

impl Sync for Voucher

impl Unpin for Voucher

impl Send for Voucher

impl UnwindSafe for Voucher

impl RefUnwindSafe for Voucher

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToJson for T where
    T: Serialize + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.