pub struct Event {
pub id: Option<String>,
pub object: Option<String>,
pub api_version: Option<String>,
pub created: Option<i64>,
pub livemode: Option<bool>,
pub pending_webhooks: Option<i64>,
pub request: Option<Request>,
pub type_field: Option<String>,
}Expand description
Events occur when the state of another API resource changes.
Fields§
§id: Option<String>§object: Option<String>§api_version: Option<String>§created: Option<i64>§livemode: Option<bool>§pending_webhooks: Option<i64>§request: Option<Request>§type_field: Option<String>Implementations§
Source§impl Event
impl Event
Sourcepub async fn async_get(creds: Auth, id: String) -> Result<Self, Error>
pub async fn async_get(creds: Auth, id: String) -> Result<Self, Error>
Asynchronously retrieves the event with the given ID.
§Arguments
auth- payup::stripe::Auth::new(client, secret)id- The id of the event you want to retrieve.
§Examples
// Create the Authentication refererence
let auth = payup::stripe::Auth::new(client, secret);
// Fetch customer using id
let event = payup::stripe::Event::async_get(auth, "ch_").await?;Sourcepub fn get(creds: Auth, id: String) -> Result<Self, Error>
pub fn get(creds: Auth, id: String) -> Result<Self, Error>
Retrieves the event with the given ID.
§Arguments
auth- payup::stripe::Auth::new(client, secret)id- The id of the event you want to retrieve.
§Examples
// Create the Authentication refererence
let auth = payup::stripe::Auth::new(client, secret);
// Fetch customer using id
let event = payup::stripe::Event::get(auth, "ch_")?;Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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 Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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