Skip to content

Commit

Permalink
Merge pull request arlyon#420 from arlyon/openapi-1691108706
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon authored Aug 4, 2023
2 parents f63eb12 + d8f3f93 commit 3dd6fec
Show file tree
Hide file tree
Showing 30 changed files with 237 additions and 89 deletions.
2 changes: 1 addition & 1 deletion openapi/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v433"
"version": "v446"
}
4 changes: 2 additions & 2 deletions src/resources/generated/application_fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pub struct ApplicationFee {
/// ID of the Stripe account this fee was taken from.
pub account: Expandable<Account>,

/// Amount earned, in %s.
/// Amount earned, in cents (or local equivalent).
pub amount: i64,

/// Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued).
/// Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued).
pub amount_refunded: i64,

/// ID of the Connect application that earned the fee.
Expand Down
8 changes: 4 additions & 4 deletions src/resources/generated/balance_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct BalanceTransaction {
/// Unique identifier for the object.
pub id: BalanceTransactionId,

/// Gross amount of the transaction, in %s.
/// Gross amount of the transaction, in cents (or local equivalent).
pub amount: i64,

/// The date the transaction's net funds will become available in the Stripe balance.
Expand Down Expand Up @@ -49,13 +49,13 @@ pub struct BalanceTransaction {
/// Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.
pub exchange_rate: Option<f64>,

/// Fees (in %s) paid for this transaction.
/// Fees (in cents (or local equivalent)) paid for this transaction.
pub fee: i64,

/// Detailed breakdown of fees (in %s) paid for this transaction.
/// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
pub fee_details: Vec<Fee>,

/// Net amount of the transaction, in %s.
/// Net amount of the transaction, in cents (or local equivalent).
pub net: i64,

/// [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.
Expand Down
4 changes: 2 additions & 2 deletions src/resources/generated/charge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ pub struct Charge {
/// The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
pub amount: i64,

/// Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
/// Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
pub amount_captured: i64,

/// Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
/// Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
pub amount_refunded: i64,

/// ID of the Connect application that created the charge.
Expand Down
8 changes: 4 additions & 4 deletions src/resources/generated/checkout_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ pub struct LineItemsTaxAmount {
/// The possible values for this field may be extended as new tax rules are supported.
pub taxability_reason: Option<LineItemsTaxAmountTaxabilityReason>,

/// The amount on which tax is calculated, in %s.
/// The amount on which tax is calculated, in cents (or local equivalent).
pub taxable_amount: Option<i64>,
}

Expand Down Expand Up @@ -1776,7 +1776,7 @@ pub struct CreateCheckoutSessionShippingOptions {
pub struct CreateCheckoutSessionSubscriptionData {
/// A non-negative decimal between 0 and 100, with at most two decimal places.
///
/// This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account.
/// This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account.
/// To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key.
/// For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -1801,7 +1801,7 @@ pub struct CreateCheckoutSessionSubscriptionData {

/// The subscription's description, meant to be displayable to the customer.
/// Use this field to optionally store an explanation of the subscription
/// for rendering in Stripe hosted surfaces.
/// for rendering in the [customer portal](https://stripe.com/docs/customer-management).
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,

Expand Down Expand Up @@ -2546,7 +2546,7 @@ pub struct CreateCheckoutSessionShippingOptionsShippingRateData {
pub struct CreateCheckoutSessionSubscriptionDataTransferData {
/// A non-negative decimal between 0 and 100, with at most two decimal places.
///
/// This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account.
/// This represents the percentage of the subscription invoice total that will be transferred to the destination account.
/// By default, the entire amount is transferred to the destination.
#[serde(skip_serializing_if = "Option::is_none")]
pub amount_percent: Option<f64>,
Expand Down
2 changes: 1 addition & 1 deletion src/resources/generated/connect_collection_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct ConnectCollectionTransfer {
/// Unique identifier for the object.
pub id: ConnectCollectionTransferId,

/// Amount transferred, in %s.
/// Amount transferred, in cents (or local equivalent).
pub amount: i64,

/// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
Expand Down
2 changes: 1 addition & 1 deletion src/resources/generated/coupon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub struct Coupon {

/// Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.
///
/// For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
/// For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
#[serde(skip_serializing_if = "Option::is_none")]
pub percent_off: Option<f64>,

Expand Down
18 changes: 9 additions & 9 deletions src/resources/generated/credit_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct CreditNote {
/// Unique identifier for the object.
pub id: CreditNoteId,

/// The integer amount in %s representing the total amount of the credit note, including tax.
/// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
pub amount: i64,

/// This is the sum of all the shipping amounts.
Expand All @@ -42,7 +42,7 @@ pub struct CreditNote {
/// Customer balance transaction related to this credit note.
pub customer_balance_transaction: Option<Expandable<CustomerBalanceTransaction>>,

/// The integer amount in %s representing the total amount of discount that was credited.
/// The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
pub discount_amount: i64,

/// The aggregate amounts calculated per discount for all line items.
Expand Down Expand Up @@ -94,19 +94,19 @@ pub struct CreditNote {
/// Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
pub status: CreditNoteStatus,

/// The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
/// The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
pub subtotal: i64,

/// The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
/// The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
pub subtotal_excluding_tax: Option<i64>,

/// The aggregate amounts calculated per tax rate for all line items.
pub tax_amounts: Vec<CreditNoteTaxAmount>,

/// The integer amount in %s representing the total amount of the credit note, including tax and all discount.
/// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
pub total: i64,

/// The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
/// The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
pub total_excluding_tax: Option<i64>,

/// Type of this credit note, one of `pre_payment` or `post_payment`.
Expand Down Expand Up @@ -163,7 +163,7 @@ impl Object for CreditNote {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreditNoteTaxAmount {
/// The amount, in %s, of the tax.
/// The amount, in cents (or local equivalent), of the tax.
pub amount: i64,

/// Whether this tax amount is inclusive or exclusive.
Expand All @@ -177,13 +177,13 @@ pub struct CreditNoteTaxAmount {
/// The possible values for this field may be extended as new tax rules are supported.
pub taxability_reason: Option<CreditNoteTaxAmountTaxabilityReason>,

/// The amount on which tax is calculated, in %s.
/// The amount on which tax is calculated, in cents (or local equivalent).
pub taxable_amount: Option<i64>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct DiscountsResourceDiscountAmount {
/// The amount, in %s, of the discount.
/// The amount, in cents (or local equivalent), of the discount.
pub amount: i64,

/// The discount that was applied to get this discount amount.
Expand Down
14 changes: 7 additions & 7 deletions src/resources/generated/credit_note_line_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ pub struct CreditNoteLineItem {
/// Unique identifier for the object.
pub id: CreditNoteLineItemId,

/// The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
/// The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
pub amount: i64,

/// The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
/// The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.
pub amount_excluding_tax: Option<i64>,

/// Description of the item being credited.
pub description: Option<String>,

/// The integer amount in %s representing the discount being credited for this line item.
/// The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
pub discount_amount: i64,

/// The amount of discount calculated per discount for this line item.
Expand Down Expand Up @@ -59,7 +59,7 @@ pub struct CreditNoteLineItem {
/// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
pub unit_amount_decimal: Option<String>,

/// The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
/// The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.
pub unit_amount_excluding_tax: Option<String>,
}

Expand All @@ -75,7 +75,7 @@ impl Object for CreditNoteLineItem {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreditNoteTaxAmount {
/// The amount, in %s, of the tax.
/// The amount, in cents (or local equivalent), of the tax.
pub amount: i64,

/// Whether this tax amount is inclusive or exclusive.
Expand All @@ -89,13 +89,13 @@ pub struct CreditNoteTaxAmount {
/// The possible values for this field may be extended as new tax rules are supported.
pub taxability_reason: Option<CreditNoteTaxAmountTaxabilityReason>,

/// The amount on which tax is calculated, in %s.
/// The amount on which tax is calculated, in cents (or local equivalent).
pub taxable_amount: Option<i64>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct DiscountsResourceDiscountAmount {
/// The amount, in %s, of the discount.
/// The amount, in cents (or local equivalent), of the discount.
pub amount: i64,

/// The discount that was applied to get this discount amount.
Expand Down
2 changes: 1 addition & 1 deletion src/resources/generated/fee_refund.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct ApplicationFeeRefund {
/// Unique identifier for the object.
pub id: ApplicationFeeRefundId,

/// Amount, in %s.
/// Amount, in cents (or local equivalent).
pub amount: i64,

/// Balance transaction that describes the impact on your account balance.
Expand Down
31 changes: 22 additions & 9 deletions src/resources/generated/invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ pub struct Invoice {
#[serde(skip_serializing_if = "Option::is_none")]
pub amount_due: Option<i64>,

/// The amount, in %s, that was paid.
/// The amount, in cents (or local equivalent), that was paid.
#[serde(skip_serializing_if = "Option::is_none")]
pub amount_paid: Option<i64>,

/// The difference between amount_due and amount_paid, in %s.
/// The difference between amount_due and amount_paid, in cents (or local equivalent).
#[serde(skip_serializing_if = "Option::is_none")]
pub amount_remaining: Option<i64>,

Expand All @@ -69,7 +69,7 @@ pub struct Invoice {
#[serde(skip_serializing_if = "Option::is_none")]
pub application: Option<Expandable<Application>>,

/// The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
/// The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.
#[serde(skip_serializing_if = "Option::is_none")]
pub application_fee_amount: Option<i64>,

Expand Down Expand Up @@ -398,6 +398,10 @@ pub struct Invoice {
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription: Option<Expandable<Subscription>>,

/// Details about the subscription that created this invoice.
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription_details: Option<SubscriptionDetailsData>,

/// Only set for upcoming invoices that preview prorations.
///
/// The time used to calculate prorations.
Expand All @@ -410,7 +414,7 @@ pub struct Invoice {
#[serde(skip_serializing_if = "Option::is_none")]
pub subtotal: Option<i64>,

/// The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied.
/// The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied.
///
/// Item discounts are already incorporated.
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -437,7 +441,7 @@ pub struct Invoice {
#[serde(skip_serializing_if = "Option::is_none")]
pub total_discount_amounts: Option<Vec<DiscountsResourceDiscountAmount>>,

/// The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
/// The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
#[serde(skip_serializing_if = "Option::is_none")]
pub total_excluding_tax: Option<i64>,

Expand Down Expand Up @@ -509,7 +513,7 @@ pub struct AutomaticTax {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct DiscountsResourceDiscountAmount {
/// The amount, in %s, of the discount.
/// The amount, in cents (or local equivalent), of the discount.
pub amount: i64,

/// The discount that was applied to get this discount amount.
Expand All @@ -527,7 +531,7 @@ pub struct InvoiceSettingCustomField {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct TaxAmount {
/// The amount, in %s, of the tax.
/// The amount, in cents (or local equivalent), of the tax.
pub amount: i64,

/// Whether this tax amount is inclusive or exclusive.
Expand All @@ -541,7 +545,7 @@ pub struct TaxAmount {
/// The possible values for this field may be extended as new tax rules are supported.
pub taxability_reason: Option<TaxAmountTaxabilityReason>,

/// The amount on which tax is calculated, in %s.
/// The amount on which tax is calculated, in cents (or local equivalent).
pub taxable_amount: Option<i64>,
}

Expand All @@ -565,7 +569,7 @@ pub struct InvoiceItemThresholdReason {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct InvoiceTransferData {
/// The amount in %s that will be transferred to the destination account when the invoice is paid.
/// The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid.
///
/// By default, the entire amount is transferred to the destination.
pub amount: Option<i64>,
Expand Down Expand Up @@ -664,6 +668,15 @@ pub struct InvoicesStatusTransitions {
pub voided_at: Option<Timestamp>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct SubscriptionDetailsData {
/// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation.
///
/// *Note: This attribute is populated only for invoices created on or after June 29, 2023.*.
#[serde(default)]
pub metadata: Metadata,
}

/// The parameters for `Invoice::create`.
#[derive(Clone, Debug, Serialize, Default)]
pub struct CreateInvoice<'a> {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/generated/invoices_shipping_cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct LineItemsTaxAmount {
/// The possible values for this field may be extended as new tax rules are supported.
pub taxability_reason: Option<LineItemsTaxAmountTaxabilityReason>,

/// The amount on which tax is calculated, in %s.
/// The amount on which tax is calculated, in cents (or local equivalent).
pub taxable_amount: Option<i64>,
}

Expand Down
2 changes: 1 addition & 1 deletion src/resources/generated/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub struct LineItemsTaxAmount {
/// The possible values for this field may be extended as new tax rules are supported.
pub taxability_reason: Option<LineItemsTaxAmountTaxabilityReason>,

/// The amount on which tax is calculated, in %s.
/// The amount on which tax is calculated, in cents (or local equivalent).
pub taxable_amount: Option<i64>,
}

Expand Down
Loading

0 comments on commit 3dd6fec

Please sign in to comment.