1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
use stripe::{Currency, Refund}; use util::{Result, List}; use serde::Serialize; use Client; #[derive(Deserialize, Debug)] pub struct ApplicationFees { pub id: String, pub object: String, pub account: String, pub amount: i64, pub amount_refunded: i64, pub application: String, pub balance_transaction: String, pub charge: String, pub created: i64, pub currency: Currency, pub livemode: bool, pub originating_transaction: Option<String>, pub refunded: bool, pub refunds: List<Refund> } impl ApplicationFees { pub fn retrieve(client: &Client, id: &str) -> Result<ApplicationFees> { client.get_empty(&format!("/application_fees/{}", id)) } pub fn list<B: Serialize>(client: &Client, param: B) -> Result<List<ApplicationFees>> { client.get("/application_fees", param) } }