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 nickname: Option<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
nickname: Option<String>
statement_descriptor: Option<String>
trial_period_days: Option<u64>
Methods
impl Plan
[src]
impl Plan
pub fn create(client: &Client, params: PlanParams) -> Result<Plan, Error>
[src]
pub fn create(client: &Client, params: PlanParams) -> Result<Plan, Error>
Creates a new plan.
For more details see https://stripe.com/docs/api#create_plan.
pub fn retrieve(client: &Client, plan_id: &str) -> Result<Plan, Error>
[src]
pub 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.
pub fn update(
client: &Client,
plan_id: &str,
params: PlanParams
) -> Result<Plan, Error>
[src]
pub fn update(
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.
pub fn delete(client: &Client, plan_id: &str) -> Result<Deleted, Error>
[src]
pub fn delete(client: &Client, plan_id: &str) -> Result<Deleted, Error>
Deletes a plan.
For more details see https://stripe.com/docs/api#delete_plan.