pub struct CreateCustomerCommitV1BodyInvoiceSchedule {
pub credit_type_id: Option<Uuid>,
pub do_not_invoice: bool,
pub recurring_schedule: Option<CreateCustomerCommitV1BodyInvoiceScheduleRecurringSchedule>,
pub schedule_items: Vec<CreateCustomerCommitV1BodyInvoiceScheduleScheduleItemsItem>,
}Expand description
Required for “POSTPAID” commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match accesss_schedule amount. Optional for “PREPAID” commits: if not provided, this will be a “complimentary” commit with no invoice.
JSON schema
{
"description": "Required for \"POSTPAID\" commits: the true up invoice
will be generated at this time and only one schedule item is allowed;
the total must match accesss_schedule amount. Optional for \"PREPAID\"
commits: if not provided, this will be a \"complimentary\" commit with
no invoice.",
"type": "object",
"properties": {
"credit_type_id": {
"description": "Defaults to USD (cents) if not passed.",
"type": "string",
"format": "uuid"
},
"do_not_invoice": {
"description": "This field is only applicable to commit invoice
schedules. If true, this schedule will not generate an invoice.",
"default": false,
"type": "boolean"
},
"recurring_schedule": {
"description": "Enter the unit price and quantity for the charge or
instead only send the amount. If amount is sent, the unit price is
assumed to be the amount and quantity is inferred to be 1.",
"type": "object",
"required": [
"amount_distribution",
"ending_before",
"frequency",
"starting_at"
],
"properties": {
"amount": {
"description": "Amount for the charge. Can be provided instead
of unit_price and quantity. If amount is sent, the unit_price is assumed
to be the amount and quantity is inferred to be 1.",
"type": "number"
},
"amount_distribution": {
"type": "string"
},
"ending_before": {
"description": "RFC 3339 timestamp (exclusive).",
"type": "string",
"format": "date-time"
},
"frequency": {
"type": "string"
},
"quantity": {
"description": "Quantity for the charge. Will be multiplied by
unit_price to determine the amount and must be specified with
unit_price. If specified amount cannot be provided.",
"type": "number"
},
"starting_at": {
"description": "RFC 3339 timestamp (inclusive).",
"type": "string",
"format": "date-time"
},
"unit_price": {
"description": "Unit price for the charge. Will be multiplied
by quantity to determine the amount and must be specified with quantity.
If specified amount cannot be provided.",
"type": "number"
}
}
},
"schedule_items": {
"description": "Either provide amount or provide both unit_price
and quantity.",
"type": "array",
"items": {
"type": "object",
"required": [
"timestamp"
],
"properties": {
"amount": {
"description": "Amount for the charge. Can be provided
instead of unit_price and quantity. If amount is sent, the unit_price is
assumed to be the amount and quantity is inferred to be 1.",
"type": "number"
},
"quantity": {
"description": "Quantity for the charge. Will be multiplied
by unit_price to determine the amount and must be specified with
unit_price. If specified amount cannot be provided.",
"type": "number"
},
"timestamp": {
"description": "timestamp of the scheduled event",
"type": "string",
"format": "date-time"
},
"unit_price": {
"description": "Unit price for the charge. Will be multiplied
by quantity to determine the amount and must be specified with quantity.
If specified amount cannot be provided.",
"type": "number"
}
}
}
}
}
}Fields§
§credit_type_id: Option<Uuid>Defaults to USD (cents) if not passed.
do_not_invoice: boolThis field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.
recurring_schedule: Option<CreateCustomerCommitV1BodyInvoiceScheduleRecurringSchedule>§schedule_items: Vec<CreateCustomerCommitV1BodyInvoiceScheduleScheduleItemsItem>Either provide amount or provide both unit_price and quantity.
Trait Implementations§
Source§impl Clone for CreateCustomerCommitV1BodyInvoiceSchedule
impl Clone for CreateCustomerCommitV1BodyInvoiceSchedule
Source§fn clone(&self) -> CreateCustomerCommitV1BodyInvoiceSchedule
fn clone(&self) -> CreateCustomerCommitV1BodyInvoiceSchedule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for CreateCustomerCommitV1BodyInvoiceSchedule
impl<'de> Deserialize<'de> for CreateCustomerCommitV1BodyInvoiceSchedule
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 CreateCustomerCommitV1BodyInvoiceSchedule
impl RefUnwindSafe for CreateCustomerCommitV1BodyInvoiceSchedule
impl Send for CreateCustomerCommitV1BodyInvoiceSchedule
impl Sync for CreateCustomerCommitV1BodyInvoiceSchedule
impl Unpin for CreateCustomerCommitV1BodyInvoiceSchedule
impl UnsafeUnpin for CreateCustomerCommitV1BodyInvoiceSchedule
impl UnwindSafe for CreateCustomerCommitV1BodyInvoiceSchedule
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