diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index fc0689d97..f95a55981 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -5abe0e44caedb3474ee672265284096ec89e0fa3 +4ec19847e2d6cb16e17bd2ad2aee2bf48d86013c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 80c9d3255..5e8e56a7f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2150 +v2151 \ No newline at end of file diff --git a/lib/stripe/event_types.rb b/lib/stripe/event_types.rb index b959c7e3d..ff50b5d52 100644 --- a/lib/stripe/event_types.rb +++ b/lib/stripe/event_types.rb @@ -92,6 +92,8 @@ def self.v2_event_types_to_classes Events::V2CoreAccountIncludingConfigurationStorerUpdatedEvent, Events::V2CoreAccountIncludingDefaultsUpdatedEvent.lookup_type => Events::V2CoreAccountIncludingDefaultsUpdatedEvent, + Events::V2CoreAccountIncludingFutureRequirementsUpdatedEvent.lookup_type => + Events::V2CoreAccountIncludingFutureRequirementsUpdatedEvent, Events::V2CoreAccountIncludingIdentityUpdatedEvent.lookup_type => Events::V2CoreAccountIncludingIdentityUpdatedEvent, Events::V2CoreAccountIncludingRequirementsUpdatedEvent.lookup_type => @@ -389,6 +391,8 @@ def self.event_notification_types_to_classes Events::V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification, Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification.lookup_type => Events::V2CoreAccountIncludingDefaultsUpdatedEventNotification, + Events::V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.lookup_type => + Events::V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification, Events::V2CoreAccountIncludingIdentityUpdatedEventNotification.lookup_type => Events::V2CoreAccountIncludingIdentityUpdatedEventNotification, Events::V2CoreAccountIncludingRequirementsUpdatedEventNotification.lookup_type => diff --git a/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb b/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb new file mode 100644 index 000000000..7001528f2 --- /dev/null +++ b/lib/stripe/events/v2_core_account_including_future_requirements_updated_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when an Account's future requirements are updated. + class V2CoreAccountIncludingFutureRequirementsUpdatedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.account[future_requirements].updated" + end + + # Retrieves the related object from the API. Makes an API request on every call. + def fetch_related_object + _request( + method: :get, + path: related_object.url, + base_address: :api, + opts: { stripe_context: context } + ) + end + attr_reader :related_object + end + + # Occurs when an Account's future requirements are updated. + class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.account[future_requirements].updated" + end + + attr_reader :related_object + + # Retrieves the Account related to this EventNotification from the Stripe API. Makes an API request on every call. + def fetch_related_object + resp = @client.raw_request( + :get, + related_object.url, + opts: { stripe_context: context }, + usage: ["fetch_related_object"] + ) + @client.deserialize(resp.http_body, api_mode: Util.get_api_mode(related_object.url)) + end + end + end +end diff --git a/lib/stripe/params/product_catalog/trial_offer_create_params.rb b/lib/stripe/params/product_catalog/trial_offer_create_params.rb index 42c7450aa..29add94d4 100644 --- a/lib/stripe/params/product_catalog/trial_offer_create_params.rb +++ b/lib/stripe/params/product_catalog/trial_offer_create_params.rb @@ -48,12 +48,15 @@ def initialize(transition: nil) attr_accessor :expand # Price configuration during the trial period (amount, billing scheme, etc). attr_accessor :price + # A brief, user-friendly name for the trial offer-for identification purposes. + attr_accessor :name - def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil) + def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil, name: nil) @duration = duration @end_behavior = end_behavior @expand = expand @price = price + @name = name end end end diff --git a/lib/stripe/params/radar/account_evaluation_update_params.rb b/lib/stripe/params/radar/account_evaluation_update_params.rb index d989c0caf..da2496df9 100644 --- a/lib/stripe/params/radar/account_evaluation_update_params.rb +++ b/lib/stripe/params/radar/account_evaluation_update_params.rb @@ -4,14 +4,37 @@ module Stripe module Radar class AccountEvaluationUpdateParams < ::Stripe::RequestParams + class LoginFailed < ::Stripe::RequestParams + # The reason why this login failed. + attr_accessor :reason + + def initialize(reason: nil) + @reason = reason + end + end + + class RegistrationFailed < ::Stripe::RequestParams + # The reason why this registration failed. + attr_accessor :reason + + def initialize(reason: nil) + @reason = reason + end + end # Specifies which fields in the response should be expanded. attr_accessor :expand # The type of event to report. attr_accessor :type + # Event payload for login_failed. + attr_accessor :login_failed + # Event payload for registration_failed. + attr_accessor :registration_failed - def initialize(expand: nil, type: nil) + def initialize(expand: nil, type: nil, login_failed: nil, registration_failed: nil) @expand = expand @type = type + @login_failed = login_failed + @registration_failed = registration_failed end end end diff --git a/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb b/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb index d47210fcb..53b88ccea 100644 --- a/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb +++ b/lib/stripe/params/v2/money_management/outbound_payment_create_params.rb @@ -18,14 +18,31 @@ def initialize(value: nil, currency: nil) end class DeliveryOptions < ::Stripe::RequestParams - # Open Enum. Method for bank account. - attr_accessor :bank_account + class PaperCheck < ::Stripe::RequestParams + # Memo printed on the memo field of the check. + attr_accessor :memo + # Open Enum. Shipping speed of the paper check. Defaults to standard. + attr_accessor :shipping_speed + # Signature for the paper check. + attr_accessor :signature + + def initialize(memo: nil, shipping_speed: nil, signature: nil) + @memo = memo + @shipping_speed = shipping_speed + @signature = signature + end + end # Open Enum. Speed of the payout. attr_accessor :speed + # Open Enum. Method for bank account. + attr_accessor :bank_account + # Delivery options for paper check. + attr_accessor :paper_check - def initialize(bank_account: nil, speed: nil) - @bank_account = bank_account + def initialize(speed: nil, bank_account: nil, paper_check: nil) @speed = speed + @bank_account = bank_account + @paper_check = paper_check end end diff --git a/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb b/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb index 1b67cd717..d62eeb8c6 100644 --- a/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb +++ b/lib/stripe/params/v2/money_management/outbound_payment_quote_create_params.rb @@ -18,14 +18,14 @@ def initialize(value: nil, currency: nil) end class DeliveryOptions < ::Stripe::RequestParams - # Open Enum. Method for bank account. - attr_accessor :bank_account # Open Enum. Speed of the payout. attr_accessor :speed + # Open Enum. Method for bank account. + attr_accessor :bank_account - def initialize(bank_account: nil, speed: nil) - @bank_account = bank_account + def initialize(speed: nil, bank_account: nil) @speed = speed + @bank_account = bank_account end end diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index 92cdf04a5..c782879bf 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -291,6 +291,7 @@ require "stripe/events/v2_core_account_including_configuration_storer_capability_status_updated_event" require "stripe/events/v2_core_account_including_configuration_storer_updated_event" require "stripe/events/v2_core_account_including_defaults_updated_event" +require "stripe/events/v2_core_account_including_future_requirements_updated_event" require "stripe/events/v2_core_account_including_identity_updated_event" require "stripe/events/v2_core_account_including_requirements_updated_event" require "stripe/events/v2_core_account_link_returned_event" diff --git a/lib/stripe/resources/delegated_checkout/requested_session.rb b/lib/stripe/resources/delegated_checkout/requested_session.rb index 5b6089266..55f3e9711 100644 --- a/lib/stripe/resources/delegated_checkout/requested_session.rb +++ b/lib/stripe/resources/delegated_checkout/requested_session.rb @@ -194,14 +194,8 @@ def self.field_remappings attr_reader :amount_discount # The total before any discounts or taxes are applied. attr_reader :amount_subtotal - # The description of the line item. - attr_reader :description - # The images of the line item. - attr_reader :images # The key of the line item. attr_reader :key - # The name of the line item. - attr_reader :name # Attribute for field product_details attr_reader :product_details # The quantity of the line item. @@ -355,6 +349,39 @@ def self.field_remappings @field_remappings = {} end end + + class RiskDetails < ::Stripe::StripeObject + class ClientDeviceMetadataDetails < ::Stripe::StripeObject + # The radar session for the client device. + attr_reader :radar_session + # The referrer of the client device. + attr_reader :referrer + # The remote IP address of the client device. + attr_reader :remote_ip + # The time spent on the page by the client device. + attr_reader :time_on_page_ms + # The user agent of the client device. + attr_reader :user_agent + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The risk metadata for the client device. + attr_reader :client_device_metadata_details + + def self.inner_class_types + @inner_class_types = { client_device_metadata_details: ClientDeviceMetadataDetails } + end + + def self.field_remappings + @field_remappings = {} + end + end # The subtotal amount of the requested session. attr_reader :amount_subtotal # The total amount of the requested session. @@ -399,6 +426,8 @@ def self.field_remappings attr_reader :total_details # Time at which the object was last updated. Measured in seconds since the Unix epoch. attr_reader :updated_at + # The risk details of the requested session. + attr_reader :risk_details # Confirms a requested session def confirm(params = {}, opts = {}) @@ -468,6 +497,7 @@ def self.inner_class_types payment_method_preview: PaymentMethodPreview, seller_details: SellerDetails, total_details: TotalDetails, + risk_details: RiskDetails, } end diff --git a/lib/stripe/resources/product_catalog/trial_offer.rb b/lib/stripe/resources/product_catalog/trial_offer.rb index d441257f2..1b88a57ed 100644 --- a/lib/stripe/resources/product_catalog/trial_offer.rb +++ b/lib/stripe/resources/product_catalog/trial_offer.rb @@ -78,6 +78,8 @@ def self.field_remappings attr_reader :object # The price during the trial offer. attr_reader :price + # A brief, user-friendly name for the trial offer-for identification purposes. + attr_reader :name # Creates a trial offer. def self.create(params = {}, opts = {}) diff --git a/lib/stripe/resources/radar/account_evaluation.rb b/lib/stripe/resources/radar/account_evaluation.rb index 843130209..d6f056e94 100644 --- a/lib/stripe/resources/radar/account_evaluation.rb +++ b/lib/stripe/resources/radar/account_evaluation.rb @@ -14,13 +14,42 @@ def self.object_name end class Event < ::Stripe::StripeObject + class LoginFailed < ::Stripe::StripeObject + # The reason why this login failed. + attr_reader :reason + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + + class RegistrationFailed < ::Stripe::StripeObject + # The reason why this registration failed. + attr_reader :reason + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end # Time at which the event occurred. Measured in seconds since the Unix epoch. attr_reader :occurred_at # The type of event that occurred. attr_reader :type + # Data about a failed login event. + attr_reader :login_failed + # Data about a failed registration event. + attr_reader :registration_failed def self.inner_class_types - @inner_class_types = {} + @inner_class_types = { login_failed: LoginFailed, registration_failed: RegistrationFailed } end def self.field_remappings diff --git a/lib/stripe/resources/v2/money_management/outbound_payment.rb b/lib/stripe/resources/v2/money_management/outbound_payment.rb index dc8eb627a..2d5705908 100644 --- a/lib/stripe/resources/v2/money_management/outbound_payment.rb +++ b/lib/stripe/resources/v2/money_management/outbound_payment.rb @@ -27,13 +27,31 @@ def self.field_remappings end class DeliveryOptions < ::Stripe::StripeObject - # Open Enum. Method for bank account. - attr_reader :bank_account + class PaperCheck < ::Stripe::StripeObject + # Memo printed on the memo field of the check. + attr_reader :memo + # Open Enum. Shipping speed of the paper check. + attr_reader :shipping_speed + # Signature for the paper check. + attr_reader :signature + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end # Open Enum. Speed of the payout. attr_reader :speed + # Open Enum. Method for bank account. + attr_reader :bank_account + # Delivery options for paper check. + attr_reader :paper_check def self.inner_class_types - @inner_class_types = {} + @inner_class_types = { paper_check: PaperCheck } end def self.field_remappings @@ -195,6 +213,67 @@ def self.field_remappings @field_remappings = {} end end + + class TrackingDetails < ::Stripe::StripeObject + class PaperCheck < ::Stripe::StripeObject + class MailingAddress < ::Stripe::StripeObject + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + # Town or district. + attr_reader :town + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Open Enum. Carrier of the paper check. + attr_reader :carrier + # Check number. + attr_reader :check_number + # Postal code of the latest tracking update. + attr_reader :current_postal_code + # Mailing address of the paper check. + attr_reader :mailing_address + # Tracking number for the check. + attr_reader :tracking_number + # Open Enum. Tracking status of the paper check. + attr_reader :tracking_status + # When the tracking details were last updated. + attr_reader :updated_at + + def self.inner_class_types + @inner_class_types = { mailing_address: MailingAddress } + end + + def self.field_remappings + @field_remappings = {} + end + end + # Paper check tracking details. + attr_reader :paper_check + + def self.inner_class_types + @inner_class_types = { paper_check: PaperCheck } + end + + def self.field_remappings + @field_remappings = {} + end + end # The "presentment amount" for the OutboundPayment. attr_reader :amount # Returns true if the OutboundPayment can be canceled, and false otherwise. @@ -240,6 +319,8 @@ def self.field_remappings attr_reader :to # A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar. attr_reader :trace_id + # Information to track this OutboundPayment with the recipient bank. + attr_reader :tracking_details # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. attr_reader :livemode @@ -253,6 +334,7 @@ def self.inner_class_types status_transitions: StatusTransitions, to: To, trace_id: TraceId, + tracking_details: TrackingDetails, } end diff --git a/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb b/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb index 481fe4826..6955a2e5c 100644 --- a/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +++ b/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb @@ -27,10 +27,10 @@ def self.field_remappings end class DeliveryOptions < ::Stripe::StripeObject - # Open Enum. Method for bank account. - attr_reader :bank_account # Open Enum. Speed of the payout. attr_reader :speed + # Open Enum. Method for bank account. + attr_reader :bank_account def self.inner_class_types @inner_class_types = {} diff --git a/lib/stripe/services/v2/core/account_link_service.rb b/lib/stripe/services/v2/core/account_link_service.rb index 1e1a14c37..3637a2025 100644 --- a/lib/stripe/services/v2/core/account_link_service.rb +++ b/lib/stripe/services/v2/core/account_link_service.rb @@ -6,6 +6,8 @@ module V2 module Core class AccountLinkService < StripeService # Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information. + # + # ** raises RateLimitError def create(params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/v2/core/account_service.rb b/lib/stripe/services/v2/core/account_service.rb index 8a4b96527..f4a8e8b69 100644 --- a/lib/stripe/services/v2/core/account_service.rb +++ b/lib/stripe/services/v2/core/account_service.rb @@ -14,6 +14,8 @@ def initialize(requestor) end # Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history. + # + # ** raises RateLimitError def close(id, params = {}, opts = {}) request( method: :post, @@ -25,6 +27,8 @@ def close(id, params = {}, opts = {}) end # An Account is a representation of a company, individual or other entity that a user interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient. + # + # ** raises RateLimitError def create(params = {}, opts = {}) request( method: :post, @@ -36,6 +40,8 @@ def create(params = {}, opts = {}) end # Returns a list of Accounts. + # + # ** raises RateLimitError def list(params = {}, opts = {}) request( method: :get, @@ -47,6 +53,8 @@ def list(params = {}, opts = {}) end # Retrieves the details of an Account. + # + # ** raises RateLimitError def retrieve(id, params = {}, opts = {}) request( method: :get, @@ -58,6 +66,8 @@ def retrieve(id, params = {}, opts = {}) end # Updates the details of an Account. + # + # ** raises RateLimitError def update(id, params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/v2/core/account_token_service.rb b/lib/stripe/services/v2/core/account_token_service.rb index c31471f7c..ddb047147 100644 --- a/lib/stripe/services/v2/core/account_token_service.rb +++ b/lib/stripe/services/v2/core/account_token_service.rb @@ -6,6 +6,8 @@ module V2 module Core class AccountTokenService < StripeService # Creates an Account Token. + # + # ** raises RateLimitError def create(params = {}, opts = {}) request( method: :post, @@ -17,6 +19,8 @@ def create(params = {}, opts = {}) end # Retrieves an Account Token. + # + # ** raises RateLimitError def retrieve(id, params = {}, opts = {}) request( method: :get, diff --git a/lib/stripe/services/v2/core/accounts/person_service.rb b/lib/stripe/services/v2/core/accounts/person_service.rb index 51e8c6794..4001c7d10 100644 --- a/lib/stripe/services/v2/core/accounts/person_service.rb +++ b/lib/stripe/services/v2/core/accounts/person_service.rb @@ -7,6 +7,8 @@ module Core module Accounts class PersonService < StripeService # Create a Person. Adds an individual to an Account's identity. You can set relationship attributes and identity information at creation. + # + # ** raises RateLimitError def create(account_id, params = {}, opts = {}) request( method: :post, @@ -18,6 +20,8 @@ def create(account_id, params = {}, opts = {}) end # Delete a Person associated with an Account. + # + # ** raises RateLimitError def delete(account_id, id, params = {}, opts = {}) request( method: :delete, @@ -29,6 +33,8 @@ def delete(account_id, id, params = {}, opts = {}) end # Returns a paginated list of Persons associated with an Account. + # + # ** raises RateLimitError def list(account_id, params = {}, opts = {}) request( method: :get, @@ -40,6 +46,8 @@ def list(account_id, params = {}, opts = {}) end # Retrieves a Person associated with an Account. + # + # ** raises RateLimitError def retrieve(account_id, id, params = {}, opts = {}) request( method: :get, @@ -51,6 +59,8 @@ def retrieve(account_id, id, params = {}, opts = {}) end # Updates a Person associated with an Account. + # + # ** raises RateLimitError def update(account_id, id, params = {}, opts = {}) request( method: :post, diff --git a/lib/stripe/services/v2/core/accounts/person_token_service.rb b/lib/stripe/services/v2/core/accounts/person_token_service.rb index 89ab7ba49..943997407 100644 --- a/lib/stripe/services/v2/core/accounts/person_token_service.rb +++ b/lib/stripe/services/v2/core/accounts/person_token_service.rb @@ -7,6 +7,8 @@ module Core module Accounts class PersonTokenService < StripeService # Creates a Person Token associated with an Account. + # + # ** raises RateLimitError def create(account_id, params = {}, opts = {}) request( method: :post, @@ -18,6 +20,8 @@ def create(account_id, params = {}, opts = {}) end # Retrieves a Person Token associated with an Account. + # + # ** raises RateLimitError def retrieve(account_id, id, params = {}, opts = {}) request( method: :get, diff --git a/lib/stripe/services/v2/iam/api_key_service.rb b/lib/stripe/services/v2/iam/api_key_service.rb index dd0bffde3..1feb1d686 100644 --- a/lib/stripe/services/v2/iam/api_key_service.rb +++ b/lib/stripe/services/v2/iam/api_key_service.rb @@ -5,7 +5,7 @@ module Stripe module V2 module Iam class ApiKeyService < StripeService - # Create an API key. + # Create an API key. To create a secret key in livemode, a public key for encryption must be provided. def create(params = {}, opts = {}) request( method: :post, @@ -16,7 +16,7 @@ def create(params = {}, opts = {}) ) end - # Expire an API key. + # Expire an API key. The specified key becomes invalid immediately. def expire(id, params = {}, opts = {}) request( method: :post, @@ -38,7 +38,7 @@ def list(params = {}, opts = {}) ) end - # Retrieve an API key. + # Retrieve an API key. For livemode secret keys, secret tokens are only returned on creation, and never returned here. def retrieve(id, params = {}, opts = {}) request( method: :get, @@ -49,7 +49,7 @@ def retrieve(id, params = {}, opts = {}) ) end - # Rotate an API key. + # Rotate an API key. A new key with the same properties is created and returned. The existing key is expired immediately, unless an expiry time is specified. def rotate(id, params = {}, opts = {}) request( method: :post, @@ -60,7 +60,7 @@ def rotate(id, params = {}, opts = {}) ) end - # Update an API key. + # Update an API key. Only parameters that are specified in the request will be updated. def update(id, params = {}, opts = {}) request( method: :post, diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index a4271aa65..0a505f199 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -18183,18 +18183,9 @@ module Stripe # The total before any discounts or taxes are applied. sig { returns(Integer) } def amount_subtotal; end - # The description of the line item. - sig { returns(T.nilable(String)) } - def description; end - # The images of the line item. - sig { returns(T.nilable(T::Array[String])) } - def images; end # The key of the line item. sig { returns(String) } def key; end - # The name of the line item. - sig { returns(String) } - def name; end # Attribute for field product_details sig { returns(T.nilable(ProductDetails)) } def product_details; end @@ -18356,6 +18347,40 @@ module Stripe @field_remappings = {} end end + class RiskDetails < ::Stripe::StripeObject + class ClientDeviceMetadataDetails < ::Stripe::StripeObject + # The radar session for the client device. + sig { returns(T.nilable(String)) } + def radar_session; end + # The referrer of the client device. + sig { returns(T.nilable(String)) } + def referrer; end + # The remote IP address of the client device. + sig { returns(T.nilable(String)) } + def remote_ip; end + # The time spent on the page by the client device. + sig { returns(T.nilable(Integer)) } + def time_on_page_ms; end + # The user agent of the client device. + sig { returns(T.nilable(String)) } + def user_agent; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The risk metadata for the client device. + sig { returns(T.nilable(ClientDeviceMetadataDetails)) } + def client_device_metadata_details; end + def self.inner_class_types + @inner_class_types = {client_device_metadata_details: ClientDeviceMetadataDetails} + end + def self.field_remappings + @field_remappings = {} + end + end # The subtotal amount of the requested session. sig { returns(T.nilable(Integer)) } def amount_subtotal; end @@ -18422,6 +18447,9 @@ module Stripe # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } def updated_at; end + # The risk details of the requested session. + sig { returns(T.nilable(RiskDetails)) } + def risk_details; end # Confirms a requested session sig { params(params: T.any(::Stripe::DelegatedCheckout::RequestedSessionConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::DelegatedCheckout::RequestedSession) @@ -42302,6 +42330,9 @@ module Stripe # The price during the trial offer. sig { returns(T.any(String, ::Stripe::Price)) } def price; end + # A brief, user-friendly name for the trial offer-for identification purposes. + sig { returns(T.nilable(String)) } + def name; end # Creates a trial offer. sig { params(params: T.any(::Stripe::ProductCatalog::TrialOfferCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::ProductCatalog::TrialOffer) @@ -46152,14 +46183,42 @@ module Stripe # Account Evaluation resource returned by the Radar Account Evaluations API. class AccountEvaluation < APIResource class Event < ::Stripe::StripeObject + class LoginFailed < ::Stripe::StripeObject + # The reason why this login failed. + sig { returns(String) } + def reason; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class RegistrationFailed < ::Stripe::StripeObject + # The reason why this registration failed. + sig { returns(String) } + def reason; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end # Time at which the event occurred. Measured in seconds since the Unix epoch. sig { returns(Integer) } def occurred_at; end # The type of event that occurred. sig { returns(String) } def type; end + # Data about a failed login event. + sig { returns(T.nilable(LoginFailed)) } + def login_failed; end + # Data about a failed registration event. + sig { returns(T.nilable(RegistrationFailed)) } + def registration_failed; end def self.inner_class_types - @inner_class_types = {} + @inner_class_types = {login_failed: LoginFailed, registration_failed: RegistrationFailed} end def self.field_remappings @field_remappings = {} @@ -70788,12 +70847,12 @@ module Stripe end end class DeliveryOptions < ::Stripe::StripeObject - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end def self.inner_class_types @inner_class_types = {} end @@ -70978,14 +71037,34 @@ module Stripe end end class DeliveryOptions < ::Stripe::StripeObject - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end + class PaperCheck < ::Stripe::StripeObject + # Memo printed on the memo field of the check. + sig { returns(T.nilable(String)) } + def memo; end + # Open Enum. Shipping speed of the paper check. + sig { returns(String) } + def shipping_speed; end + # Signature for the paper check. + sig { returns(String) } + def signature; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end + # Delivery options for paper check. + sig { returns(T.nilable(PaperCheck)) } + def paper_check; end def self.inner_class_types - @inner_class_types = {} + @inner_class_types = {paper_check: PaperCheck} end def self.field_remappings @field_remappings = {} @@ -71139,6 +71218,75 @@ module Stripe @field_remappings = {} end end + class TrackingDetails < ::Stripe::StripeObject + class PaperCheck < ::Stripe::StripeObject + class MailingAddress < ::Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + def city; end + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + def country; end + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + def line1; end + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + def line2; end + # ZIP or postal code. + sig { returns(T.nilable(String)) } + def postal_code; end + # State, county, province, or region. + sig { returns(T.nilable(String)) } + def state; end + # Town or district. + sig { returns(T.nilable(String)) } + def town; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Open Enum. Carrier of the paper check. + sig { returns(String) } + def carrier; end + # Check number. + sig { returns(String) } + def check_number; end + # Postal code of the latest tracking update. + sig { returns(String) } + def current_postal_code; end + # Mailing address of the paper check. + sig { returns(MailingAddress) } + def mailing_address; end + # Tracking number for the check. + sig { returns(String) } + def tracking_number; end + # Open Enum. Tracking status of the paper check. + sig { returns(String) } + def tracking_status; end + # When the tracking details were last updated. + sig { returns(String) } + def updated_at; end + def self.inner_class_types + @inner_class_types = {mailing_address: MailingAddress} + end + def self.field_remappings + @field_remappings = {} + end + end + # Paper check tracking details. + sig { returns(T.nilable(PaperCheck)) } + def paper_check; end + def self.inner_class_types + @inner_class_types = {paper_check: PaperCheck} + end + def self.field_remappings + @field_remappings = {} + end + end # The "presentment amount" for the OutboundPayment. sig { returns(Amount) } def amount; end @@ -71204,6 +71352,9 @@ module Stripe # A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar. sig { returns(TraceId) } def trace_id; end + # Information to track this OutboundPayment with the recipient bank. + sig { returns(T.nilable(TrackingDetails)) } + def tracking_details; end # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } def livemode; end @@ -79642,30 +79793,40 @@ module Stripe attr_reader :persons attr_reader :person_tokens # Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountCloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } def close(id, params = {}, opts = {}); end # An Account is a representation of a company, individual or other entity that a user interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } def create(params = {}, opts = {}); end # Returns a list of Accounts. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } def list(params = {}, opts = {}); end # Retrieves the details of an Account. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } def retrieve(id, params = {}, opts = {}); end # Updates the details of an Account. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountUpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } @@ -79681,30 +79842,40 @@ module Stripe module Accounts class PersonService < StripeService # Create a Person. Adds an individual to an Account's identity. You can set relationship attributes and identity information at creation. + # + # ** raises RateLimitError sig { params(account_id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPerson) } def create(account_id, params = {}, opts = {}); end # Delete a Person associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonDeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::DeletedObject) } def delete(account_id, id, params = {}, opts = {}); end # Returns a paginated list of Persons associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } def list(account_id, params = {}, opts = {}); end # Retrieves a Person associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPerson) } def retrieve(account_id, id, params = {}, opts = {}); end # Updates a Person associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonUpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPerson) } @@ -79721,12 +79892,16 @@ module Stripe module Accounts class PersonTokenService < StripeService # Creates a Person Token associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonTokenCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPersonToken) } def create(account_id, params = {}, opts = {}); end # Retrieves a Person Token associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonTokenRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPersonToken) } @@ -79742,6 +79917,8 @@ module Stripe module Core class AccountLinkService < StripeService # Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountLinkCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountLink) } @@ -79756,12 +79933,16 @@ module Stripe module Core class AccountTokenService < StripeService # Creates an Account Token. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountTokenCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountToken) } def create(params = {}, opts = {}); end # Retrieves an Account Token. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountTokenRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountToken) } @@ -80010,13 +80191,13 @@ module Stripe module V2 module Iam class ApiKeyService < StripeService - # Create an API key. + # Create an API key. To create a secret key in livemode, a public key for encryption must be provided. sig { params(params: T.any(::Stripe::V2::Iam::ApiKeyCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } def create(params = {}, opts = {}); end - # Expire an API key. + # Expire an API key. The specified key becomes invalid immediately. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } @@ -80028,19 +80209,19 @@ module Stripe } def list(params = {}, opts = {}); end - # Retrieve an API key. + # Retrieve an API key. For livemode secret keys, secret tokens are only returned on creation, and never returned here. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } def retrieve(id, params = {}, opts = {}); end - # Rotate an API key. + # Rotate an API key. A new key with the same properties is created and returned. The existing key is expired immediately, unless an expiry time is specified. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyRotateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } def rotate(id, params = {}, opts = {}); end - # Update an API key. + # Update an API key. Only parameters that are specified in the request will be updated. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyUpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } @@ -170898,10 +171079,15 @@ module Stripe def price; end sig { params(_price: String).returns(String) } def price=(_price); end + # A brief, user-friendly name for the trial offer-for identification purposes. + sig { returns(T.nilable(String)) } + def name; end + sig { params(_name: T.nilable(String)).returns(T.nilable(String)) } + def name=(_name); end sig { - params(duration: ProductCatalog::TrialOfferCreateParams::Duration, end_behavior: ProductCatalog::TrialOfferCreateParams::EndBehavior, expand: T.nilable(T::Array[String]), price: String).void + params(duration: ProductCatalog::TrialOfferCreateParams::Duration, end_behavior: ProductCatalog::TrialOfferCreateParams::EndBehavior, expand: T.nilable(T::Array[String]), price: String, name: T.nilable(String)).void } - def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil); end + def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil, name: nil); end end end end @@ -176321,6 +176507,24 @@ end module Stripe module Radar class AccountEvaluationUpdateParams < ::Stripe::RequestParams + class LoginFailed < ::Stripe::RequestParams + # The reason why this login failed. + sig { returns(String) } + def reason; end + sig { params(_reason: String).returns(String) } + def reason=(_reason); end + sig { params(reason: String).void } + def initialize(reason: nil); end + end + class RegistrationFailed < ::Stripe::RequestParams + # The reason why this registration failed. + sig { returns(String) } + def reason; end + sig { params(_reason: String).returns(String) } + def reason=(_reason); end + sig { params(reason: String).void } + def initialize(reason: nil); end + end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } def expand; end @@ -176331,8 +176535,24 @@ module Stripe def type; end sig { params(_type: String).returns(String) } def type=(_type); end - sig { params(expand: T.nilable(T::Array[String]), type: String).void } - def initialize(expand: nil, type: nil); end + # Event payload for login_failed. + sig { returns(T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed)) } + def login_failed; end + sig { + params(_login_failed: T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed)).returns(T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed)) + } + def login_failed=(_login_failed); end + # Event payload for registration_failed. + sig { returns(T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)) } + def registration_failed; end + sig { + params(_registration_failed: T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)).returns(T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)) + } + def registration_failed=(_registration_failed); end + sig { + params(expand: T.nilable(T::Array[String]), type: String, login_failed: T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed), registration_failed: T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)).void + } + def initialize(expand: nil, type: nil, login_failed: nil, registration_failed: nil); end end end end @@ -237162,18 +237382,50 @@ module Stripe def initialize(value: nil, currency: nil); end end class DeliveryOptions < ::Stripe::RequestParams - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end - sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } - def bank_account=(_bank_account); end + class PaperCheck < ::Stripe::RequestParams + # Memo printed on the memo field of the check. + sig { returns(T.nilable(String)) } + def memo; end + sig { params(_memo: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_memo); end + # Open Enum. Shipping speed of the paper check. Defaults to standard. + sig { returns(T.nilable(String)) } + def shipping_speed; end + sig { params(_shipping_speed: T.nilable(String)).returns(T.nilable(String)) } + def shipping_speed=(_shipping_speed); end + # Signature for the paper check. + sig { returns(String) } + def signature; end + sig { params(_signature: String).returns(String) } + def signature=(_signature); end + sig { + params(memo: T.nilable(String), shipping_speed: T.nilable(String), signature: String).void + } + def initialize(memo: nil, shipping_speed: nil, signature: nil); end + end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end sig { params(_speed: T.nilable(String)).returns(T.nilable(String)) } def speed=(_speed); end - sig { params(bank_account: T.nilable(String), speed: T.nilable(String)).void } - def initialize(bank_account: nil, speed: nil); end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end + sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } + def bank_account=(_bank_account); end + # Delivery options for paper check. + sig { + returns(T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)) + } + def paper_check; end + sig { + params(_paper_check: T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)).returns(T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)) + } + def paper_check=(_paper_check); end + sig { + params(speed: T.nilable(String), bank_account: T.nilable(String), paper_check: T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)).void + } + def initialize(speed: nil, bank_account: nil, paper_check: nil); end end class From < ::Stripe::RequestParams # Describes the FinancialAmount's currency drawn from. @@ -237341,18 +237593,18 @@ module Stripe def initialize(value: nil, currency: nil); end end class DeliveryOptions < ::Stripe::RequestParams - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end - sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } - def bank_account=(_bank_account); end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end sig { params(_speed: T.nilable(String)).returns(T.nilable(String)) } def speed=(_speed); end - sig { params(bank_account: T.nilable(String), speed: T.nilable(String)).void } - def initialize(bank_account: nil, speed: nil); end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end + sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } + def bank_account=(_bank_account); end + sig { params(speed: T.nilable(String), bank_account: T.nilable(String)).void } + def initialize(speed: nil, bank_account: nil); end end class From < ::Stripe::RequestParams # Describes the FinancialAccount's currency drawn from. diff --git a/rbi/stripe/params/product_catalog/trial_offer_create_params.rbi b/rbi/stripe/params/product_catalog/trial_offer_create_params.rbi index bbc660816..b223bac1d 100644 --- a/rbi/stripe/params/product_catalog/trial_offer_create_params.rbi +++ b/rbi/stripe/params/product_catalog/trial_offer_create_params.rbi @@ -78,10 +78,15 @@ module Stripe def price; end sig { params(_price: String).returns(String) } def price=(_price); end + # A brief, user-friendly name for the trial offer-for identification purposes. + sig { returns(T.nilable(String)) } + def name; end + sig { params(_name: T.nilable(String)).returns(T.nilable(String)) } + def name=(_name); end sig { - params(duration: ProductCatalog::TrialOfferCreateParams::Duration, end_behavior: ProductCatalog::TrialOfferCreateParams::EndBehavior, expand: T.nilable(T::Array[String]), price: String).void + params(duration: ProductCatalog::TrialOfferCreateParams::Duration, end_behavior: ProductCatalog::TrialOfferCreateParams::EndBehavior, expand: T.nilable(T::Array[String]), price: String, name: T.nilable(String)).void } - def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil); end + def initialize(duration: nil, end_behavior: nil, expand: nil, price: nil, name: nil); end end end end \ No newline at end of file diff --git a/rbi/stripe/params/radar/account_evaluation_update_params.rbi b/rbi/stripe/params/radar/account_evaluation_update_params.rbi index 60ffdf9f9..821fd9e04 100644 --- a/rbi/stripe/params/radar/account_evaluation_update_params.rbi +++ b/rbi/stripe/params/radar/account_evaluation_update_params.rbi @@ -5,6 +5,24 @@ module Stripe module Radar class AccountEvaluationUpdateParams < ::Stripe::RequestParams + class LoginFailed < ::Stripe::RequestParams + # The reason why this login failed. + sig { returns(String) } + def reason; end + sig { params(_reason: String).returns(String) } + def reason=(_reason); end + sig { params(reason: String).void } + def initialize(reason: nil); end + end + class RegistrationFailed < ::Stripe::RequestParams + # The reason why this registration failed. + sig { returns(String) } + def reason; end + sig { params(_reason: String).returns(String) } + def reason=(_reason); end + sig { params(reason: String).void } + def initialize(reason: nil); end + end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } def expand; end @@ -15,8 +33,24 @@ module Stripe def type; end sig { params(_type: String).returns(String) } def type=(_type); end - sig { params(expand: T.nilable(T::Array[String]), type: String).void } - def initialize(expand: nil, type: nil); end + # Event payload for login_failed. + sig { returns(T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed)) } + def login_failed; end + sig { + params(_login_failed: T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed)).returns(T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed)) + } + def login_failed=(_login_failed); end + # Event payload for registration_failed. + sig { returns(T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)) } + def registration_failed; end + sig { + params(_registration_failed: T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)).returns(T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)) + } + def registration_failed=(_registration_failed); end + sig { + params(expand: T.nilable(T::Array[String]), type: String, login_failed: T.nilable(Radar::AccountEvaluationUpdateParams::LoginFailed), registration_failed: T.nilable(Radar::AccountEvaluationUpdateParams::RegistrationFailed)).void + } + def initialize(expand: nil, type: nil, login_failed: nil, registration_failed: nil); end end end end \ No newline at end of file diff --git a/rbi/stripe/params/v2/money_management/outbound_payment_create_params.rbi b/rbi/stripe/params/v2/money_management/outbound_payment_create_params.rbi index 5552e70af..57ee266e7 100644 --- a/rbi/stripe/params/v2/money_management/outbound_payment_create_params.rbi +++ b/rbi/stripe/params/v2/money_management/outbound_payment_create_params.rbi @@ -21,18 +21,50 @@ module Stripe def initialize(value: nil, currency: nil); end end class DeliveryOptions < ::Stripe::RequestParams - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end - sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } - def bank_account=(_bank_account); end + class PaperCheck < ::Stripe::RequestParams + # Memo printed on the memo field of the check. + sig { returns(T.nilable(String)) } + def memo; end + sig { params(_memo: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_memo); end + # Open Enum. Shipping speed of the paper check. Defaults to standard. + sig { returns(T.nilable(String)) } + def shipping_speed; end + sig { params(_shipping_speed: T.nilable(String)).returns(T.nilable(String)) } + def shipping_speed=(_shipping_speed); end + # Signature for the paper check. + sig { returns(String) } + def signature; end + sig { params(_signature: String).returns(String) } + def signature=(_signature); end + sig { + params(memo: T.nilable(String), shipping_speed: T.nilable(String), signature: String).void + } + def initialize(memo: nil, shipping_speed: nil, signature: nil); end + end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end sig { params(_speed: T.nilable(String)).returns(T.nilable(String)) } def speed=(_speed); end - sig { params(bank_account: T.nilable(String), speed: T.nilable(String)).void } - def initialize(bank_account: nil, speed: nil); end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end + sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } + def bank_account=(_bank_account); end + # Delivery options for paper check. + sig { + returns(T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)) + } + def paper_check; end + sig { + params(_paper_check: T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)).returns(T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)) + } + def paper_check=(_paper_check); end + sig { + params(speed: T.nilable(String), bank_account: T.nilable(String), paper_check: T.nilable(V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions::PaperCheck)).void + } + def initialize(speed: nil, bank_account: nil, paper_check: nil); end end class From < ::Stripe::RequestParams # Describes the FinancialAmount's currency drawn from. diff --git a/rbi/stripe/params/v2/money_management/outbound_payment_quote_create_params.rbi b/rbi/stripe/params/v2/money_management/outbound_payment_quote_create_params.rbi index 91f275019..8ce4b59d6 100644 --- a/rbi/stripe/params/v2/money_management/outbound_payment_quote_create_params.rbi +++ b/rbi/stripe/params/v2/money_management/outbound_payment_quote_create_params.rbi @@ -21,18 +21,18 @@ module Stripe def initialize(value: nil, currency: nil); end end class DeliveryOptions < ::Stripe::RequestParams - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end - sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } - def bank_account=(_bank_account); end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end sig { params(_speed: T.nilable(String)).returns(T.nilable(String)) } def speed=(_speed); end - sig { params(bank_account: T.nilable(String), speed: T.nilable(String)).void } - def initialize(bank_account: nil, speed: nil); end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end + sig { params(_bank_account: T.nilable(String)).returns(T.nilable(String)) } + def bank_account=(_bank_account); end + sig { params(speed: T.nilable(String), bank_account: T.nilable(String)).void } + def initialize(speed: nil, bank_account: nil); end end class From < ::Stripe::RequestParams # Describes the FinancialAccount's currency drawn from. diff --git a/rbi/stripe/resources/delegated_checkout/requested_session.rbi b/rbi/stripe/resources/delegated_checkout/requested_session.rbi index 2de675b65..2c3cbab60 100644 --- a/rbi/stripe/resources/delegated_checkout/requested_session.rbi +++ b/rbi/stripe/resources/delegated_checkout/requested_session.rbi @@ -199,18 +199,9 @@ module Stripe # The total before any discounts or taxes are applied. sig { returns(Integer) } def amount_subtotal; end - # The description of the line item. - sig { returns(T.nilable(String)) } - def description; end - # The images of the line item. - sig { returns(T.nilable(T::Array[String])) } - def images; end # The key of the line item. sig { returns(String) } def key; end - # The name of the line item. - sig { returns(String) } - def name; end # Attribute for field product_details sig { returns(T.nilable(ProductDetails)) } def product_details; end @@ -372,6 +363,40 @@ module Stripe @field_remappings = {} end end + class RiskDetails < ::Stripe::StripeObject + class ClientDeviceMetadataDetails < ::Stripe::StripeObject + # The radar session for the client device. + sig { returns(T.nilable(String)) } + def radar_session; end + # The referrer of the client device. + sig { returns(T.nilable(String)) } + def referrer; end + # The remote IP address of the client device. + sig { returns(T.nilable(String)) } + def remote_ip; end + # The time spent on the page by the client device. + sig { returns(T.nilable(Integer)) } + def time_on_page_ms; end + # The user agent of the client device. + sig { returns(T.nilable(String)) } + def user_agent; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The risk metadata for the client device. + sig { returns(T.nilable(ClientDeviceMetadataDetails)) } + def client_device_metadata_details; end + def self.inner_class_types + @inner_class_types = {client_device_metadata_details: ClientDeviceMetadataDetails} + end + def self.field_remappings + @field_remappings = {} + end + end # The subtotal amount of the requested session. sig { returns(T.nilable(Integer)) } def amount_subtotal; end @@ -438,6 +463,9 @@ module Stripe # Time at which the object was last updated. Measured in seconds since the Unix epoch. sig { returns(Integer) } def updated_at; end + # The risk details of the requested session. + sig { returns(T.nilable(RiskDetails)) } + def risk_details; end # Confirms a requested session sig { params(params: T.any(::Stripe::DelegatedCheckout::RequestedSessionConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::DelegatedCheckout::RequestedSession) diff --git a/rbi/stripe/resources/product_catalog/trial_offer.rbi b/rbi/stripe/resources/product_catalog/trial_offer.rbi index 1750c4d86..97fc299fe 100644 --- a/rbi/stripe/resources/product_catalog/trial_offer.rbi +++ b/rbi/stripe/resources/product_catalog/trial_offer.rbi @@ -75,6 +75,9 @@ module Stripe # The price during the trial offer. sig { returns(T.any(String, ::Stripe::Price)) } def price; end + # A brief, user-friendly name for the trial offer-for identification purposes. + sig { returns(T.nilable(String)) } + def name; end # Creates a trial offer. sig { params(params: T.any(::Stripe::ProductCatalog::TrialOfferCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::ProductCatalog::TrialOffer) diff --git a/rbi/stripe/resources/radar/account_evaluation.rbi b/rbi/stripe/resources/radar/account_evaluation.rbi index 38e9a1b44..18ac567bf 100644 --- a/rbi/stripe/resources/radar/account_evaluation.rbi +++ b/rbi/stripe/resources/radar/account_evaluation.rbi @@ -7,14 +7,42 @@ module Stripe # Account Evaluation resource returned by the Radar Account Evaluations API. class AccountEvaluation < APIResource class Event < ::Stripe::StripeObject + class LoginFailed < ::Stripe::StripeObject + # The reason why this login failed. + sig { returns(String) } + def reason; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class RegistrationFailed < ::Stripe::StripeObject + # The reason why this registration failed. + sig { returns(String) } + def reason; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end # Time at which the event occurred. Measured in seconds since the Unix epoch. sig { returns(Integer) } def occurred_at; end # The type of event that occurred. sig { returns(String) } def type; end + # Data about a failed login event. + sig { returns(T.nilable(LoginFailed)) } + def login_failed; end + # Data about a failed registration event. + sig { returns(T.nilable(RegistrationFailed)) } + def registration_failed; end def self.inner_class_types - @inner_class_types = {} + @inner_class_types = {login_failed: LoginFailed, registration_failed: RegistrationFailed} end def self.field_remappings @field_remappings = {} diff --git a/rbi/stripe/resources/v2/money_management/outbound_payment.rbi b/rbi/stripe/resources/v2/money_management/outbound_payment.rbi index a93c7a1c0..13b1f95e9 100644 --- a/rbi/stripe/resources/v2/money_management/outbound_payment.rbi +++ b/rbi/stripe/resources/v2/money_management/outbound_payment.rbi @@ -22,14 +22,34 @@ module Stripe end end class DeliveryOptions < ::Stripe::StripeObject - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end + class PaperCheck < ::Stripe::StripeObject + # Memo printed on the memo field of the check. + sig { returns(T.nilable(String)) } + def memo; end + # Open Enum. Shipping speed of the paper check. + sig { returns(String) } + def shipping_speed; end + # Signature for the paper check. + sig { returns(String) } + def signature; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end + # Delivery options for paper check. + sig { returns(T.nilable(PaperCheck)) } + def paper_check; end def self.inner_class_types - @inner_class_types = {} + @inner_class_types = {paper_check: PaperCheck} end def self.field_remappings @field_remappings = {} @@ -183,6 +203,75 @@ module Stripe @field_remappings = {} end end + class TrackingDetails < ::Stripe::StripeObject + class PaperCheck < ::Stripe::StripeObject + class MailingAddress < ::Stripe::StripeObject + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + def city; end + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + def country; end + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + def line1; end + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + def line2; end + # ZIP or postal code. + sig { returns(T.nilable(String)) } + def postal_code; end + # State, county, province, or region. + sig { returns(T.nilable(String)) } + def state; end + # Town or district. + sig { returns(T.nilable(String)) } + def town; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Open Enum. Carrier of the paper check. + sig { returns(String) } + def carrier; end + # Check number. + sig { returns(String) } + def check_number; end + # Postal code of the latest tracking update. + sig { returns(String) } + def current_postal_code; end + # Mailing address of the paper check. + sig { returns(MailingAddress) } + def mailing_address; end + # Tracking number for the check. + sig { returns(String) } + def tracking_number; end + # Open Enum. Tracking status of the paper check. + sig { returns(String) } + def tracking_status; end + # When the tracking details were last updated. + sig { returns(String) } + def updated_at; end + def self.inner_class_types + @inner_class_types = {mailing_address: MailingAddress} + end + def self.field_remappings + @field_remappings = {} + end + end + # Paper check tracking details. + sig { returns(T.nilable(PaperCheck)) } + def paper_check; end + def self.inner_class_types + @inner_class_types = {paper_check: PaperCheck} + end + def self.field_remappings + @field_remappings = {} + end + end # The "presentment amount" for the OutboundPayment. sig { returns(Amount) } def amount; end @@ -248,6 +337,9 @@ module Stripe # A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar. sig { returns(TraceId) } def trace_id; end + # Information to track this OutboundPayment with the recipient bank. + sig { returns(T.nilable(TrackingDetails)) } + def tracking_details; end # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. sig { returns(T::Boolean) } def livemode; end diff --git a/rbi/stripe/resources/v2/money_management/outbound_payment_quote.rbi b/rbi/stripe/resources/v2/money_management/outbound_payment_quote.rbi index 7d89cb31f..94e16f289 100644 --- a/rbi/stripe/resources/v2/money_management/outbound_payment_quote.rbi +++ b/rbi/stripe/resources/v2/money_management/outbound_payment_quote.rbi @@ -22,12 +22,12 @@ module Stripe end end class DeliveryOptions < ::Stripe::StripeObject - # Open Enum. Method for bank account. - sig { returns(T.nilable(String)) } - def bank_account; end # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } def speed; end + # Open Enum. Method for bank account. + sig { returns(T.nilable(String)) } + def bank_account; end def self.inner_class_types @inner_class_types = {} end diff --git a/rbi/stripe/services/v2/core/account_link_service.rbi b/rbi/stripe/services/v2/core/account_link_service.rbi index c6038b4d3..92e0b4342 100644 --- a/rbi/stripe/services/v2/core/account_link_service.rbi +++ b/rbi/stripe/services/v2/core/account_link_service.rbi @@ -7,6 +7,8 @@ module Stripe module Core class AccountLinkService < StripeService # Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountLinkCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountLink) } diff --git a/rbi/stripe/services/v2/core/account_service.rbi b/rbi/stripe/services/v2/core/account_service.rbi index 07bbe1049..1c79e29b5 100644 --- a/rbi/stripe/services/v2/core/account_service.rbi +++ b/rbi/stripe/services/v2/core/account_service.rbi @@ -9,30 +9,40 @@ module Stripe attr_reader :persons attr_reader :person_tokens # Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountCloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } def close(id, params = {}, opts = {}); end # An Account is a representation of a company, individual or other entity that a user interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } def create(params = {}, opts = {}); end # Returns a list of Accounts. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } def list(params = {}, opts = {}); end # Retrieves the details of an Account. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } def retrieve(id, params = {}, opts = {}); end # Updates the details of an Account. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountUpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::Account) } diff --git a/rbi/stripe/services/v2/core/account_token_service.rbi b/rbi/stripe/services/v2/core/account_token_service.rbi index b8e484959..4dcf81be1 100644 --- a/rbi/stripe/services/v2/core/account_token_service.rbi +++ b/rbi/stripe/services/v2/core/account_token_service.rbi @@ -7,12 +7,16 @@ module Stripe module Core class AccountTokenService < StripeService # Creates an Account Token. + # + # ** raises RateLimitError sig { params(params: T.any(::Stripe::V2::Core::AccountTokenCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountToken) } def create(params = {}, opts = {}); end # Retrieves an Account Token. + # + # ** raises RateLimitError sig { params(id: String, params: T.any(::Stripe::V2::Core::AccountTokenRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountToken) } diff --git a/rbi/stripe/services/v2/core/accounts/person_service.rbi b/rbi/stripe/services/v2/core/accounts/person_service.rbi index 7bc206873..c7f6d64fb 100644 --- a/rbi/stripe/services/v2/core/accounts/person_service.rbi +++ b/rbi/stripe/services/v2/core/accounts/person_service.rbi @@ -8,30 +8,40 @@ module Stripe module Accounts class PersonService < StripeService # Create a Person. Adds an individual to an Account's identity. You can set relationship attributes and identity information at creation. + # + # ** raises RateLimitError sig { params(account_id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPerson) } def create(account_id, params = {}, opts = {}); end # Delete a Person associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonDeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::DeletedObject) } def delete(account_id, id, params = {}, opts = {}); end # Returns a paginated list of Persons associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } def list(account_id, params = {}, opts = {}); end # Retrieves a Person associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPerson) } def retrieve(account_id, id, params = {}, opts = {}); end # Updates a Person associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonUpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPerson) } diff --git a/rbi/stripe/services/v2/core/accounts/person_token_service.rbi b/rbi/stripe/services/v2/core/accounts/person_token_service.rbi index 401dd9eef..072d94c8b 100644 --- a/rbi/stripe/services/v2/core/accounts/person_token_service.rbi +++ b/rbi/stripe/services/v2/core/accounts/person_token_service.rbi @@ -8,12 +8,16 @@ module Stripe module Accounts class PersonTokenService < StripeService # Creates a Person Token associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonTokenCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPersonToken) } def create(account_id, params = {}, opts = {}); end # Retrieves a Person Token associated with an Account. + # + # ** raises RateLimitError sig { params(account_id: String, id: String, params: T.any(::Stripe::V2::Core::Accounts::PersonTokenRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountPersonToken) } diff --git a/rbi/stripe/services/v2/iam/api_key_service.rbi b/rbi/stripe/services/v2/iam/api_key_service.rbi index bbe6b40c3..9b1247968 100644 --- a/rbi/stripe/services/v2/iam/api_key_service.rbi +++ b/rbi/stripe/services/v2/iam/api_key_service.rbi @@ -6,13 +6,13 @@ module Stripe module V2 module Iam class ApiKeyService < StripeService - # Create an API key. + # Create an API key. To create a secret key in livemode, a public key for encryption must be provided. sig { params(params: T.any(::Stripe::V2::Iam::ApiKeyCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } def create(params = {}, opts = {}); end - # Expire an API key. + # Expire an API key. The specified key becomes invalid immediately. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } @@ -24,19 +24,19 @@ module Stripe } def list(params = {}, opts = {}); end - # Retrieve an API key. + # Retrieve an API key. For livemode secret keys, secret tokens are only returned on creation, and never returned here. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } def retrieve(id, params = {}, opts = {}); end - # Rotate an API key. + # Rotate an API key. A new key with the same properties is created and returned. The existing key is expired immediately, unless an expiry time is specified. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyRotateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } def rotate(id, params = {}, opts = {}); end - # Update an API key. + # Update an API key. Only parameters that are specified in the request will be updated. sig { params(id: String, params: T.any(::Stripe::V2::Iam::ApiKeyUpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Iam::ApiKey) } diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 5edea47ea..391072f67 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -10539,29 +10539,16 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts" end should "Test rate limit error (service)" do - stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/reporting/report_runs").to_return( - body: '{"error":{"type":"rate_limit","code":"report_run_rate_limit_exceeded"}}', + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts").to_return( + body: '{"error":{"type":"rate_limit","code":"account_rate_limit_exceeded"}}', status: 400 ) client = Stripe::StripeClient.new("sk_test_123") assert_raises Stripe::RateLimitError do - report_run = client.v2.reporting.report_runs.create({ - report: "report", - report_parameters: { - int_key: 123, - string_key: "value", - boolean_key: true, - object_key: { - object_int_key: 123, - object_string_key: "value", - object_boolean_key: true, - }, - array_key: [1, 2, 3], - }, - }) + accounts = client.v2.core.accounts.list end - assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/reporting/report_runs" + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts" end should "Test recipient not notifiable error (service)" do stub_request( diff --git a/test/stripe/util_test.rb b/test/stripe/util_test.rb index 508b930e1..b29f6d59b 100644 --- a/test/stripe/util_test.rb +++ b/test/stripe/util_test.rb @@ -240,7 +240,7 @@ class UtilTest < Test::Unit::TestCase resource2 = Stripe::Charge.construct_from(id: "ch_456", object: "charge") input = [resource1, "string", resource2] result = Util.objects_to_ids(input, :v1) - assert_equal ["ch_123", "string", "ch_456"], result + assert_equal %w[ch_123 string ch_456], result end should "process arrays with v2 semantics" do @@ -248,7 +248,7 @@ class UtilTest < Test::Unit::TestCase resource2 = Stripe::Charge.construct_from(id: "ch_456", object: "charge") input = [resource1, "string", resource2] result = Util.objects_to_ids(input, :v2) - assert_equal ["ch_123", "string", "ch_456"], result + assert_equal %w[ch_123 string ch_456], result end should "handle complex nested structures with v1 semantics" do