pub struct CreatePlanChargeInput {
pub billable_metric_id: String,
pub charge_model: ChargeModel,
pub invoiceable: Option<bool>,
pub invoice_display_name: Option<String>,
pub pay_in_advance: Option<bool>,
pub prorated: Option<bool>,
pub min_amount_cents: Option<i64>,
pub properties: Option<Value>,
pub tax_codes: Option<Vec<String>>,
pub filters: Option<Vec<CreateChargeFilterInput>>,
pub regroup_paid_fees: Option<String>,
}Expand description
Input data for creating a plan charge.
Fields§
§billable_metric_id: StringThe billable metric ID to reference.
charge_model: ChargeModelThe charge model to use.
invoiceable: Option<bool>Whether the charge is invoiceable.
invoice_display_name: Option<String>Display name for the charge on invoices.
pay_in_advance: Option<bool>Whether the charge is billed in advance.
prorated: Option<bool>Whether the charge is prorated.
min_amount_cents: Option<i64>Minimum amount in cents for this charge.
properties: Option<Value>Charge properties (model-specific configuration).
tax_codes: Option<Vec<String>>Tax codes for this charge.
filters: Option<Vec<CreateChargeFilterInput>>Filters for differentiated pricing.
regroup_paid_fees: Option<String>The regroup paid fees option.
Implementations§
Source§impl CreatePlanChargeInput
impl CreatePlanChargeInput
Sourcepub fn new(billable_metric_id: String, charge_model: ChargeModel) -> Self
pub fn new(billable_metric_id: String, charge_model: ChargeModel) -> Self
Creates a new plan charge input.
Sourcepub fn with_invoiceable(self, invoiceable: bool) -> Self
pub fn with_invoiceable(self, invoiceable: bool) -> Self
Sets the invoiceable flag.
Sourcepub fn with_invoice_display_name(self, name: String) -> Self
pub fn with_invoice_display_name(self, name: String) -> Self
Sets the invoice display name.
Sourcepub fn with_pay_in_advance(self, pay_in_advance: bool) -> Self
pub fn with_pay_in_advance(self, pay_in_advance: bool) -> Self
Sets the pay in advance flag.
Sourcepub fn with_prorated(self, prorated: bool) -> Self
pub fn with_prorated(self, prorated: bool) -> Self
Sets the prorated flag.
Sourcepub fn with_min_amount_cents(self, min_amount_cents: i64) -> Self
pub fn with_min_amount_cents(self, min_amount_cents: i64) -> Self
Sets the minimum amount in cents.
Sourcepub fn with_properties(self, properties: Value) -> Self
pub fn with_properties(self, properties: Value) -> Self
Sets the charge properties.
Sourcepub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
pub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
Sets the tax codes.
Sourcepub fn with_filters(self, filters: Vec<CreateChargeFilterInput>) -> Self
pub fn with_filters(self, filters: Vec<CreateChargeFilterInput>) -> Self
Sets the filters.
Trait Implementations§
Source§impl Clone for CreatePlanChargeInput
impl Clone for CreatePlanChargeInput
Source§fn clone(&self) -> CreatePlanChargeInput
fn clone(&self) -> CreatePlanChargeInput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreatePlanChargeInput
impl Debug for CreatePlanChargeInput
Source§impl<'de> Deserialize<'de> for CreatePlanChargeInput
impl<'de> Deserialize<'de> for CreatePlanChargeInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreatePlanChargeInput
impl RefUnwindSafe for CreatePlanChargeInput
impl Send for CreatePlanChargeInput
impl Sync for CreatePlanChargeInput
impl Unpin for CreatePlanChargeInput
impl UnwindSafe for CreatePlanChargeInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more