Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion generated/async-stripe-billing/src/billing_alert/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ pub struct BillingAlert {
pub alert_type: stripe_billing::BillingAlertAlertType,
/// Unique identifier for the object.
pub id: stripe_billing::BillingAlertId,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// Status of the alert. This can be active, inactive or archived.
pub status: Option<BillingAlertStatus>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ pub struct BillingAlertTriggered {
pub created: stripe_types::Timestamp,
/// ID of customer for which the alert triggered
pub customer: String,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// The value triggering the alert
pub value: i64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ pub struct BillingCreditBalanceSummary {
pub customer: stripe_types::Expandable<stripe_shared::Customer>,
/// The account the balance is for.
pub customer_account: Option<String>,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
}
#[doc(hidden)]
Expand Down
3 changes: 2 additions & 1 deletion generated/async-stripe-billing/src/billing_meter/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pub struct BillingMeter {
pub event_time_window: Option<stripe_billing::BillingMeterEventTimeWindow>,
/// Unique identifier for the object.
pub id: stripe_billing::BillingMeterId,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// The meter's status.
pub status: stripe_billing::BillingMeterStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ pub struct BillingMeterEvent {
pub event_name: String,
/// A unique identifier for the event.
pub identifier: String,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// The payload of the event.
/// This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ pub struct BillingMeterEventAdjustment {
pub cancel: Option<stripe_billing::BillingMeterResourceBillingMeterEventAdjustmentCancel>,
/// The name of the meter event. Corresponds with the `event_name` field on a meter.
pub event_name: String,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// The meter event adjustment's status.
pub status: BillingMeterEventAdjustmentStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ pub struct BillingMeterEventSummary {
pub end_time: stripe_types::Timestamp,
/// Unique identifier for the object.
pub id: stripe_billing::BillingMeterEventSummaryId,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// The meter associated with this event summary.
pub meter: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pub struct BillingPortalConfiguration {
/// Whether the configuration is the default.
/// If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
pub is_default: bool,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
pub login_page: stripe_billing::PortalLoginPage,
/// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ pub struct BillingPortalSession {
pub flow: Option<stripe_billing::PortalFlowsFlow>,
/// Unique identifier for the object.
pub id: stripe_billing::BillingPortalSessionId,
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
/// If the object exists in live mode, the value is `true`.
/// If the object exists in test mode, the value is `false`.
pub livemode: bool,
/// The IETF language tag of the locale Customer Portal is displayed in.
/// If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
Expand Down
27 changes: 24 additions & 3 deletions generated/async-stripe-billing/src/credit_note/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl<'de> serde::Deserialize<'de> for PreviewCreditNoteEmailType {
}
/// Line items that make up the credit note.
/// One of `amount`, `lines`, or `shipping_cost` must be provided.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
#[derive(Clone, Debug, serde::Serialize)]
pub struct PreviewCreditNoteLines {
/// The line item amount to credit.
/// Only valid when `type` is `invoice_line_item`.
Expand All @@ -306,6 +306,12 @@ pub struct PreviewCreditNoteLines {
/// The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
#[serde(skip_serializing_if = "Option::is_none")]
pub invoice_line_item: Option<String>,
/// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
/// The line item quantity to credit.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity: Option<u64>,
Expand Down Expand Up @@ -337,6 +343,7 @@ impl PreviewCreditNoteLines {
amount: None,
description: None,
invoice_line_item: None,
metadata: None,
quantity: None,
tax_amounts: None,
tax_rates: None,
Expand Down Expand Up @@ -741,7 +748,7 @@ impl<'de> serde::Deserialize<'de> for PreviewLinesCreditNoteEmailType {
}
/// Line items that make up the credit note.
/// One of `amount`, `lines`, or `shipping_cost` must be provided.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
#[derive(Clone, Debug, serde::Serialize)]
pub struct PreviewLinesCreditNoteLines {
/// The line item amount to credit.
/// Only valid when `type` is `invoice_line_item`.
Expand All @@ -754,6 +761,12 @@ pub struct PreviewLinesCreditNoteLines {
/// The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
#[serde(skip_serializing_if = "Option::is_none")]
pub invoice_line_item: Option<String>,
/// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
/// The line item quantity to credit.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity: Option<u64>,
Expand Down Expand Up @@ -785,6 +798,7 @@ impl PreviewLinesCreditNoteLines {
amount: None,
description: None,
invoice_line_item: None,
metadata: None,
quantity: None,
tax_amounts: None,
tax_rates: None,
Expand Down Expand Up @@ -1208,7 +1222,7 @@ impl<'de> serde::Deserialize<'de> for CreateCreditNoteEmailType {
}
/// Line items that make up the credit note.
/// One of `amount`, `lines`, or `shipping_cost` must be provided.
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
#[derive(Clone, Debug, serde::Serialize)]
pub struct CreateCreditNoteLines {
/// The line item amount to credit.
/// Only valid when `type` is `invoice_line_item`.
Expand All @@ -1221,6 +1235,12 @@ pub struct CreateCreditNoteLines {
/// The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
#[serde(skip_serializing_if = "Option::is_none")]
pub invoice_line_item: Option<String>,
/// Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object.
/// This can be useful for storing additional information about the object in a structured format.
/// Individual keys can be unset by posting an empty value to them.
/// All keys can be unset by posting an empty value to `metadata`.
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<std::collections::HashMap<String, String>>,
/// The line item quantity to credit.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity: Option<u64>,
Expand Down Expand Up @@ -1252,6 +1272,7 @@ impl CreateCreditNoteLines {
amount: None,
description: None,
invoice_line_item: None,
metadata: None,
quantity: None,
tax_amounts: None,
tax_rates: None,
Expand Down
35 changes: 28 additions & 7 deletions generated/async-stripe-billing/src/invoice/requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use stripe_client_core::{

/// Permanently deletes a one-off invoice draft.
/// This cannot be undone.
/// Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice).
/// Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be <a href="/api/invoices/void">voided</a>.
#[derive(Clone, Debug, serde::Serialize)]
pub struct DeleteInvoice {
invoice: stripe_shared::InvoiceId,
Expand Down Expand Up @@ -2847,7 +2847,7 @@ impl<'de> serde::Deserialize<'de> for CreateInvoiceShippingCostShippingRateDataT
}
}
/// This endpoint creates a draft invoice for a given customer.
/// The invoice remains a draft until you [finalize](https://stripe.com/docs/api#finalize_invoice) the invoice, which allows you to <a href="/api/invoices/pay">pay</a> or <a href="/api/invoices/send">send</a> the invoice to your customers.
/// The invoice remains a draft until you <a href="/api/invoices/finalize">finalize</a> the invoice, which allows you to <a href="/api/invoices/pay">pay</a> or <a href="/api/invoices/send">send</a> the invoice to your customers.
#[derive(Clone, Debug, serde::Serialize)]
pub struct CreateInvoice {
inner: CreateInvoiceBuilder,
Expand Down Expand Up @@ -5746,9 +5746,15 @@ pub struct AddLinesInvoiceLines {
/// The pricing information for the invoice item.
#[serde(skip_serializing_if = "Option::is_none")]
pub pricing: Option<PricingParam>,
/// Non-negative integer. The quantity of units for the line item.
/// Non-negative integer.
/// The quantity of units for the line item.
/// Use `quantity_decimal` instead to provide decimal precision.
/// This field will be deprecated in favor of `quantity_decimal` in a future version.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity: Option<u64>,
/// Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity_decimal: Option<String>,
/// A list of up to 10 tax amounts for this line item.
/// This can be useful if you calculate taxes on your own or use a third-party to calculate them.
/// You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing).
Expand All @@ -5774,6 +5780,7 @@ impl AddLinesInvoiceLines {
price_data: None,
pricing: None,
quantity: None,
quantity_decimal: None,
tax_amounts: None,
tax_rates: None,
}
Expand Down Expand Up @@ -6934,9 +6941,15 @@ pub struct UpdateLinesInvoiceLines {
/// The pricing information for the invoice item.
#[serde(skip_serializing_if = "Option::is_none")]
pub pricing: Option<PricingParam>,
/// Non-negative integer. The quantity of units for the line item.
/// Non-negative integer.
/// The quantity of units for the line item.
/// Use `quantity_decimal` instead to provide decimal precision.
/// This field will be deprecated in favor of `quantity_decimal` in a future version.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity: Option<u64>,
/// Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity_decimal: Option<String>,
/// A list of up to 10 tax amounts for this line item.
/// This can be useful if you calculate taxes on your own or use a third-party to calculate them.
/// You cannot set tax amounts if any line item has [tax_rates](https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://docs.stripe.com/tax/invoicing).
Expand All @@ -6962,6 +6975,7 @@ impl UpdateLinesInvoiceLines {
price_data: None,
pricing: None,
quantity: None,
quantity_decimal: None,
tax_amounts: None,
tax_rates: None,
}
Expand Down Expand Up @@ -7551,10 +7565,10 @@ impl VoidInvoiceInvoiceBuilder {
}
/// Mark a finalized invoice as void.
/// This cannot be undone.
/// Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
/// Voiding an invoice is similar to <a href="/api/invoices/delete">deletion</a>, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found.
///
/// Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in.
/// You might need to [issue another invoice](https://stripe.com/docs/api#create_invoice) or [credit note](https://stripe.com/docs/api#create_credit_note) instead.
/// You might need to <a href="/api/invoices/create">issue another invoice</a> or <a href="/api/credit_notes/create">credit note</a> instead.
/// Stripe recommends that you consult with your legal counsel for advice specific to your business.
#[derive(Clone, Debug, serde::Serialize)]
pub struct VoidInvoiceInvoice {
Expand Down Expand Up @@ -8405,9 +8419,15 @@ pub struct CreatePreviewInvoiceInvoiceItems {
/// One of `price` or `price_data` is required.
#[serde(skip_serializing_if = "Option::is_none")]
pub price_data: Option<CreatePreviewInvoiceInvoiceItemsPriceData>,
/// Non-negative integer. The quantity of units for the invoice item.
/// Non-negative integer.
/// The quantity of units for the invoice item.
/// Use `quantity_decimal` instead to provide decimal precision.
/// This field will be deprecated in favor of `quantity_decimal` in a future version.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity: Option<u64>,
/// Non-negative decimal with at most 12 decimal places. The quantity of units for the invoice item.
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity_decimal: Option<String>,
/// Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings.
/// Specifies whether the price is considered inclusive of taxes or exclusive of taxes.
/// One of `inclusive`, `exclusive`, or `unspecified`.
Expand Down Expand Up @@ -8444,6 +8464,7 @@ impl CreatePreviewInvoiceInvoiceItems {
price: None,
price_data: None,
quantity: None,
quantity_decimal: None,
tax_behavior: None,
tax_code: None,
tax_rates: None,
Expand Down
Loading
Loading