[][src]Struct libstripe::resources::billing::coupons::Coupon

pub struct Coupon {
    pub id: String,
    pub object: Object,
    pub amount_off: Option<i64>,
    pub created: i64,
    pub currency: Option<Currency>,
    pub duration: Duration,
    pub duration_in_months: Option<i32>,
    pub livemode: bool,
    pub max_redemptions: Option<i64>,
    pub metadata: HashMap<String, String>,
    pub name: Option<String>,
    pub percent_off: Option<f32>,
    pub redeem_by: Option<i64>,
    pub times_redeemed: i32,
    pub valid: bool,
}

Fields

id: Stringobject: Objectamount_off: Option<i64>created: i64currency: Option<Currency>duration: Durationduration_in_months: Option<i32>livemode: boolmax_redemptions: Option<i64>metadata: HashMap<String, String>name: Option<String>percent_off: Option<f32>redeem_by: Option<i64>times_redeemed: i32valid: bool

Methods

impl Coupon[src]

pub fn create<B: Serialize>(client: &Client, param: B) -> Result<Self>[src]

pub fn retrieve(client: &Client, coupon: &str) -> Result<Self>[src]

pub fn update<B: Serialize>(
    client: &Client,
    coupon: &str,
    param: B
) -> Result<Self>
[src]

pub fn delete(client: &Client, coupon: &str) -> Result<Deleted>[src]

pub fn list<B: Serialize>(client: &Client, param: B) -> Result<List<Self>>[src]

Trait Implementations

impl PartialEq<Coupon> for Coupon[src]

impl Debug for Coupon[src]

impl Serialize for Coupon[src]

impl<'de> Deserialize<'de> for Coupon[src]

Auto Trait Implementations

impl Send for Coupon

impl Sync for Coupon

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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