From 76850b0de23f7937b6960e53d92a64e091fb853d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 22:38:20 +0000 Subject: [PATCH] Update generated code for v1673 --- OPENAPI_VERSION | 2 +- lib/stripe/resources/balance_settings.rb | 6 ++- .../resources/capital/financing_offer.rb | 8 +-- .../resources/capital/financing_summary.rb | 12 ++--- lib/stripe/resources/invoice.rb | 2 +- lib/stripe/resources/privacy/redaction_job.rb | 3 ++ .../privacy/redaction_job_validation_error.rb | 29 ----------- lib/stripe/resources/refund.rb | 2 + rbi/stripe.rbi | 52 +++++++------------ rbi/stripe/resources/balance_settings.rbi | 6 ++- .../resources/capital/financing_offer.rbi | 8 +-- .../resources/capital/financing_summary.rbi | 12 ++--- .../redaction_job_validation_error.rbi | 23 -------- rbi/stripe/resources/refund.rbi | 3 ++ 14 files changed, 58 insertions(+), 110 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f659e744..b4a6a7f3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1669 \ No newline at end of file +v1673 \ No newline at end of file diff --git a/lib/stripe/resources/balance_settings.rb b/lib/stripe/resources/balance_settings.rb index 2775779c..fe94d7b6 100644 --- a/lib/stripe/resources/balance_settings.rb +++ b/lib/stripe/resources/balance_settings.rb @@ -2,7 +2,11 @@ # frozen_string_literal: true module Stripe - # Options for customizing account balances within Stripe. + # Options for customizing account balances and payout settings for a Stripe platform's connected accounts. + # + # This API is only available for users enrolled in the public preview for Accounts v2 on Stripe Connect. + # If you are not in this preview, please use the [Accounts v1 API](https://docs.stripe.com/api/accounts?api-version=2025-03-31.basil) + # to manage your connected accounts' balance settings instead. class BalanceSettings < SingletonAPIResource include Stripe::APIOperations::SingletonSave diff --git a/lib/stripe/resources/capital/financing_offer.rb b/lib/stripe/resources/capital/financing_offer.rb index 028c6362..d947575e 100644 --- a/lib/stripe/resources/capital/financing_offer.rb +++ b/lib/stripe/resources/capital/financing_offer.rb @@ -14,11 +14,11 @@ module Stripe end class AcceptedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. attr_reader :advance_amount # Currency that the financing offer is transacted in. For example, `usd`. attr_reader :currency - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. attr_reader :fee_amount # Populated when the `product_type` of the `financingoffer` is `refill`. # Represents the discount amount on remaining premium for the existing loan at payout time. @@ -28,13 +28,13 @@ module Stripe end class OfferedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. attr_reader :advance_amount # Describes the type of user the offer is being extended to. attr_reader :campaign_type # Currency that the financing offer is transacted in. For example, `usd`. attr_reader :currency - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. attr_reader :fee_amount # Populated when the `product_type` of the `financingoffer` is `refill`. # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` diff --git a/lib/stripe/resources/capital/financing_summary.rb b/lib/stripe/resources/capital/financing_summary.rb index 3a9a2738..b71b11d6 100644 --- a/lib/stripe/resources/capital/financing_summary.rb +++ b/lib/stripe/resources/capital/financing_summary.rb @@ -16,12 +16,12 @@ module Stripe # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. # Given in seconds since unix epoch. attr_reader :due_at - # The amount that has already been paid in the current repayment interval. + # The amount that has already been paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000. attr_reader :paid_amount - # The amount that is yet to be paid in the current repayment interval. + # The amount that is yet to be paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000. attr_reader :remaining_amount end - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. attr_reader :advance_amount # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. attr_reader :advance_paid_out_at @@ -29,11 +29,11 @@ module Stripe attr_reader :currency # The chronologically current repayment interval for the financing offer. attr_reader :current_repayment_interval - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. attr_reader :fee_amount - # The amount the Connected account has paid toward the financing debt so far. + # The amount the Connected account has paid toward the financing debt so far, in minor units. For example, $1,000 USD will be represented as 100000. attr_reader :paid_amount - # The balance remaining to be paid on the financing, in minor units. + # The balance remaining to be paid on the financing, in minor units. For example, $1,000 USD will be represented as 100000. attr_reader :remaining_amount # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. attr_reader :repayments_begin_at diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index b4adaf39..8a6775e5 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -47,8 +47,8 @@ module Stripe "invoice" end - nested_resource_class_methods :line, operations: %i[list] nested_resource_class_methods :payment, operations: %i[retrieve list] + nested_resource_class_methods :line, operations: %i[list] class AmountsDue < Stripe::StripeObject # Incremental amount due for this payment in cents (or local equivalent). diff --git a/lib/stripe/resources/privacy/redaction_job.rb b/lib/stripe/resources/privacy/redaction_job.rb index 9099a1df..1f40dc6a 100644 --- a/lib/stripe/resources/privacy/redaction_job.rb +++ b/lib/stripe/resources/privacy/redaction_job.rb @@ -8,6 +8,7 @@ module Stripe class RedactionJob < APIResource extend Stripe::APIOperations::Create extend Stripe::APIOperations::List + extend Stripe::APIOperations::NestedResource include Stripe::APIOperations::Save OBJECT_NAME = "privacy.redaction_job" @@ -15,6 +16,8 @@ module Stripe "privacy.redaction_job" end + nested_resource_class_methods :validation_error, operations: %i[retrieve list] + class ListParams < Stripe::RequestParams # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. attr_accessor :ending_before diff --git a/lib/stripe/resources/privacy/redaction_job_validation_error.rb b/lib/stripe/resources/privacy/redaction_job_validation_error.rb index 4220a011..17761ee1 100644 --- a/lib/stripe/resources/privacy/redaction_job_validation_error.rb +++ b/lib/stripe/resources/privacy/redaction_job_validation_error.rb @@ -5,30 +5,11 @@ module Stripe module Privacy # Validation errors class RedactionJobValidationError < APIResource - extend Stripe::APIOperations::List - OBJECT_NAME = "privacy.redaction_job_validation_error" def self.object_name "privacy.redaction_job_validation_error" end - class ListParams < Stripe::RequestParams - # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. - attr_accessor :ending_before - # Specifies which fields in the response should be expanded. - attr_accessor :expand - # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - attr_accessor :limit - # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. - attr_accessor :starting_after - - def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) - @ending_before = ending_before - @expand = expand - @limit = limit - @starting_after = starting_after - end - end # Attribute for field code attr_reader :code # Attribute for field erroring_object @@ -39,16 +20,6 @@ module Stripe attr_reader :message # String representing the object's type. Objects of the same type share the same value. attr_reader :object - - # List validation errors method - def self.list(job, params = {}, opts = {}) - request_stripe_object( - method: :get, - path: format("/v1/privacy/redaction_jobs/%s/validation_errors", { job: CGI.escape(job) }), - params: params, - opts: opts - ) - end end end end diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index ca8ae3c0..bd8f420a 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -405,6 +405,8 @@ module Stripe attr_reader :object # ID of the PaymentIntent that's refunded. attr_reader :payment_intent + # Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. + attr_reader :pending_reason # Attribute for field presentment_details attr_reader :presentment_details # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index 3eaee2fb..53ec3dc3 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -11833,7 +11833,11 @@ module Stripe end # typed: true module Stripe - # Options for customizing account balances within Stripe. + # Options for customizing account balances and payout settings for a Stripe platform's connected accounts. + # + # This API is only available for users enrolled in the public preview for Accounts v2 on Stripe Connect. + # If you are not in this preview, please use the [Accounts v1 API](https://docs.stripe.com/api/accounts?api-version=2025-03-31.basil) + # to manage your connected accounts' balance settings instead. class BalanceSettings < SingletonAPIResource class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject @@ -14496,13 +14500,13 @@ module Stripe # Stripe Capital to a Connect subaccount. class FinancingOffer < APIResource class AcceptedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :advance_amount # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :fee_amount # Populated when the `product_type` of the `financingoffer` is `refill`. @@ -14514,7 +14518,7 @@ module Stripe attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :advance_amount # Describes the type of user the offer is being extended to. @@ -14523,7 +14527,7 @@ module Stripe # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :fee_amount # Populated when the `product_type` of the `financingoffer` is `refill`. @@ -14685,14 +14689,14 @@ module Stripe # Given in seconds since unix epoch. sig { returns(Float) } attr_reader :due_at - # The amount that has already been paid in the current repayment interval. + # The amount that has already been paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000. sig { returns(T.nilable(Integer)) } attr_reader :paid_amount - # The amount that is yet to be paid in the current repayment interval. + # The amount that is yet to be paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :remaining_amount end - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :advance_amount # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. @@ -14704,13 +14708,13 @@ module Stripe # The chronologically current repayment interval for the financing offer. sig { returns(T.nilable(CurrentRepaymentInterval)) } attr_reader :current_repayment_interval - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :fee_amount - # The amount the Connected account has paid toward the financing debt so far. + # The amount the Connected account has paid toward the financing debt so far, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :paid_amount - # The balance remaining to be paid on the financing, in minor units. + # The balance remaining to be paid on the financing, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :remaining_amount # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. @@ -76078,29 +76082,6 @@ module Stripe # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } attr_reader :object - class ListParams < Stripe::RequestParams - # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. - sig { returns(T.nilable(String)) } - attr_accessor :ending_before - # Specifies which fields in the response should be expanded. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :expand - # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. - sig { returns(T.nilable(String)) } - attr_accessor :starting_after - sig { - params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void - } - def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end - end - # List validation errors method - sig { - params(job: String, params: T.any(::Stripe::Privacy::RedactionJobValidationError::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) - } - def self.list(job, params = {}, opts = {}); end end end end @@ -82631,6 +82612,9 @@ module Stripe # ID of the PaymentIntent that's refunded. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent + # Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. + sig { returns(String) } + attr_reader :pending_reason # Attribute for field presentment_details sig { returns(PresentmentDetails) } attr_reader :presentment_details diff --git a/rbi/stripe/resources/balance_settings.rbi b/rbi/stripe/resources/balance_settings.rbi index 585f2fbb..fb2e11e7 100644 --- a/rbi/stripe/resources/balance_settings.rbi +++ b/rbi/stripe/resources/balance_settings.rbi @@ -3,7 +3,11 @@ # typed: true module Stripe - # Options for customizing account balances within Stripe. + # Options for customizing account balances and payout settings for a Stripe platform's connected accounts. + # + # This API is only available for users enrolled in the public preview for Accounts v2 on Stripe Connect. + # If you are not in this preview, please use the [Accounts v1 API](https://docs.stripe.com/api/accounts?api-version=2025-03-31.basil) + # to manage your connected accounts' balance settings instead. class BalanceSettings < SingletonAPIResource class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject diff --git a/rbi/stripe/resources/capital/financing_offer.rbi b/rbi/stripe/resources/capital/financing_offer.rbi index 715478c0..9dde0c39 100644 --- a/rbi/stripe/resources/capital/financing_offer.rbi +++ b/rbi/stripe/resources/capital/financing_offer.rbi @@ -8,13 +8,13 @@ module Stripe # Stripe Capital to a Connect subaccount. class FinancingOffer < APIResource class AcceptedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :advance_amount # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :fee_amount # Populated when the `product_type` of the `financingoffer` is `refill`. @@ -26,7 +26,7 @@ module Stripe attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :advance_amount # Describes the type of user the offer is being extended to. @@ -35,7 +35,7 @@ module Stripe # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :fee_amount # Populated when the `product_type` of the `financingoffer` is `refill`. diff --git a/rbi/stripe/resources/capital/financing_summary.rbi b/rbi/stripe/resources/capital/financing_summary.rbi index 1ea02435..32f948c9 100644 --- a/rbi/stripe/resources/capital/financing_summary.rbi +++ b/rbi/stripe/resources/capital/financing_summary.rbi @@ -13,14 +13,14 @@ module Stripe # Given in seconds since unix epoch. sig { returns(Float) } attr_reader :due_at - # The amount that has already been paid in the current repayment interval. + # The amount that has already been paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000. sig { returns(T.nilable(Integer)) } attr_reader :paid_amount - # The amount that is yet to be paid in the current repayment interval. + # The amount that is yet to be paid in the current repayment interval, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :remaining_amount end - # Amount of financing offered, in minor units. + # Amount of financing offered, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :advance_amount # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. @@ -32,13 +32,13 @@ module Stripe # The chronologically current repayment interval for the financing offer. sig { returns(T.nilable(CurrentRepaymentInterval)) } attr_reader :current_repayment_interval - # Fixed fee amount, in minor units. + # Fixed fee amount, in minor units. For example, $100 USD will be represented as 10000. sig { returns(Integer) } attr_reader :fee_amount - # The amount the Connected account has paid toward the financing debt so far. + # The amount the Connected account has paid toward the financing debt so far, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :paid_amount - # The balance remaining to be paid on the financing, in minor units. + # The balance remaining to be paid on the financing, in minor units. For example, $1,000 USD will be represented as 100000. sig { returns(Integer) } attr_reader :remaining_amount # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. diff --git a/rbi/stripe/resources/privacy/redaction_job_validation_error.rbi b/rbi/stripe/resources/privacy/redaction_job_validation_error.rbi index f63a1e88..c6ee0414 100644 --- a/rbi/stripe/resources/privacy/redaction_job_validation_error.rbi +++ b/rbi/stripe/resources/privacy/redaction_job_validation_error.rbi @@ -21,29 +21,6 @@ module Stripe # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } attr_reader :object - class ListParams < Stripe::RequestParams - # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. - sig { returns(T.nilable(String)) } - attr_accessor :ending_before - # Specifies which fields in the response should be expanded. - sig { returns(T.nilable(T::Array[String])) } - attr_accessor :expand - # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - sig { returns(T.nilable(Integer)) } - attr_accessor :limit - # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. - sig { returns(T.nilable(String)) } - attr_accessor :starting_after - sig { - params(ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void - } - def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end - end - # List validation errors method - sig { - params(job: String, params: T.any(::Stripe::Privacy::RedactionJobValidationError::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) - } - def self.list(job, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi index 5ad44a7c..42611a05 100644 --- a/rbi/stripe/resources/refund.rbi +++ b/rbi/stripe/resources/refund.rbi @@ -326,6 +326,9 @@ module Stripe # ID of the PaymentIntent that's refunded. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent + # Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. + sig { returns(String) } + attr_reader :pending_reason # Attribute for field presentment_details sig { returns(PresentmentDetails) } attr_reader :presentment_details