1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use crate::params::{Identifiable, Timestamp}; use serde_derive::{Deserialize, Serialize}; /// The resource representing a Stripe file. /// /// For more details see https://stripe.com/docs/api#file_object. #[derive(Clone, Debug, Deserialize, Serialize)] pub struct File { pub id: String, pub object: String, pub created: Timestamp, pub purpose: String, pub size: u64, pub title: Option<String>, #[serde(rename = "type")] pub file_type: String, // (csv, pdf, jpg, png) pub url: String, } impl Identifiable for File { fn id(&self) -> &str { &self.id } }