[−][src]Struct voucherify_rs::voucher::Voucher
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer,
[src]
__D: Deserializer,
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToJson for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,