pub struct CreateChargeInput {Show 15 fields
pub billable_metric_id: String,
pub charge_model: ChargeModel,
pub code: Option<String>,
pub invoice_display_name: Option<String>,
pub pay_in_advance: Option<bool>,
pub invoiceable: Option<bool>,
pub prorated: Option<bool>,
pub min_amount_cents: Option<i64>,
pub properties: Option<Value>,
pub filters: Option<Vec<ChargeFilterInputValue>>,
pub tax_codes: Option<Vec<String>>,
pub regroup_paid_fees: Option<String>,
pub applied_pricing_unit: Option<Value>,
pub accepts_target_wallet: Option<bool>,
pub cascade_updates: Option<bool>,
}Expand description
Input data for creating a standalone charge on a plan.
Fields§
§billable_metric_id: StringThe billable metric ID to reference.
charge_model: ChargeModelThe charge model to use.
code: Option<String>Unique code for the charge.
invoice_display_name: Option<String>Display name for the charge on invoices.
pay_in_advance: Option<bool>Whether the charge is billed in advance.
invoiceable: Option<bool>Whether the charge is invoiceable.
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).
filters: Option<Vec<ChargeFilterInputValue>>Filters for differentiated pricing.
tax_codes: Option<Vec<String>>Tax codes for this charge.
regroup_paid_fees: Option<String>The regroup paid fees option.
applied_pricing_unit: Option<Value>Applied pricing unit for this charge.
accepts_target_wallet: Option<bool>Whether the charge accepts a target wallet.
cascade_updates: Option<bool>Whether to cascade updates to existing subscriptions.
Implementations§
Source§impl CreateChargeInput
impl CreateChargeInput
pub fn new(billable_metric_id: String, charge_model: ChargeModel) -> Self
pub fn with_code(self, code: String) -> Self
pub fn with_properties(self, properties: Value) -> Self
pub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
Trait Implementations§
Source§impl Clone for CreateChargeInput
impl Clone for CreateChargeInput
Source§impl Debug for CreateChargeInput
impl Debug for CreateChargeInput
Source§impl<'de> Deserialize<'de> for CreateChargeInput
impl<'de> Deserialize<'de> for CreateChargeInput
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 CreateChargeInput
impl RefUnwindSafe for CreateChargeInput
impl Send for CreateChargeInput
impl Sync for CreateChargeInput
impl Unpin for CreateChargeInput
impl UnsafeUnpin for CreateChargeInput
impl UnwindSafe for CreateChargeInput
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