Struct stripe::Plan
[−]
[src]
pub struct Plan { pub id: String, pub amount: u64, pub created: Timestamp, pub currency: Currency, pub interval: String, pub interval_count: u64, pub livemode: bool, pub metadata: Metadata, pub name: String, pub statement_descriptor: Option<String>, pub trial_period_days: Option<u64>, }
The resource representing a Stripe plan.
For more details see https://stripe.com/docs/api#plans.
Fields
id: String
amount: u64
created: Timestamp
currency: Currency
interval: String
interval_count: u64
livemode: bool
metadata: Metadata
name: String
statement_descriptor: Option<String>
trial_period_days: Option<u64>
Methods
impl Plan
[src]
fn create(client: &Client, params: PlanParams) -> Result<Plan, Error>
Creates a new plan.
For more details see https://stripe.com/docs/api#create_plan.
fn retrieve(client: &Client, plan_id: &str) -> Result<Plan, Error>
Retrieves the details of a plan.
For more details see https://stripe.com/docs/api#retrieve_plan.
fn update(
client: &Client,
plan_id: &str,
params: PlanParams
) -> Result<Plan, Error>
client: &Client,
plan_id: &str,
params: PlanParams
) -> Result<Plan, Error>
Updates a plan's properties.
For more details see https://stripe.com/docs/api#update_plan.
fn delete(client: &Client, plan_id: &str) -> Result<Deleted, Error>
Deletes a plan.
For more details see https://stripe.com/docs/api#delete_plan.