Struct stripe::Source [−][src]
pub struct Source {
pub id: String,
pub amount: Option<i64>,
pub client_secret: Option<String>,
pub code_verification: Option<CodeVerification>,
pub created: Timestamp,
pub currency: Option<Currency>,
pub flow: Option<String>,
pub livemode: bool,
pub metadata: Option<Metadata>,
pub owner: Option<Owner>,
pub receiver: Option<Receiver>,
pub redirect: Option<Redirect>,
pub statement_descriptor: Option<String>,
pub status: Option<String>,
pub source_type: Option<String>,
pub usage: Option<String>,
}The resource representing a Stripe source.
For more details see https://stripe.com/docs/api#sources.
Fields
id: String
amount: Option<i64>
client_secret: Option<String>
code_verification: Option<CodeVerification>
created: Timestamp
currency: Option<Currency>
flow: Option<String>
livemode: bool
metadata: Option<Metadata>
owner: Option<Owner>
receiver: Option<Receiver>
redirect: Option<Redirect>
statement_descriptor: Option<String>
status: Option<String>
source_type: Option<String>
usage: Option<String>
Methods
impl Source[src]
impl Sourcepub fn create(client: &Client, params: SourceParams) -> Result<Source, Error>[src]
pub fn create(client: &Client, params: SourceParams) -> Result<Source, Error>pub fn get(client: &Client, source_id: &str) -> Result<Source, Error>[src]
pub fn get(client: &Client, source_id: &str) -> Result<Source, Error>pub fn update(
client: &Client,
source_id: &str,
params: SourceParams
) -> Result<Source, Error>[src]
pub fn update(
client: &Client,
source_id: &str,
params: SourceParams
) -> Result<Source, Error>pub fn attach_source(
client: &Client,
customer_id: &str,
source_id: &str
) -> Result<Source, Error>[src]
pub fn attach_source(
client: &Client,
customer_id: &str,
source_id: &str
) -> Result<Source, Error>Attaches a source to a customer, does not change default Source for the Customer
For more details see https://stripe.com/docs/api#attach_source.
pub fn detach_source(
client: &Client,
customer_id: &str,
source_id: &str
) -> Result<Source, Error>[src]
pub fn detach_source(
client: &Client,
customer_id: &str,
source_id: &str
) -> Result<Source, Error>Detaches a source from a customer
For more details see https://stripe.com/docs/api#detach_source.