diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 2c7d6e6a..37c73feb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1758 \ No newline at end of file +v1759 \ No newline at end of file diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index de2f01d9..284c8fcc 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -635,9 +635,9 @@ module Stripe attr_reader :out_of_band_amount # The link to download the PDF of the credit note. attr_reader :pdf - # Attribute for field post_payment_amount + # The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof. attr_reader :post_payment_amount - # Attribute for field pre_payment_amount + # The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. attr_reader :pre_payment_amount # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. attr_reader :pretax_credit_amounts @@ -664,20 +664,19 @@ module Stripe # The time that the credit note was voided. attr_reader :voided_at - # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - # in any combination of the following: + # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. + # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: # # - # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). # # - # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount. # - # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount - # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, + # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. def self.create(params = {}, opts = {}) request_stripe_object(method: :post, path: "/v1/credit_notes", params: params, opts: opts) end diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 5252394a..0cb947fa 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -4336,9 +4336,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -4346,7 +4343,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. def attach_payment(params = {}, opts = {}) request_stripe_object( method: :post, @@ -4358,9 +4355,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -4368,7 +4362,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. def self.attach_payment(invoice, params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/services/credit_note_service.rb b/lib/stripe/services/credit_note_service.rb index 0cfa81b9..d9a3fadf 100644 --- a/lib/stripe/services/credit_note_service.rb +++ b/lib/stripe/services/credit_note_service.rb @@ -380,20 +380,19 @@ module Stripe end end - # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - # in any combination of the following: + # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. + # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: # # - # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). # # - # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount. # - # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount - # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, + # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. def create(params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb index 9eb967ca..4b9f8477 100644 --- a/lib/stripe/services/invoice_service.rb +++ b/lib/stripe/services/invoice_service.rb @@ -3680,9 +3680,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -3690,7 +3687,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. def attach_payment(invoice, params = {}, opts = {}) request( method: :post, diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index e69eb3f7..83336bfb 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -26169,10 +26169,10 @@ module Stripe # The link to download the PDF of the credit note. sig { returns(String) } attr_reader :pdf - # Attribute for field post_payment_amount + # The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof. sig { returns(Integer) } attr_reader :post_payment_amount - # Attribute for field pre_payment_amount + # The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. sig { returns(Integer) } attr_reader :pre_payment_amount # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. @@ -26716,20 +26716,19 @@ module Stripe sig { params(expand: T.nilable(T::Array[String])).void } def initialize(expand: nil); end end - # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - # in any combination of the following: + # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. + # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: # # - # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). # # - # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount. # - # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount - # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, + # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. sig { params(params: T.any(::Stripe::CreditNote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) } @@ -37242,9 +37241,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -37252,7 +37248,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. sig { params(params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) } @@ -37260,9 +37256,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -37270,7 +37263,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. sig { params(invoice: String, params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) } @@ -127512,20 +127505,19 @@ module Stripe sig { params(expand: T.nilable(T::Array[String])).void } def initialize(expand: nil); end end - # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - # in any combination of the following: + # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. + # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: # # - # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). # # - # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount. # - # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount - # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, + # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. sig { params(params: T.any(::Stripe::CreditNoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) } @@ -135165,9 +135157,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -135175,7 +135164,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. sig { params(invoice: String, params: T.any(::Stripe::InvoiceService::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) } diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi index 98cb8656..b8abd111 100644 --- a/rbi/stripe/resources/credit_note.rbi +++ b/rbi/stripe/resources/credit_note.rbi @@ -155,10 +155,10 @@ module Stripe # The link to download the PDF of the credit note. sig { returns(String) } attr_reader :pdf - # Attribute for field post_payment_amount + # The amount of the credit note that was refunded to the customer, credited to the customer's balance, credited outside of Stripe, or any combination thereof. sig { returns(Integer) } attr_reader :post_payment_amount - # Attribute for field pre_payment_amount + # The amount of the credit note by which the invoice's `amount_remaining` and `amount_due` were reduced. sig { returns(Integer) } attr_reader :pre_payment_amount # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. @@ -702,20 +702,19 @@ module Stripe sig { params(expand: T.nilable(T::Array[String])).void } def initialize(expand: nil); end end - # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - # in any combination of the following: + # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. + # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: # # - # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). # # - # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount. # - # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount - # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, + # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. sig { params(params: T.any(::Stripe::CreditNote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) } diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index cb3d959f..ac2db91d 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -4782,9 +4782,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -4792,7 +4789,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. sig { params(params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) } @@ -4800,9 +4797,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -4810,7 +4804,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. sig { params(invoice: String, params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) } diff --git a/rbi/stripe/services/credit_note_service.rbi b/rbi/stripe/services/credit_note_service.rbi index efb67780..edaf2ecc 100644 --- a/rbi/stripe/services/credit_note_service.rbi +++ b/rbi/stripe/services/credit_note_service.rbi @@ -368,20 +368,19 @@ module Stripe sig { params(expand: T.nilable(T::Array[String])).void } def initialize(expand: nil); end end - # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces - # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result - # in any combination of the following: + # Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. + # This amount is indicated by the credit note's pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following: # # - # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds). # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). # # - # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount. # - # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount - # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, + # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. sig { params(params: T.any(::Stripe::CreditNoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) } diff --git a/rbi/stripe/services/invoice_service.rbi b/rbi/stripe/services/invoice_service.rbi index 89427442..60b0c753 100644 --- a/rbi/stripe/services/invoice_service.rbi +++ b/rbi/stripe/services/invoice_service.rbi @@ -3950,9 +3950,6 @@ module Stripe # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. # - # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid - # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. - # # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited # to the invoice, increasing its amount_paid. When the invoice is fully paid, the # invoice's status becomes paid. @@ -3960,7 +3957,7 @@ module Stripe # If the PaymentIntent's status is already succeeded when it's attached, it's # credited to the invoice immediately. # - # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + # See: [Partial payments](https://stripe.com/docs/invoicing/partial-payments) to learn more. sig { params(invoice: String, params: T.any(::Stripe::InvoiceService::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) }