diff --git a/.rubocop.yml b/.rubocop.yml index 1effa4cde..6cd9b4ffd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -72,6 +72,7 @@ Metrics/MethodLength: AllowedMethods: - initialize - inner_class_types + - field_encodings Metrics/ModuleLength: Enabled: false diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8576feb6a..7f0c1f6cc 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9e950cbf7b5a814a98f27d1a94b72cd6f1df2078 \ No newline at end of file +c6c496e5daed61b9bb5504a4af318c46e722f783 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 990d2c9ee..7ed31d718 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,7 @@ source "https://rubygems.org" gemspec group :development do + gem "cgi" gem "mocha", "~> 1.16.0" gem "rack", ">= 2.0.6" gem "rake" diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 604997fea..4ec501ea2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2203 \ No newline at end of file +v2205 \ No newline at end of file diff --git a/lib/stripe.rb b/lib/stripe.rb index 7c4559bb5..b069f187d 100644 --- a/lib/stripe.rb +++ b/lib/stripe.rb @@ -2,7 +2,7 @@ # Stripe Ruby bindings # API spec at https://stripe.com/docs/api -require "cgi" +require "cgi/escape" require "json" require "logger" require "net/http" diff --git a/lib/stripe/api_requestor.rb b/lib/stripe/api_requestor.rb index 7c9230e77..c6882961c 100644 --- a/lib/stripe/api_requestor.rb +++ b/lib/stripe/api_requestor.rb @@ -1108,6 +1108,7 @@ class SystemProfiler %w[CODEX_CI codex_cli], %w[CURSOR_AGENT cursor], %w[GEMINI_CLI gemini_cli], + %w[OPENCLAW_SHELL openclaw], %w[OPENCODE open_code], # aiAgents: The end of the section generated from our OpenAPI spec ].freeze diff --git a/lib/stripe/event_types.rb b/lib/stripe/event_types.rb index 621cb069e..ef90ea06d 100644 --- a/lib/stripe/event_types.rb +++ b/lib/stripe/event_types.rb @@ -5,6 +5,8 @@ module EventTypes def self.v2_event_types_to_classes { # v2 event types: The beginning of the section generated from our OpenAPI spec + Events::V1AccountSignalsIncludingDelinquencyCreatedEvent.lookup_type => + Events::V1AccountSignalsIncludingDelinquencyCreatedEvent, Events::V1BillingMeterErrorReportTriggeredEvent.lookup_type => Events::V1BillingMeterErrorReportTriggeredEvent, Events::V1BillingMeterNoMeterFoundEvent.lookup_type => Events::V1BillingMeterNoMeterFoundEvent, @@ -104,7 +106,20 @@ def self.v2_event_types_to_classes Events::V2CoreAccountPersonCreatedEvent.lookup_type => Events::V2CoreAccountPersonCreatedEvent, Events::V2CoreAccountPersonDeletedEvent.lookup_type => Events::V2CoreAccountPersonDeletedEvent, Events::V2CoreAccountPersonUpdatedEvent.lookup_type => Events::V2CoreAccountPersonUpdatedEvent, + Events::V2CoreAccountSignalsFraudulentWebsiteReadyEvent.lookup_type => + Events::V2CoreAccountSignalsFraudulentWebsiteReadyEvent, Events::V2CoreAccountUpdatedEvent.lookup_type => Events::V2CoreAccountUpdatedEvent, + Events::V2CoreBatchJobBatchFailedEvent.lookup_type => Events::V2CoreBatchJobBatchFailedEvent, + Events::V2CoreBatchJobCanceledEvent.lookup_type => Events::V2CoreBatchJobCanceledEvent, + Events::V2CoreBatchJobCompletedEvent.lookup_type => Events::V2CoreBatchJobCompletedEvent, + Events::V2CoreBatchJobCreatedEvent.lookup_type => Events::V2CoreBatchJobCreatedEvent, + Events::V2CoreBatchJobReadyForUploadEvent.lookup_type => Events::V2CoreBatchJobReadyForUploadEvent, + Events::V2CoreBatchJobTimeoutEvent.lookup_type => Events::V2CoreBatchJobTimeoutEvent, + Events::V2CoreBatchJobUpdatedEvent.lookup_type => Events::V2CoreBatchJobUpdatedEvent, + Events::V2CoreBatchJobUploadTimeoutEvent.lookup_type => Events::V2CoreBatchJobUploadTimeoutEvent, + Events::V2CoreBatchJobValidatingEvent.lookup_type => Events::V2CoreBatchJobValidatingEvent, + Events::V2CoreBatchJobValidationFailedEvent.lookup_type => + Events::V2CoreBatchJobValidationFailedEvent, Events::V2CoreClaimableSandboxClaimedEvent.lookup_type => Events::V2CoreClaimableSandboxClaimedEvent, Events::V2CoreClaimableSandboxCreatedEvent.lookup_type => @@ -293,6 +308,8 @@ def self.v2_event_types_to_classes Events::V2ReportingReportRunSucceededEvent.lookup_type => Events::V2ReportingReportRunSucceededEvent, Events::V2ReportingReportRunUpdatedEvent.lookup_type => Events::V2ReportingReportRunUpdatedEvent, + Events::V2SignalsAccountSignalFraudulentMerchantReadyEvent.lookup_type => + Events::V2SignalsAccountSignalFraudulentMerchantReadyEvent, # v2 event types: The end of the section generated from our OpenAPI spec } end @@ -300,6 +317,8 @@ def self.v2_event_types_to_classes def self.event_notification_types_to_classes { # event notification types: The beginning of the section generated from our OpenAPI spec + Events::V1AccountSignalsIncludingDelinquencyCreatedEventNotification.lookup_type => + Events::V1AccountSignalsIncludingDelinquencyCreatedEventNotification, Events::V1BillingMeterErrorReportTriggeredEventNotification.lookup_type => Events::V1BillingMeterErrorReportTriggeredEventNotification, Events::V1BillingMeterNoMeterFoundEventNotification.lookup_type => @@ -420,8 +439,30 @@ def self.event_notification_types_to_classes Events::V2CoreAccountPersonDeletedEventNotification, Events::V2CoreAccountPersonUpdatedEventNotification.lookup_type => Events::V2CoreAccountPersonUpdatedEventNotification, + Events::V2CoreAccountSignalsFraudulentWebsiteReadyEventNotification.lookup_type => + Events::V2CoreAccountSignalsFraudulentWebsiteReadyEventNotification, Events::V2CoreAccountUpdatedEventNotification.lookup_type => Events::V2CoreAccountUpdatedEventNotification, + Events::V2CoreBatchJobBatchFailedEventNotification.lookup_type => + Events::V2CoreBatchJobBatchFailedEventNotification, + Events::V2CoreBatchJobCanceledEventNotification.lookup_type => + Events::V2CoreBatchJobCanceledEventNotification, + Events::V2CoreBatchJobCompletedEventNotification.lookup_type => + Events::V2CoreBatchJobCompletedEventNotification, + Events::V2CoreBatchJobCreatedEventNotification.lookup_type => + Events::V2CoreBatchJobCreatedEventNotification, + Events::V2CoreBatchJobReadyForUploadEventNotification.lookup_type => + Events::V2CoreBatchJobReadyForUploadEventNotification, + Events::V2CoreBatchJobTimeoutEventNotification.lookup_type => + Events::V2CoreBatchJobTimeoutEventNotification, + Events::V2CoreBatchJobUpdatedEventNotification.lookup_type => + Events::V2CoreBatchJobUpdatedEventNotification, + Events::V2CoreBatchJobUploadTimeoutEventNotification.lookup_type => + Events::V2CoreBatchJobUploadTimeoutEventNotification, + Events::V2CoreBatchJobValidatingEventNotification.lookup_type => + Events::V2CoreBatchJobValidatingEventNotification, + Events::V2CoreBatchJobValidationFailedEventNotification.lookup_type => + Events::V2CoreBatchJobValidationFailedEventNotification, Events::V2CoreClaimableSandboxClaimedEventNotification.lookup_type => Events::V2CoreClaimableSandboxClaimedEventNotification, Events::V2CoreClaimableSandboxCreatedEventNotification.lookup_type => @@ -622,6 +663,8 @@ def self.event_notification_types_to_classes Events::V2ReportingReportRunSucceededEventNotification, Events::V2ReportingReportRunUpdatedEventNotification.lookup_type => Events::V2ReportingReportRunUpdatedEventNotification, + Events::V2SignalsAccountSignalFraudulentMerchantReadyEventNotification.lookup_type => + Events::V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, # event notification types: The end of the section generated from our OpenAPI spec } end diff --git a/lib/stripe/events/v1_account_signals_including_delinquency_created_event.rb b/lib/stripe/events/v1_account_signals_including_delinquency_created_event.rb new file mode 100644 index 000000000..ff86fc491 --- /dev/null +++ b/lib/stripe/events/v1_account_signals_including_delinquency_created_event.rb @@ -0,0 +1,68 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a delinquency signal is created for an account. + class V1AccountSignalsIncludingDelinquencyCreatedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v1.account_signals[delinquency].created" + end + + class V1AccountSignalsIncludingDelinquencyCreatedEventData < ::Stripe::StripeObject + class Indicator < ::Stripe::StripeObject + # A brief explanation of how this indicator contributed to the delinquency probability. + attr_reader :description + # The effect this indicator had on the overall risk level. + attr_reader :impact + # The name of the specific indicator used in the risk assessment. + attr_reader :indicator + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Categorical assessment of the delinquency risk based on probability. + attr_reader :risk_level + # The probability of delinquency. Can be between 0.00 and 100.00. + attr_reader :probability + # Unique identifier for the delinquency signal. + attr_reader :signal_id + # Array of objects representing individual factors that contributed to the calculated probability of delinquency. + attr_reader :indicators + # The account for which the signals belong to. + attr_reader :account + # Time at which the signal was evaluated. + attr_reader :evaluated_at + + def self.inner_class_types + @inner_class_types = { indicators: Indicator } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { probability: :decimal_string } + end + end + + def self.inner_class_types + @inner_class_types = { data: V1AccountSignalsIncludingDelinquencyCreatedEventData } + end + attr_reader :data + end + + # Occurs when a delinquency signal is created for an account. + class V1AccountSignalsIncludingDelinquencyCreatedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v1.account_signals[delinquency].created" + end + end + end +end diff --git a/lib/stripe/events/v2_core_account_signals_fraudulent_website_ready_event.rb b/lib/stripe/events/v2_core_account_signals_fraudulent_website_ready_event.rb new file mode 100644 index 000000000..fb5399117 --- /dev/null +++ b/lib/stripe/events/v2_core_account_signals_fraudulent_website_ready_event.rb @@ -0,0 +1,48 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a Fraudulent Website signal is ready for an account. + class V2CoreAccountSignalsFraudulentWebsiteReadyEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.account_signals.fraudulent_website_ready" + end + + class V2CoreAccountSignalsFraudulentWebsiteReadyEventData < ::Stripe::StripeObject + # Unique identifier for the fraudulent website evaluation request. + attr_reader :evaluation_id + # Risk level for the fraudulent website signal. If evaluation could not run (like invalid website), we return unknown. + attr_reader :risk_level + # Human readable description of concerns found in the website, produced by LLM. If risk_level is unknown, this explains why evaluation could not run. + attr_reader :details + # Unique identifier for the fraudulent website signal. + attr_reader :signal_id + # The account for which the signals belong to. Empty if this was an entityless request. + attr_reader :account + # Time at which the signal was evaluated. + attr_reader :evaluated_at + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + + def self.inner_class_types + @inner_class_types = { data: V2CoreAccountSignalsFraudulentWebsiteReadyEventData } + end + attr_reader :data + end + + # Occurs when a Fraudulent Website signal is ready for an account. + class V2CoreAccountSignalsFraudulentWebsiteReadyEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.account_signals.fraudulent_website_ready" + end + end + end +end diff --git a/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb b/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb new file mode 100644 index 000000000..7d2bd4dda --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_batch_failed_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a batch job fails. + class V2CoreBatchJobBatchFailedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.batch_failed" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when a batch job fails. + class V2CoreBatchJobBatchFailedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.batch_failed" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_canceled_event.rb b/lib/stripe/events/v2_core_batch_job_canceled_event.rb new file mode 100644 index 000000000..9d630c64d --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_canceled_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a batch job is canceled. + class V2CoreBatchJobCanceledEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.canceled" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when a batch job is canceled. + class V2CoreBatchJobCanceledEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.canceled" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_completed_event.rb b/lib/stripe/events/v2_core_batch_job_completed_event.rb new file mode 100644 index 000000000..5b5a008b2 --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_completed_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs on completion of a batch job. + class V2CoreBatchJobCompletedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.completed" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs on completion of a batch job. + class V2CoreBatchJobCompletedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.completed" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_created_event.rb b/lib/stripe/events/v2_core_batch_job_created_event.rb new file mode 100644 index 000000000..674295f9e --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_created_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs on creation of a batch job. + class V2CoreBatchJobCreatedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.created" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs on creation of a batch job. + class V2CoreBatchJobCreatedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.created" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_ready_for_upload_event.rb b/lib/stripe/events/v2_core_batch_job_ready_for_upload_event.rb new file mode 100644 index 000000000..a819de360 --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_ready_for_upload_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs on submission of a batch job. + class V2CoreBatchJobReadyForUploadEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.ready_for_upload" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs on submission of a batch job. + class V2CoreBatchJobReadyForUploadEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.ready_for_upload" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_timeout_event.rb b/lib/stripe/events/v2_core_batch_job_timeout_event.rb new file mode 100644 index 000000000..06355add1 --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_timeout_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a batch job times out. + class V2CoreBatchJobTimeoutEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.timeout" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when a batch job times out. + class V2CoreBatchJobTimeoutEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.timeout" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_updated_event.rb b/lib/stripe/events/v2_core_batch_job_updated_event.rb new file mode 100644 index 000000000..a55cc9a19 --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_updated_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a batch job is updated. + class V2CoreBatchJobUpdatedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when a batch job is updated. + class V2CoreBatchJobUpdatedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.updated" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_upload_timeout_event.rb b/lib/stripe/events/v2_core_batch_job_upload_timeout_event.rb new file mode 100644 index 000000000..0fbd1bc8b --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_upload_timeout_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when merchant fails to upload a file in time. + class V2CoreBatchJobUploadTimeoutEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.upload_timeout" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when merchant fails to upload a file in time. + class V2CoreBatchJobUploadTimeoutEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.upload_timeout" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_validating_event.rb b/lib/stripe/events/v2_core_batch_job_validating_event.rb new file mode 100644 index 000000000..13ac0c7cf --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_validating_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a batch job proceeds to the validation stage. + class V2CoreBatchJobValidatingEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.validating" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when a batch job proceeds to the validation stage. + class V2CoreBatchJobValidatingEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.validating" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_batch_job_validation_failed_event.rb b/lib/stripe/events/v2_core_batch_job_validation_failed_event.rb new file mode 100644 index 000000000..258593459 --- /dev/null +++ b/lib/stripe/events/v2_core_batch_job_validation_failed_event.rb @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a batch job fails on validation. + class V2CoreBatchJobValidationFailedEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.core.batch_job.validation_failed" + 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, "Stripe-Request-Trigger": "event=#{id}" } + ) + end + attr_reader :related_object + end + + # Occurs when a batch job fails on validation. + class V2CoreBatchJobValidationFailedEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.core.batch_job.validation_failed" + end + + attr_reader :related_object + + # Retrieves the BatchJob 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, "Stripe-Request-Trigger": "event=#{id}" }, + 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/events/v2_core_health_api_error_firing_event.rb b/lib/stripe/events/v2_core_health_api_error_firing_event.rb index 016758328..04159e473 100644 --- a/lib/stripe/events/v2_core_health_api_error_firing_event.rb +++ b/lib/stripe/events/v2_core_health_api_error_firing_event.rb @@ -26,6 +26,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_requests_percentage: :decimal_string } + end end # The canonical path. attr_reader :canonical_path @@ -49,6 +53,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + } + end end # A short description of the alert. attr_reader :summary @@ -68,6 +82,21 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_api_error_resolved_event.rb b/lib/stripe/events/v2_core_health_api_error_resolved_event.rb index 0e36f7d77..595e7b09d 100644 --- a/lib/stripe/events/v2_core_health_api_error_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_api_error_resolved_event.rb @@ -26,6 +26,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_requests_percentage: :decimal_string } + end end # The canonical path. attr_reader :canonical_path @@ -49,6 +53,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + } + end end # A short description of the alert. attr_reader :summary @@ -68,6 +82,21 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_api_latency_firing_event.rb b/lib/stripe/events/v2_core_health_api_latency_firing_event.rb index be1728bad..7934e54fa 100644 --- a/lib/stripe/events/v2_core_health_api_latency_firing_event.rb +++ b/lib/stripe/events/v2_core_health_api_latency_firing_event.rb @@ -26,6 +26,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_requests_percentage: :decimal_string } + end end # The canonical path. attr_reader :canonical_path @@ -47,6 +51,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + } + end end # A short description of the alert. attr_reader :summary @@ -66,6 +80,21 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb b/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb index 950d1fdda..5d63a6db0 100644 --- a/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_api_latency_resolved_event.rb @@ -26,6 +26,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_requests_percentage: :decimal_string } + end end # The canonical path. attr_reader :canonical_path @@ -47,6 +51,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + } + end end # A short description of the alert. attr_reader :summary @@ -66,6 +80,21 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb b/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb index 1c1c26dc2..554867b80 100644 --- a/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb +++ b/lib/stripe/events/v2_core_health_authorization_rate_drop_firing_event.rb @@ -43,6 +43,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + current_percentage: :decimal_string, + previous_percentage: :decimal_string, + } + end end # A short description of the alert. attr_reader :summary @@ -62,6 +69,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { current_percentage: :decimal_string, previous_percentage: :decimal_string }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb b/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb index e3ba689d2..af82fe9b5 100644 --- a/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_authorization_rate_drop_resolved_event.rb @@ -43,6 +43,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + current_percentage: :decimal_string, + previous_percentage: :decimal_string, + } + end end # A short description of the alert. attr_reader :summary @@ -62,6 +69,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { current_percentage: :decimal_string, previous_percentage: :decimal_string }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb b/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb index 613193542..ee5332b44 100644 --- a/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb +++ b/lib/stripe/events/v2_core_health_fraud_rate_increased_event.rb @@ -11,20 +11,6 @@ def self.lookup_type class V2CoreHealthFraudRateIncreasedEventData < ::Stripe::StripeObject class Impact < ::Stripe::StripeObject - class RealizedFraudAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Fraud attack type. attr_reader :attack_type # The number of impacted requests which are detected. @@ -33,7 +19,7 @@ def self.field_remappings attr_reader :realized_fraud_amount def self.inner_class_types - @inner_class_types = { realized_fraud_amount: RealizedFraudAmount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb b/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb index 6e5810974..386573b78 100644 --- a/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb +++ b/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_firing_event.rb @@ -11,35 +11,6 @@ def self.lookup_type class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventData < ::Stripe::StripeObject class Impact < ::Stripe::StripeObject - class ApprovedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class DeclinedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Estimated aggregated amount for the approved requests. attr_reader :approved_amount # The number of approved requests which are impacted. @@ -50,7 +21,7 @@ def self.field_remappings attr_reader :declined_impacted_requests def self.inner_class_types - @inner_class_types = { approved_amount: ApprovedAmount, declined_amount: DeclinedAmount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb b/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb index af3e3c711..b8a8facc0 100644 --- a/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_issuing_authorization_request_errors_resolved_event.rb @@ -11,35 +11,6 @@ def self.lookup_type class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventData < ::Stripe::StripeObject class Impact < ::Stripe::StripeObject - class ApprovedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class DeclinedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Estimated aggregated amount for the approved requests. attr_reader :approved_amount # The number of approved requests which are impacted. @@ -50,7 +21,7 @@ def self.field_remappings attr_reader :declined_impacted_requests def self.inner_class_types - @inner_class_types = { approved_amount: ApprovedAmount, declined_amount: DeclinedAmount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb b/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb index e19fa4c38..b04226d54 100644 --- a/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb +++ b/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_firing_event.rb @@ -11,35 +11,6 @@ def self.lookup_type class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventData < ::Stripe::StripeObject class Impact < ::Stripe::StripeObject - class ApprovedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class DeclinedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Estimated aggregated amount for the approved requests. attr_reader :approved_amount # The number of approved requests which are impacted. @@ -50,7 +21,7 @@ def self.field_remappings attr_reader :declined_impacted_requests def self.inner_class_types - @inner_class_types = { approved_amount: ApprovedAmount, declined_amount: DeclinedAmount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb b/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb index a542a35c5..3eb5b275f 100644 --- a/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_issuing_authorization_request_timeout_resolved_event.rb @@ -11,35 +11,6 @@ def self.lookup_type class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventData < ::Stripe::StripeObject class Impact < ::Stripe::StripeObject - class ApprovedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class DeclinedAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Estimated aggregated amount for the approved requests. attr_reader :approved_amount # The number of approved requests which are impacted. @@ -50,7 +21,7 @@ def self.field_remappings attr_reader :declined_impacted_requests def self.inner_class_types - @inner_class_types = { approved_amount: ApprovedAmount, declined_amount: DeclinedAmount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb b/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb index 928505d81..85f35ec27 100644 --- a/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb +++ b/lib/stripe/events/v2_core_health_payment_method_error_firing_event.rb @@ -26,6 +26,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_requests_percentage: :decimal_string } + end end # The returned error code. attr_reader :error_code @@ -45,6 +49,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + } + end end # A short description of the alert. attr_reader :summary @@ -64,6 +78,21 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb b/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb index 811b43466..018d0171f 100644 --- a/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_payment_method_error_resolved_event.rb @@ -26,6 +26,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_requests_percentage: :decimal_string } + end end # The returned error code. attr_reader :error_code @@ -45,6 +49,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + } + end end # A short description of the alert. attr_reader :summary @@ -64,6 +78,21 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { + kind: :object, + fields: { + impacted_requests_percentage: :decimal_string, + top_impacted_accounts: { + kind: :array, + element: { kind: :object, fields: { impacted_requests_percentage: :decimal_string } }, + }, + }, + }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_sepa_debit_delayed_firing_event.rb b/lib/stripe/events/v2_core_health_sepa_debit_delayed_firing_event.rb index ed6d74040..da77b6063 100644 --- a/lib/stripe/events/v2_core_health_sepa_debit_delayed_firing_event.rb +++ b/lib/stripe/events/v2_core_health_sepa_debit_delayed_firing_event.rb @@ -23,6 +23,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_payments_percentage: :decimal_string } + end end # A short description of the alert. attr_reader :summary @@ -40,6 +44,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { kind: :object, fields: { impacted_payments_percentage: :decimal_string } }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_core_health_sepa_debit_delayed_resolved_event.rb b/lib/stripe/events/v2_core_health_sepa_debit_delayed_resolved_event.rb index a9b65d78f..6a884efb4 100644 --- a/lib/stripe/events/v2_core_health_sepa_debit_delayed_resolved_event.rb +++ b/lib/stripe/events/v2_core_health_sepa_debit_delayed_resolved_event.rb @@ -23,6 +23,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { impacted_payments_percentage: :decimal_string } + end end # A short description of the alert. attr_reader :summary @@ -42,6 +46,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + impact: { kind: :object, fields: { impacted_payments_percentage: :decimal_string } }, + } + end end def self.inner_class_types diff --git a/lib/stripe/events/v2_signals_account_signal_fraudulent_merchant_ready_event.rb b/lib/stripe/events/v2_signals_account_signal_fraudulent_merchant_ready_event.rb new file mode 100644 index 000000000..50487afe8 --- /dev/null +++ b/lib/stripe/events/v2_signals_account_signal_fraudulent_merchant_ready_event.rb @@ -0,0 +1,88 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Events + # Occurs when a fraudulent merchant signal is ready for an account. + class V2SignalsAccountSignalFraudulentMerchantReadyEvent < Stripe::V2::Core::Event + def self.lookup_type + "v2.signals.account_signal.fraudulent_merchant_ready" + end + + class V2SignalsAccountSignalFraudulentMerchantReadyEventData < ::Stripe::StripeObject + class FraudulentMerchant < ::Stripe::StripeObject + class Indicator < ::Stripe::StripeObject + # A brief explanation of how this indicator contributed to the fraudulent merchant probability. + attr_reader :description + # The effect this indicator had on the overall risk level. + attr_reader :impact + # The name of the specific indicator used in the risk assessment. + attr_reader :indicator + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Array of objects representing individual factors that contributed to the calculated probability. Maximum of 3. + attr_reader :indicators + # The probability of the merchant being fraudulent. Can be between 0.00 and 100.00. May be empty if the risk_level is UNKNOWN or NOT_ASSESSED. + attr_reader :probability + # Categorical assessment of the fraudulent merchant risk based on probability. + attr_reader :risk_level + + def self.inner_class_types + @inner_class_types = { indicators: Indicator } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { probability: :decimal_string } + end + end + # Fraudulent merchant signal data. Present when type is fraudulent_merchant. + attr_reader :fraudulent_merchant + # Unique identifier for this account signal. + attr_reader :id + # The type of account signal. Currently only fraudulent_merchant is supported. + attr_reader :type + # Account ID that this signal is associated with. + attr_reader :account + # Timestamp when the signal was evaluated. + attr_reader :evaluated_at + + def self.inner_class_types + @inner_class_types = { fraudulent_merchant: FraudulentMerchant } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + fraudulent_merchant: { kind: :object, fields: { probability: :decimal_string } }, + } + end + end + + def self.inner_class_types + @inner_class_types = { data: V2SignalsAccountSignalFraudulentMerchantReadyEventData } + end + attr_reader :data + end + + # Occurs when a fraudulent merchant signal is ready for an account. + class V2SignalsAccountSignalFraudulentMerchantReadyEventNotification < Stripe::V2::Core::EventNotification + def self.lookup_type + "v2.signals.account_signal.fraudulent_merchant_ready" + end + end + end +end diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index b7e44506b..00741ea57 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -219,7 +219,6 @@ def self.v2_object_names_to_classes V2::Billing::Intent.object_name => V2::Billing::Intent, V2::Billing::IntentAction.object_name => V2::Billing::IntentAction, V2::Billing::LicenseFee.object_name => V2::Billing::LicenseFee, - V2::Billing::LicenseFeeSubscription.object_name => V2::Billing::LicenseFeeSubscription, V2::Billing::LicenseFeeVersion.object_name => V2::Billing::LicenseFeeVersion, V2::Billing::LicensedItem.object_name => V2::Billing::LicensedItem, V2::Billing::MeterEvent.object_name => V2::Billing::MeterEvent, @@ -230,8 +229,6 @@ def self.v2_object_names_to_classes V2::Billing::PricingPlan.object_name => V2::Billing::PricingPlan, V2::Billing::PricingPlanComponent.object_name => V2::Billing::PricingPlanComponent, V2::Billing::PricingPlanSubscription.object_name => V2::Billing::PricingPlanSubscription, - V2::Billing::PricingPlanSubscriptionComponents.object_name => - V2::Billing::PricingPlanSubscriptionComponents, V2::Billing::PricingPlanVersion.object_name => V2::Billing::PricingPlanVersion, V2::Billing::Profile.object_name => V2::Billing::Profile, V2::Billing::RateCard.object_name => V2::Billing::RateCard, @@ -242,10 +239,12 @@ def self.v2_object_names_to_classes V2::Billing::RateCardVersion.object_name => V2::Billing::RateCardVersion, V2::Billing::ServiceAction.object_name => V2::Billing::ServiceAction, V2::Core::Account.object_name => V2::Core::Account, + V2::Core::AccountEvaluation.object_name => V2::Core::AccountEvaluation, V2::Core::AccountLink.object_name => V2::Core::AccountLink, V2::Core::AccountPerson.object_name => V2::Core::AccountPerson, V2::Core::AccountPersonToken.object_name => V2::Core::AccountPersonToken, V2::Core::AccountToken.object_name => V2::Core::AccountToken, + V2::Core::BatchJob.object_name => V2::Core::BatchJob, V2::Core::ClaimableSandbox.object_name => V2::Core::ClaimableSandbox, V2::Core::ConnectionSession.object_name => V2::Core::ConnectionSession, V2::Core::Event.object_name => V2::Core::Event, diff --git a/lib/stripe/params.rb b/lib/stripe/params.rb index 64cd65aa9..d0cf4c5f8 100644 --- a/lib/stripe/params.rb +++ b/lib/stripe/params.rb @@ -739,7 +739,6 @@ require "stripe/params/v2/billing/license_fee_create_params" require "stripe/params/v2/billing/license_fee_list_params" require "stripe/params/v2/billing/license_fee_retrieve_params" -require "stripe/params/v2/billing/license_fee_subscription_retrieve_params" require "stripe/params/v2/billing/license_fee_update_params" require "stripe/params/v2/billing/license_fees/version_list_params" require "stripe/params/v2/billing/license_fees/version_retrieve_params" @@ -763,9 +762,9 @@ require "stripe/params/v2/billing/pricing_plan_list_params" require "stripe/params/v2/billing/pricing_plan_retrieve_params" require "stripe/params/v2/billing/pricing_plan_subscription_list_params" +require "stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params" require "stripe/params/v2/billing/pricing_plan_subscription_retrieve_params" require "stripe/params/v2/billing/pricing_plan_subscription_update_params" -require "stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params" require "stripe/params/v2/billing/pricing_plan_update_params" require "stripe/params/v2/billing/pricing_plans/component_create_params" require "stripe/params/v2/billing/pricing_plans/component_delete_params" @@ -780,6 +779,7 @@ require "stripe/params/v2/billing/profile_update_params" require "stripe/params/v2/billing/rate_card_create_params" require "stripe/params/v2/billing/rate_card_list_params" +require "stripe/params/v2/billing/rate_card_modify_rates_params" require "stripe/params/v2/billing/rate_card_retrieve_params" require "stripe/params/v2/billing/rate_card_subscription_cancel_params" require "stripe/params/v2/billing/rate_card_subscription_create_params" @@ -802,6 +802,7 @@ require "stripe/params/v2/billing/service_action_update_params" require "stripe/params/v2/core/account_close_params" require "stripe/params/v2/core/account_create_params" +require "stripe/params/v2/core/account_evaluation_create_params" require "stripe/params/v2/core/account_link_create_params" require "stripe/params/v2/core/account_list_params" require "stripe/params/v2/core/account_retrieve_params" @@ -815,6 +816,9 @@ require "stripe/params/v2/core/accounts/person_token_create_params" require "stripe/params/v2/core/accounts/person_token_retrieve_params" require "stripe/params/v2/core/accounts/person_update_params" +require "stripe/params/v2/core/batch_job_cancel_params" +require "stripe/params/v2/core/batch_job_create_params" +require "stripe/params/v2/core/batch_job_retrieve_params" require "stripe/params/v2/core/claimable_sandbox_create_params" require "stripe/params/v2/core/claimable_sandbox_retrieve_params" require "stripe/params/v2/core/connection_session_create_params" diff --git a/lib/stripe/params/billing/alert_create_params.rb b/lib/stripe/params/billing/alert_create_params.rb index 1025f912c..117edb4fe 100644 --- a/lib/stripe/params/billing/alert_create_params.rb +++ b/lib/stripe/params/billing/alert_create_params.rb @@ -78,6 +78,10 @@ def initialize(id: nil, value: nil) @id = id @value = value end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::RequestParams @@ -103,6 +107,12 @@ def initialize(balance_type: nil, custom_pricing_unit: nil, monetary: nil) @custom_pricing_unit = custom_pricing_unit @monetary = monetary end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end # The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time. attr_accessor :filters @@ -113,6 +123,15 @@ def initialize(filters: nil, lte: nil) @filters = filters @lte = lte end + + def self.field_encodings + @field_encodings = { + lte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class SpendThreshold < ::Stripe::RequestParams @@ -162,6 +181,10 @@ def initialize(id: nil, value: nil) @id = id @value = value end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end # The monetary amount. Required when type is `amount`. The threshold is the total_before_tax, the amount consumed after all credits and discounts are applied, but before tax is applied. attr_accessor :amount @@ -175,6 +198,12 @@ def initialize(amount: nil, custom_pricing_unit: nil, type: nil) @custom_pricing_unit = custom_pricing_unit @type = type end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end # Defines the period over which spend is aggregated. attr_accessor :aggregation_period @@ -191,6 +220,15 @@ def initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil) @group_by = group_by @gte = gte end + + def self.field_encodings + @field_encodings = { + gte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class UsageThreshold < ::Stripe::RequestParams @@ -249,6 +287,29 @@ def initialize( @title = title @usage_threshold = usage_threshold end + + def self.field_encodings + @field_encodings = { + credit_balance_threshold: { + kind: :object, + fields: { + lte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + spend_threshold: { + kind: :object, + fields: { + gte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/billing/credit_grant_create_params.rb b/lib/stripe/params/billing/credit_grant_create_params.rb index fefb66c3f..5e60de4ad 100644 --- a/lib/stripe/params/billing/credit_grant_create_params.rb +++ b/lib/stripe/params/billing/credit_grant_create_params.rb @@ -15,6 +15,10 @@ def initialize(id: nil, value: nil) @id = id @value = value end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::RequestParams @@ -40,6 +44,12 @@ def initialize(custom_pricing_unit: nil, monetary: nil, type: nil) @monetary = monetary @type = type end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams @@ -129,6 +139,15 @@ def initialize( @name = name @priority = priority end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end end end diff --git a/lib/stripe/params/checkout/session_create_params.rb b/lib/stripe/params/checkout/session_create_params.rb index a19c9da30..744d8252b 100644 --- a/lib/stripe/params/checkout/session_create_params.rb +++ b/lib/stripe/params/checkout/session_create_params.rb @@ -632,6 +632,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. attr_accessor :adjustable_quantity @@ -665,6 +669,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class ManagedPayments < ::Stripe::RequestParams @@ -2769,6 +2779,18 @@ def initialize( @approval_method = approval_method @checkout_items = checkout_items end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/checkout/session_update_params.rb b/lib/stripe/params/checkout/session_update_params.rb index 890d4661d..a743f9a57 100644 --- a/lib/stripe/params/checkout/session_update_params.rb +++ b/lib/stripe/params/checkout/session_update_params.rb @@ -250,6 +250,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. attr_accessor :adjustable_quantity @@ -283,6 +287,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class ShippingOption < ::Stripe::RequestParams @@ -476,6 +486,18 @@ def initialize( @shipping_options = shipping_options @subscription_data = subscription_data end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/climate/order_create_params.rb b/lib/stripe/params/climate/order_create_params.rb index 874661f50..ee41f7a2d 100644 --- a/lib/stripe/params/climate/order_create_params.rb +++ b/lib/stripe/params/climate/order_create_params.rb @@ -44,6 +44,10 @@ def initialize( @metric_tons = metric_tons @product = product end + + def self.field_encodings + @field_encodings = { metric_tons: :decimal_string } + end end end end diff --git a/lib/stripe/params/credit_note_create_params.rb b/lib/stripe/params/credit_note_create_params.rb index 2a90c5099..d95c3e1ba 100644 --- a/lib/stripe/params/credit_note_create_params.rb +++ b/lib/stripe/params/credit_note_create_params.rb @@ -58,6 +58,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Refund < ::Stripe::RequestParams @@ -157,5 +161,14 @@ def initialize( @refunds = refunds @shipping_cost = shipping_cost end + + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + } + end end end diff --git a/lib/stripe/params/credit_note_list_preview_line_items_params.rb b/lib/stripe/params/credit_note_list_preview_line_items_params.rb index 6d520c74b..5aa2b6c98 100644 --- a/lib/stripe/params/credit_note_list_preview_line_items_params.rb +++ b/lib/stripe/params/credit_note_list_preview_line_items_params.rb @@ -58,6 +58,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Refund < ::Stripe::RequestParams @@ -169,5 +173,14 @@ def initialize( @shipping_cost = shipping_cost @starting_after = starting_after end + + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + } + end end end diff --git a/lib/stripe/params/credit_note_preview_lines_list_params.rb b/lib/stripe/params/credit_note_preview_lines_list_params.rb index 36aa605ab..1191eca88 100644 --- a/lib/stripe/params/credit_note_preview_lines_list_params.rb +++ b/lib/stripe/params/credit_note_preview_lines_list_params.rb @@ -58,6 +58,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Refund < ::Stripe::RequestParams @@ -169,5 +173,14 @@ def initialize( @shipping_cost = shipping_cost @starting_after = starting_after end + + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + } + end end end diff --git a/lib/stripe/params/credit_note_preview_params.rb b/lib/stripe/params/credit_note_preview_params.rb index 83b5e0c9b..07376665f 100644 --- a/lib/stripe/params/credit_note_preview_params.rb +++ b/lib/stripe/params/credit_note_preview_params.rb @@ -58,6 +58,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Refund < ::Stripe::RequestParams @@ -157,5 +161,14 @@ def initialize( @refunds = refunds @shipping_cost = shipping_cost end + + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + } + end end end diff --git a/lib/stripe/params/invoice_add_lines_params.rb b/lib/stripe/params/invoice_add_lines_params.rb index a589c22d4..20c762dac 100644 --- a/lib/stripe/params/invoice_add_lines_params.rb +++ b/lib/stripe/params/invoice_add_lines_params.rb @@ -133,6 +133,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Pricing < ::Stripe::RequestParams @@ -261,6 +265,12 @@ def initialize( @tax_amounts = tax_amounts @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end # Specifies which fields in the response should be expanded. attr_accessor :expand @@ -274,5 +284,17 @@ def initialize(expand: nil, invoice_metadata: nil, lines: nil) @invoice_metadata = invoice_metadata @lines = lines end + + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/invoice_create_preview_params.rb b/lib/stripe/params/invoice_create_preview_params.rb index 2b4c4e733..79026bdd5 100644 --- a/lib/stripe/params/invoice_create_preview_params.rb +++ b/lib/stripe/params/invoice_create_preview_params.rb @@ -319,6 +319,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The integer amount in cents (or local equivalent) of previewed invoice item. attr_accessor :amount @@ -388,6 +392,13 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + unit_amount_decimal: :decimal_string, + } + end end class Issuer < ::Stripe::RequestParams @@ -1288,6 +1299,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The coupons to redeem into discounts for the item. attr_accessor :discounts @@ -1321,6 +1336,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class AutomaticTax < ::Stripe::RequestParams @@ -1636,6 +1657,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Trial < ::Stripe::RequestParams @@ -1693,6 +1718,12 @@ def initialize( @trial = trial @trial_offer = trial_offer end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class PauseCollection < ::Stripe::RequestParams @@ -1840,6 +1871,29 @@ def initialize( @trial_end = trial_end @trial_settings = trial_settings end + + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams @@ -1930,6 +1984,37 @@ def initialize( @prebilling = prebilling @proration_behavior = proration_behavior end + + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + }, + }, + }, + } + end end class SubscriptionDetails < ::Stripe::RequestParams @@ -2162,6 +2247,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. attr_accessor :billing_thresholds @@ -2215,6 +2304,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class Prebilling < ::Stripe::RequestParams @@ -2285,6 +2380,18 @@ def initialize( @start_date = start_date @trial_end = trial_end end + + def self.field_encodings + @field_encodings = { + items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end # Settings for automatic tax lookup for this invoice preview. attr_accessor :automatic_tax @@ -2354,5 +2461,65 @@ def initialize( @subscription = subscription @subscription_details = subscription_details end + + def self.field_encodings + @field_encodings = { + invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + unit_amount_decimal: :decimal_string, + }, + }, + }, + schedule_details: { + kind: :object, + fields: { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + }, + }, + }, + }, + }, + subscription_details: { + kind: :object, + fields: { + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + }, + }, + } + end end end diff --git a/lib/stripe/params/invoice_item_create_params.rb b/lib/stripe/params/invoice_item_create_params.rb index 9fd0f1b06..d1ce93319 100644 --- a/lib/stripe/params/invoice_item_create_params.rb +++ b/lib/stripe/params/invoice_item_create_params.rb @@ -83,6 +83,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Pricing < ::Stripe::RequestParams @@ -177,5 +181,12 @@ def initialize( @tax_rates = tax_rates @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + unit_amount_decimal: :decimal_string, + } + end end end diff --git a/lib/stripe/params/invoice_item_update_params.rb b/lib/stripe/params/invoice_item_update_params.rb index 335aa90f5..c80bb2fda 100644 --- a/lib/stripe/params/invoice_item_update_params.rb +++ b/lib/stripe/params/invoice_item_update_params.rb @@ -83,6 +83,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Pricing < ::Stripe::RequestParams @@ -157,5 +161,12 @@ def initialize( @tax_rates = tax_rates @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + unit_amount_decimal: :decimal_string, + } + end end end diff --git a/lib/stripe/params/invoice_line_item_update_params.rb b/lib/stripe/params/invoice_line_item_update_params.rb index 589b3eb0e..5e458736f 100644 --- a/lib/stripe/params/invoice_line_item_update_params.rb +++ b/lib/stripe/params/invoice_line_item_update_params.rb @@ -132,6 +132,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Pricing < ::Stripe::RequestParams @@ -260,5 +264,11 @@ def initialize( @tax_amounts = tax_amounts @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end end diff --git a/lib/stripe/params/invoice_update_lines_params.rb b/lib/stripe/params/invoice_update_lines_params.rb index 602173341..10274ad08 100644 --- a/lib/stripe/params/invoice_update_lines_params.rb +++ b/lib/stripe/params/invoice_update_lines_params.rb @@ -133,6 +133,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Pricing < ::Stripe::RequestParams @@ -261,6 +265,12 @@ def initialize( @tax_amounts = tax_amounts @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end # Specifies which fields in the response should be expanded. attr_accessor :expand @@ -274,5 +284,17 @@ def initialize(expand: nil, invoice_metadata: nil, lines: nil) @invoice_metadata = invoice_metadata @lines = lines end + + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/issuing/authorization_capture_params.rb b/lib/stripe/params/issuing/authorization_capture_params.rb index f2daabf11..c3b133d31 100644 --- a/lib/stripe/params/issuing/authorization_capture_params.rb +++ b/lib/stripe/params/issuing/authorization_capture_params.rb @@ -41,6 +41,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -50,6 +54,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -62,6 +70,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -75,6 +90,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -96,6 +125,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams @@ -180,6 +228,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams @@ -210,6 +265,10 @@ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) @total = total @unit_cost = unit_cost end + + def self.field_encodings + @field_encodings = { quantity: :decimal_string } + end end # Fleet-specific information for transactions using Fleet cards. attr_accessor :fleet @@ -239,6 +298,35 @@ def initialize( @receipt = receipt @reference = reference end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { kind: :array, element: { kind: :object, fields: { quantity: :decimal_string } } }, + } + end end # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). attr_accessor :capture_amount @@ -260,6 +348,43 @@ def initialize( @expand = expand @purchase_details = purchase_details end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/issuing/authorization_create_params.rb b/lib/stripe/params/issuing/authorization_create_params.rb index ffefe1327..0f6ef45fd 100644 --- a/lib/stripe/params/issuing/authorization_create_params.rb +++ b/lib/stripe/params/issuing/authorization_create_params.rb @@ -52,6 +52,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -61,6 +65,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -73,6 +81,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -86,6 +101,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -107,6 +136,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams @@ -134,6 +182,10 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string } + end end class MerchantData < ::Stripe::RequestParams @@ -367,6 +419,34 @@ def initialize( @verification_data = verification_data @wallet = wallet end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + } + end end end end diff --git a/lib/stripe/params/issuing/authorization_finalize_amount_params.rb b/lib/stripe/params/issuing/authorization_finalize_amount_params.rb index 922551fbd..e7fcd1e16 100644 --- a/lib/stripe/params/issuing/authorization_finalize_amount_params.rb +++ b/lib/stripe/params/issuing/authorization_finalize_amount_params.rb @@ -40,6 +40,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -49,6 +53,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -61,6 +69,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -74,6 +89,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -95,6 +124,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams @@ -122,6 +170,10 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string } + end end # Specifies which fields in the response should be expanded. attr_accessor :expand @@ -138,6 +190,34 @@ def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil) @fleet = fleet @fuel = fuel end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + } + end end end end diff --git a/lib/stripe/params/issuing/transaction_create_force_capture_params.rb b/lib/stripe/params/issuing/transaction_create_force_capture_params.rb index 901a1b7d7..112eaead8 100644 --- a/lib/stripe/params/issuing/transaction_create_force_capture_params.rb +++ b/lib/stripe/params/issuing/transaction_create_force_capture_params.rb @@ -84,6 +84,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -93,6 +97,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -105,6 +113,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -118,6 +133,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -139,6 +168,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams @@ -223,6 +271,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams @@ -253,6 +308,10 @@ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) @total = total @unit_cost = unit_cost end + + def self.field_encodings + @field_encodings = { quantity: :decimal_string } + end end # Fleet-specific information for transactions using Fleet cards. attr_accessor :fleet @@ -282,6 +341,35 @@ def initialize( @receipt = receipt @reference = reference end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { kind: :array, element: { kind: :object, fields: { quantity: :decimal_string } } }, + } + end end # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). attr_accessor :amount @@ -311,6 +399,43 @@ def initialize( @merchant_data = merchant_data @purchase_details = purchase_details end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb b/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb index 775fc7e63..7999d2e27 100644 --- a/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb +++ b/lib/stripe/params/issuing/transaction_create_unlinked_refund_params.rb @@ -84,6 +84,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -93,6 +97,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -105,6 +113,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -118,6 +133,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -139,6 +168,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams @@ -223,6 +271,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams @@ -253,6 +308,10 @@ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) @total = total @unit_cost = unit_cost end + + def self.field_encodings + @field_encodings = { quantity: :decimal_string } + end end # Fleet-specific information for transactions using Fleet cards. attr_accessor :fleet @@ -282,6 +341,35 @@ def initialize( @receipt = receipt @reference = reference end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { kind: :array, element: { kind: :object, fields: { quantity: :decimal_string } } }, + } + end end # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). attr_accessor :amount @@ -311,6 +399,43 @@ def initialize( @merchant_data = merchant_data @purchase_details = purchase_details end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/order_create_params.rb b/lib/stripe/params/order_create_params.rb index 4364addeb..f8b3d0f78 100644 --- a/lib/stripe/params/order_create_params.rb +++ b/lib/stripe/params/order_create_params.rb @@ -115,6 +115,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class ProductData < ::Stripe::RequestParams @@ -226,6 +230,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class Payment < ::Stripe::RequestParams @@ -2057,5 +2067,17 @@ def initialize( @shipping_details = shipping_details @tax_details = tax_details end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/order_update_params.rb b/lib/stripe/params/order_update_params.rb index 8daf30418..ffc97ca4e 100644 --- a/lib/stripe/params/order_update_params.rb +++ b/lib/stripe/params/order_update_params.rb @@ -115,6 +115,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class ProductData < ::Stripe::RequestParams @@ -230,6 +234,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class Payment < ::Stripe::RequestParams @@ -2061,5 +2071,17 @@ def initialize( @shipping_details = shipping_details @tax_details = tax_details end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/payment_intent_confirm_params.rb b/lib/stripe/params/payment_intent_confirm_params.rb index 9c652613a..6a55c2977 100644 --- a/lib/stripe/params/payment_intent_confirm_params.rb +++ b/lib/stripe/params/payment_intent_confirm_params.rb @@ -5237,8 +5237,6 @@ def initialize(requested: nil) attr_accessor :transaction_purpose # Bank account verification method. attr_accessor :verification_method - # Preferred transaction settlement speed - attr_accessor :preferred_settlement_speed def initialize( financial_connections: nil, @@ -5247,8 +5245,7 @@ def initialize( setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ) @financial_connections = financial_connections @mandate_options = mandate_options @@ -5257,7 +5254,6 @@ def initialize( @target_date = target_date @transaction_purpose = transaction_purpose @verification_method = verification_method - @preferred_settlement_speed = preferred_settlement_speed end end diff --git a/lib/stripe/params/payment_intent_create_params.rb b/lib/stripe/params/payment_intent_create_params.rb index db2767b4e..c47dc6d93 100644 --- a/lib/stripe/params/payment_intent_create_params.rb +++ b/lib/stripe/params/payment_intent_create_params.rb @@ -5251,8 +5251,6 @@ def initialize(requested: nil) attr_accessor :transaction_purpose # Bank account verification method. attr_accessor :verification_method - # Preferred transaction settlement speed - attr_accessor :preferred_settlement_speed def initialize( financial_connections: nil, @@ -5261,8 +5259,7 @@ def initialize( setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ) @financial_connections = financial_connections @mandate_options = mandate_options @@ -5271,7 +5268,6 @@ def initialize( @target_date = target_date @transaction_purpose = transaction_purpose @verification_method = verification_method - @preferred_settlement_speed = preferred_settlement_speed end end diff --git a/lib/stripe/params/payment_intent_update_params.rb b/lib/stripe/params/payment_intent_update_params.rb index 433b31ea7..645a45184 100644 --- a/lib/stripe/params/payment_intent_update_params.rb +++ b/lib/stripe/params/payment_intent_update_params.rb @@ -5229,8 +5229,6 @@ def initialize(requested: nil) attr_accessor :transaction_purpose # Bank account verification method. attr_accessor :verification_method - # Preferred transaction settlement speed - attr_accessor :preferred_settlement_speed def initialize( financial_connections: nil, @@ -5239,8 +5237,7 @@ def initialize( setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ) @financial_connections = financial_connections @mandate_options = mandate_options @@ -5249,7 +5246,6 @@ def initialize( @target_date = target_date @transaction_purpose = transaction_purpose @verification_method = verification_method - @preferred_settlement_speed = preferred_settlement_speed end end diff --git a/lib/stripe/params/payment_link_create_params.rb b/lib/stripe/params/payment_link_create_params.rb index 9a925972f..9a97dcd95 100644 --- a/lib/stripe/params/payment_link_create_params.rb +++ b/lib/stripe/params/payment_link_create_params.rb @@ -431,6 +431,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. attr_accessor :adjustable_quantity @@ -447,6 +451,12 @@ def initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: @price_data = price_data @quantity = quantity end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class NameCollection < ::Stripe::RequestParams @@ -826,5 +836,17 @@ def initialize( @tax_id_collection = tax_id_collection @transfer_data = transfer_data end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/plan_create_params.rb b/lib/stripe/params/plan_create_params.rb index 189c0f1ca..81b4b5be5 100644 --- a/lib/stripe/params/plan_create_params.rb +++ b/lib/stripe/params/plan_create_params.rb @@ -80,6 +80,13 @@ def initialize( @unit_amount_decimal = unit_amount_decimal @up_to = up_to end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformUsage < ::Stripe::RequestParams @@ -169,5 +176,18 @@ def initialize( @trial_period_days = trial_period_days @usage_type = usage_type end + + def self.field_encodings + @field_encodings = { + amount_decimal: :decimal_string, + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + } + end end end diff --git a/lib/stripe/params/price_create_params.rb b/lib/stripe/params/price_create_params.rb index 6e633d21b..0fe238b4e 100644 --- a/lib/stripe/params/price_create_params.rb +++ b/lib/stripe/params/price_create_params.rb @@ -47,6 +47,13 @@ def initialize( @unit_amount_decimal = unit_amount_decimal @up_to = up_to end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_accessor :custom_unit_amount @@ -72,6 +79,19 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::RequestParams @@ -196,6 +216,13 @@ def initialize( @unit_amount_decimal = unit_amount_decimal @up_to = up_to end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformQuantity < ::Stripe::RequestParams @@ -289,5 +316,18 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end end diff --git a/lib/stripe/params/price_update_params.rb b/lib/stripe/params/price_update_params.rb index 1b9e7a7c2..291909567 100644 --- a/lib/stripe/params/price_update_params.rb +++ b/lib/stripe/params/price_update_params.rb @@ -47,6 +47,13 @@ def initialize( @unit_amount_decimal = unit_amount_decimal @up_to = up_to end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_accessor :custom_unit_amount @@ -72,6 +79,19 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class MigrateTo < ::Stripe::RequestParams diff --git a/lib/stripe/params/product_create_params.rb b/lib/stripe/params/product_create_params.rb index ea8aa16f0..79b3bc3e1 100644 --- a/lib/stripe/params/product_create_params.rb +++ b/lib/stripe/params/product_create_params.rb @@ -48,6 +48,13 @@ def initialize( @unit_amount_decimal = unit_amount_decimal @up_to = up_to end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_accessor :custom_unit_amount @@ -73,6 +80,22 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::RequestParams @@ -140,6 +163,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class MarketingFeature < ::Stripe::RequestParams @@ -255,5 +282,11 @@ def initialize( @unit_label = unit_label @url = url end + + def self.field_encodings + @field_encodings = { + default_price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end end diff --git a/lib/stripe/params/quote_create_params.rb b/lib/stripe/params/quote_create_params.rb index bab53a607..92c651044 100644 --- a/lib/stripe/params/quote_create_params.rb +++ b/lib/stripe/params/quote_create_params.rb @@ -872,6 +872,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The discounts applied to this line item. attr_accessor :discounts @@ -891,6 +895,12 @@ def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_r @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class SubscriptionData < ::Stripe::RequestParams @@ -1515,5 +1525,17 @@ def initialize( @test_clock = test_clock @transfer_data = transfer_data end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/quote_update_params.rb b/lib/stripe/params/quote_update_params.rb index 3a171a6fb..f6afabdf7 100644 --- a/lib/stripe/params/quote_update_params.rb +++ b/lib/stripe/params/quote_update_params.rb @@ -867,6 +867,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The discounts applied to this line item. attr_accessor :discounts @@ -896,6 +900,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class SubscriptionData < ::Stripe::RequestParams @@ -1484,5 +1494,17 @@ def initialize( @subscription_data_overrides = subscription_data_overrides @transfer_data = transfer_data end + + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/subscription_create_params.rb b/lib/stripe/params/subscription_create_params.rb index 1a97f9b17..9ebb157a5 100644 --- a/lib/stripe/params/subscription_create_params.rb +++ b/lib/stripe/params/subscription_create_params.rb @@ -107,6 +107,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The coupons to redeem into discounts for the item. attr_accessor :discounts @@ -140,6 +144,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class AutomaticTax < ::Stripe::RequestParams @@ -545,6 +555,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Trial < ::Stripe::RequestParams @@ -602,6 +616,12 @@ def initialize( @tax_rates = tax_rates @trial = trial end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class PaymentSettings < ::Stripe::RequestParams @@ -1101,5 +1121,24 @@ def initialize( @trial_period_days = trial_period_days @trial_settings = trial_settings end + + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/subscription_item_create_params.rb b/lib/stripe/params/subscription_item_create_params.rb index 31433e88d..77b2cacb7 100644 --- a/lib/stripe/params/subscription_item_create_params.rb +++ b/lib/stripe/params/subscription_item_create_params.rb @@ -159,6 +159,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Trial < ::Stripe::RequestParams @@ -242,5 +246,11 @@ def initialize( @tax_rates = tax_rates @trial = trial end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end end diff --git a/lib/stripe/params/subscription_item_update_params.rb b/lib/stripe/params/subscription_item_update_params.rb index 69a3518d6..f14b4e138 100644 --- a/lib/stripe/params/subscription_item_update_params.rb +++ b/lib/stripe/params/subscription_item_update_params.rb @@ -159,6 +159,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. attr_accessor :billing_thresholds @@ -226,5 +230,11 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end end diff --git a/lib/stripe/params/subscription_schedule_create_params.rb b/lib/stripe/params/subscription_schedule_create_params.rb index c7ebd1e13..6b78259a5 100644 --- a/lib/stripe/params/subscription_schedule_create_params.rb +++ b/lib/stripe/params/subscription_schedule_create_params.rb @@ -303,6 +303,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The coupons to redeem into discounts for the item. attr_accessor :discounts @@ -336,6 +340,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class AutomaticTax < ::Stripe::RequestParams @@ -651,6 +661,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Trial < ::Stripe::RequestParams @@ -708,6 +722,12 @@ def initialize( @trial = trial @trial_offer = trial_offer end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class PauseCollection < ::Stripe::RequestParams @@ -851,6 +871,25 @@ def initialize( @trial_end = trial_end @trial_settings = trial_settings end + + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams @@ -920,5 +959,36 @@ def initialize( @prebilling = prebilling @start_date = start_date end + + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + }, + }, + }, + } + end end end diff --git a/lib/stripe/params/subscription_schedule_update_params.rb b/lib/stripe/params/subscription_schedule_update_params.rb index ddfe116a5..1b40e8755 100644 --- a/lib/stripe/params/subscription_schedule_update_params.rb +++ b/lib/stripe/params/subscription_schedule_update_params.rb @@ -283,6 +283,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The coupons to redeem into discounts for the item. attr_accessor :discounts @@ -316,6 +320,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class AutomaticTax < ::Stripe::RequestParams @@ -631,6 +641,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class Trial < ::Stripe::RequestParams @@ -688,6 +702,12 @@ def initialize( @trial = trial @trial_offer = trial_offer end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class PauseCollection < ::Stripe::RequestParams @@ -835,6 +855,25 @@ def initialize( @trial_end = trial_end @trial_settings = trial_settings end + + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams @@ -888,5 +927,36 @@ def initialize( @prebilling = prebilling @proration_behavior = proration_behavior end + + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + }, + }, + }, + }, + }, + }, + } + end end end diff --git a/lib/stripe/params/subscription_update_params.rb b/lib/stripe/params/subscription_update_params.rb index 5defd2f54..ad9bb7934 100644 --- a/lib/stripe/params/subscription_update_params.rb +++ b/lib/stripe/params/subscription_update_params.rb @@ -107,6 +107,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # The coupons to redeem into discounts for the item. attr_accessor :discounts @@ -140,6 +144,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class AutomaticTax < ::Stripe::RequestParams @@ -516,6 +526,10 @@ def initialize( @unit_amount = unit_amount @unit_amount_decimal = unit_amount_decimal end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. attr_accessor :billing_thresholds @@ -569,6 +583,12 @@ def initialize( @quantity = quantity @tax_rates = tax_rates end + + def self.field_encodings + @field_encodings = { + price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, + } + end end class PauseCollection < ::Stripe::RequestParams @@ -1060,5 +1080,24 @@ def initialize( @trial_from_plan = trial_from_plan @trial_settings = trial_settings end + + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } }, + }, + }, + } + end end end diff --git a/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb b/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb index 5faa24f4b..86918604d 100644 --- a/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb +++ b/lib/stripe/params/test_helpers/issuing/authorization_capture_params.rb @@ -42,6 +42,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -51,6 +55,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -63,6 +71,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -76,6 +91,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -97,6 +126,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams @@ -181,6 +229,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams @@ -211,6 +266,10 @@ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) @total = total @unit_cost = unit_cost end + + def self.field_encodings + @field_encodings = { quantity: :decimal_string } + end end # Fleet-specific information for transactions using Fleet cards. attr_accessor :fleet @@ -240,6 +299,38 @@ def initialize( @receipt = receipt @reference = reference end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + } + end end # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). attr_accessor :capture_amount @@ -261,6 +352,43 @@ def initialize( @expand = expand @purchase_details = purchase_details end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb b/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb index af00bc463..76be04e8a 100644 --- a/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb +++ b/lib/stripe/params/test_helpers/issuing/authorization_create_params.rb @@ -53,6 +53,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -62,6 +66,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -74,6 +82,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -87,6 +102,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -108,6 +137,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams @@ -135,6 +183,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class MerchantData < ::Stripe::RequestParams @@ -368,6 +423,34 @@ def initialize( @verification_data = verification_data @wallet = wallet end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + } + end end end end diff --git a/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb b/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb index 43ea3a6bf..4dc7ea1bb 100644 --- a/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb +++ b/lib/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rb @@ -41,6 +41,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -50,6 +54,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -62,6 +70,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -75,6 +90,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -96,6 +125,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams @@ -123,6 +171,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end # Specifies which fields in the response should be expanded. attr_accessor :expand @@ -139,6 +194,34 @@ def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil) @fleet = fleet @fuel = fuel end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + } + end end end end diff --git a/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb b/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb index 16ea8c85f..701da2d0b 100644 --- a/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb +++ b/lib/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rb @@ -85,6 +85,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -94,6 +98,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -106,6 +114,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -119,6 +134,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -140,6 +169,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams @@ -224,6 +272,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams @@ -254,6 +309,10 @@ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) @total = total @unit_cost = unit_cost end + + def self.field_encodings + @field_encodings = { quantity: :decimal_string } + end end # Fleet-specific information for transactions using Fleet cards. attr_accessor :fleet @@ -283,6 +342,38 @@ def initialize( @receipt = receipt @reference = reference end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + } + end end # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). attr_accessor :amount @@ -312,6 +403,43 @@ def initialize( @merchant_data = merchant_data @purchase_details = purchase_details end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb b/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb index 8374ea6b2..ad4101253 100644 --- a/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb +++ b/lib/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rb @@ -85,6 +85,10 @@ class Fuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::RequestParams @@ -94,6 +98,10 @@ class NonFuel < ::Stripe::RequestParams def initialize(gross_amount_decimal: nil) @gross_amount_decimal = gross_amount_decimal end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::RequestParams @@ -106,6 +114,13 @@ def initialize(local_amount_decimal: nil, national_amount_decimal: nil) @local_amount_decimal = local_amount_decimal @national_amount_decimal = national_amount_decimal end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_accessor :fuel @@ -119,6 +134,20 @@ def initialize(fuel: nil, non_fuel: nil, tax: nil) @non_fuel = non_fuel @tax = tax end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_accessor :cardholder_prompt_data @@ -140,6 +169,25 @@ def initialize( @reported_breakdown = reported_breakdown @service_type = service_type end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams @@ -224,6 +272,13 @@ def initialize( @unit = unit @unit_cost_decimal = unit_cost_decimal end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams @@ -254,6 +309,10 @@ def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) @total = total @unit_cost = unit_cost end + + def self.field_encodings + @field_encodings = { quantity: :decimal_string } + end end # Fleet-specific information for transactions using Fleet cards. attr_accessor :fleet @@ -283,6 +342,38 @@ def initialize( @receipt = receipt @reference = reference end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + } + end end # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). attr_accessor :amount @@ -312,6 +403,43 @@ def initialize( @merchant_data = merchant_data @purchase_details = purchase_details end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + receipt: { + kind: :array, + element: { kind: :object, fields: { quantity: :decimal_string } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/collection_setting_create_params.rb b/lib/stripe/params/v2/billing/collection_setting_create_params.rb index 14bcc006f..b66013cf6 100644 --- a/lib/stripe/params/v2/billing/collection_setting_create_params.rb +++ b/lib/stripe/params/v2/billing/collection_setting_create_params.rb @@ -69,6 +69,10 @@ def initialize(amount: nil, amount_type: nil, description: nil) @amount_type = amount_type @description = description end + + def self.field_encodings + @field_encodings = { amount: :int64_string } + end end # Configuration options for setting up an eMandate for cards issued in India. attr_accessor :mandate_options @@ -85,6 +89,10 @@ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil) @network = network @request_three_d_secure = request_three_d_secure end + + def self.field_encodings + @field_encodings = { mandate_options: { kind: :object, fields: { amount: :int64_string } } } + end end class CustomerBalance < ::Stripe::RequestParams @@ -183,6 +191,15 @@ def initialize( @sepa_debit = sepa_debit @us_bank_account = us_bank_account end + + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -217,6 +234,20 @@ def initialize( @payment_method_configuration = payment_method_configuration @payment_method_options = payment_method_options end + + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/collection_setting_update_params.rb b/lib/stripe/params/v2/billing/collection_setting_update_params.rb index d2313062f..ddac8b12b 100644 --- a/lib/stripe/params/v2/billing/collection_setting_update_params.rb +++ b/lib/stripe/params/v2/billing/collection_setting_update_params.rb @@ -69,6 +69,10 @@ def initialize(amount: nil, amount_type: nil, description: nil) @amount_type = amount_type @description = description end + + def self.field_encodings + @field_encodings = { amount: :int64_string } + end end # Configuration options for setting up an eMandate for cards issued in India. attr_accessor :mandate_options @@ -85,6 +89,10 @@ def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil) @network = network @request_three_d_secure = request_three_d_secure end + + def self.field_encodings + @field_encodings = { mandate_options: { kind: :object, fields: { amount: :int64_string } } } + end end class CustomerBalance < ::Stripe::RequestParams @@ -183,6 +191,15 @@ def initialize( @sepa_debit = sepa_debit @us_bank_account = us_bank_account end + + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -223,6 +240,20 @@ def initialize( @payment_method_configuration = payment_method_configuration @payment_method_options = payment_method_options end + + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/intent_create_params.rb b/lib/stripe/params/v2/billing/intent_create_params.rb index e208229b8..732e99240 100644 --- a/lib/stripe/params/v2/billing/intent_create_params.rb +++ b/lib/stripe/params/v2/billing/intent_create_params.rb @@ -7,11 +7,29 @@ module Billing class IntentCreateParams < ::Stripe::RequestParams class Action < ::Stripe::RequestParams class Apply < ::Stripe::RequestParams + class Discount < ::Stripe::RequestParams + # The ID of the Coupon to apply. + attr_accessor :coupon + # The ID of the PromotionCode to apply. + attr_accessor :promotion_code + # Type of the discount. + attr_accessor :type + + def initialize(coupon: nil, promotion_code: nil, type: nil) + @coupon = coupon + @promotion_code = promotion_code + @type = type + end + end + class EffectiveAt < ::Stripe::RequestParams + # The timestamp at which the apply action will take effect. Only present if type is timestamp. Only allowed for discount actions. + attr_accessor :timestamp # When the apply action will take effect. attr_accessor :type - def initialize(type: nil) + def initialize(timestamp: nil, type: nil) + @timestamp = timestamp @type = type end end @@ -35,6 +53,10 @@ def initialize(maximum_applications: nil, percent_off: nil) @maximum_applications = maximum_applications @percent_off = percent_off end + + def self.field_encodings + @field_encodings = { percent_off: :decimal_string } + end end # The entity that the discount rule applies to, for example, the cadence. attr_accessor :applies_to @@ -48,6 +70,12 @@ def initialize(applies_to: nil, type: nil, percent_off: nil) @type = type @percent_off = percent_off end + + def self.field_encodings + @field_encodings = { + percent_off: { kind: :object, fields: { percent_off: :decimal_string } }, + } + end end class SpendModifierRule < ::Stripe::RequestParams @@ -82,7 +110,7 @@ def initialize(id: nil) end # The maximum amount allowed for the billing period. attr_accessor :amount - # The configration for the overage rate for the custom pricing unit. + # The configuration for the overage rate for the custom pricing unit. attr_accessor :custom_pricing_unit_overage_rate def initialize(amount: nil, custom_pricing_unit_overage_rate: nil) @@ -103,10 +131,12 @@ def initialize(applies_to: nil, type: nil, max_billing_period_spend: nil) @max_billing_period_spend = max_billing_period_spend end end - # When the apply action will take effect. Defaults to on_reserve if not specified. + # When the apply action will take effect. If not specified, defaults to on_reserve. attr_accessor :effective_at # Type of the apply action details. attr_accessor :type + # Details for applying a discount. + attr_accessor :discount # Details for applying a discount rule to future invoices. attr_accessor :invoice_discount_rule # Details for applying a spend modifier rule. Only present if type is spend_modifier_rule. @@ -115,14 +145,25 @@ def initialize(applies_to: nil, type: nil, max_billing_period_spend: nil) def initialize( effective_at: nil, type: nil, + discount: nil, invoice_discount_rule: nil, spend_modifier_rule: nil ) @effective_at = effective_at @type = type + @discount = discount @invoice_discount_rule = invoice_discount_rule @spend_modifier_rule = spend_modifier_rule end + + def self.field_encodings + @field_encodings = { + invoice_discount_rule: { + kind: :object, + fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, + }, + } + end end class Deactivate < ::Stripe::RequestParams @@ -329,7 +370,7 @@ def initialize(type: nil) @type = type end end - # When the remove action will take effect. Defaults to on_reserve if not specified. + # When the remove action will take effect. If not specified, defaults to on_reserve. attr_accessor :effective_at # Type of the remove action. attr_accessor :type @@ -439,7 +480,7 @@ class Item < ::Stripe::RequestParams attr_accessor :metadata # The ID of the price object. attr_accessor :price - # Quantity for this item. If not provided, will default to 1. + # Quantity for this item. If not provided, defaults to 1. attr_accessor :quantity def initialize(metadata: nil, price: nil, quantity: nil) @@ -515,6 +556,20 @@ def initialize( @remove = remove @subscribe = subscribe end + + def self.field_encodings + @field_encodings = { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, + }, + }, + }, + } + end end class CadenceData < ::Stripe::RequestParams @@ -776,17 +831,44 @@ def initialize(billing_cycle: nil, payer: nil, settings: nil) attr_accessor :actions # Three-letter ISO currency code, in lowercase. Must be a supported currency. attr_accessor :currency + # Select additional fields to include in the response. + attr_accessor :include # ID of an existing Cadence to use. attr_accessor :cadence # Data for creating a new Cadence. attr_accessor :cadence_data - def initialize(actions: nil, currency: nil, cadence: nil, cadence_data: nil) + def initialize(actions: nil, currency: nil, include: nil, cadence: nil, cadence_data: nil) @actions = actions @currency = currency + @include = include @cadence = cadence @cadence_data = cadence_data end + + def self.field_encodings + @field_encodings = { + actions: { + kind: :array, + element: { + kind: :object, + fields: { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: { + percent_off: { kind: :object, fields: { percent_off: :decimal_string } }, + }, + }, + }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/intent_reserve_params.rb b/lib/stripe/params/v2/billing/intent_reserve_params.rb index 6259af0d6..d690b0900 100644 --- a/lib/stripe/params/v2/billing/intent_reserve_params.rb +++ b/lib/stripe/params/v2/billing/intent_reserve_params.rb @@ -4,7 +4,14 @@ module Stripe module V2 module Billing - class IntentReserveParams < ::Stripe::RequestParams; end + class IntentReserveParams < ::Stripe::RequestParams + # Select additional fields to include in the response. + attr_accessor :include + + def initialize(include: nil) + @include = include + end + end end end end diff --git a/lib/stripe/params/v2/billing/license_fee_create_params.rb b/lib/stripe/params/v2/billing/license_fee_create_params.rb index 498ad4e24..53701c582 100644 --- a/lib/stripe/params/v2/billing/license_fee_create_params.rb +++ b/lib/stripe/params/v2/billing/license_fee_create_params.rb @@ -23,6 +23,10 @@ def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf @up_to_decimal = up_to_decimal @up_to_inf = up_to_inf end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end end class TransformQuantity < ::Stripe::RequestParams @@ -35,6 +39,10 @@ def initialize(divide_by: nil, round: nil) @divide_by = divide_by @round = round end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end end # Three-letter ISO currency code, in lowercase. Must be a supported currency. attr_accessor :currency @@ -97,6 +105,16 @@ def initialize( @transform_quantity = transform_quantity @unit_amount = unit_amount end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/license_fee_update_params.rb b/lib/stripe/params/v2/billing/license_fee_update_params.rb index 53e6f5005..01a11bce1 100644 --- a/lib/stripe/params/v2/billing/license_fee_update_params.rb +++ b/lib/stripe/params/v2/billing/license_fee_update_params.rb @@ -23,6 +23,10 @@ def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf @up_to_decimal = up_to_decimal @up_to_inf = up_to_inf end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end end class TransformQuantity < ::Stripe::RequestParams @@ -35,6 +39,10 @@ def initialize(divide_by: nil, round: nil) @divide_by = divide_by @round = round end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end end # A customer-facing name for the License Fee. # This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. @@ -78,6 +86,16 @@ def initialize( @transform_quantity = transform_quantity @unit_amount = unit_amount end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/licensed_item_create_params.rb b/lib/stripe/params/v2/billing/licensed_item_create_params.rb index acaee9539..54c2fc607 100644 --- a/lib/stripe/params/v2/billing/licensed_item_create_params.rb +++ b/lib/stripe/params/v2/billing/licensed_item_create_params.rb @@ -16,8 +16,8 @@ def initialize(tax_code: nil) # Description that customers will see in the invoice line item. # Maximum length of 250 characters. attr_accessor :display_name - # An internal key you can use to search for a particular billable item. - # Must be unique among billable items. + # An internal key you can use to search for a particular licensed item. + # Must be unique among licensed items. # Maximum length of 200 characters. attr_accessor :lookup_key # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/lib/stripe/params/v2/billing/licensed_item_update_params.rb b/lib/stripe/params/v2/billing/licensed_item_update_params.rb index ed1b91eb4..63912cc40 100644 --- a/lib/stripe/params/v2/billing/licensed_item_update_params.rb +++ b/lib/stripe/params/v2/billing/licensed_item_update_params.rb @@ -16,7 +16,7 @@ def initialize(tax_code: nil) # Description that customers will see in the invoice line item. # Maximum length of 250 characters. attr_accessor :display_name - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular licensed item. # Maximum length of 200 characters. # To remove the lookup_key from the object, set it to null in the request. attr_accessor :lookup_key diff --git a/lib/stripe/params/v2/billing/metered_item_create_params.rb b/lib/stripe/params/v2/billing/metered_item_create_params.rb index bae454b8f..23c567b16 100644 --- a/lib/stripe/params/v2/billing/metered_item_create_params.rb +++ b/lib/stripe/params/v2/billing/metered_item_create_params.rb @@ -30,8 +30,8 @@ def initialize(tax_code: nil) attr_accessor :display_name # Optional array of Meter dimensions to group event dimension keys for invoice line items. attr_accessor :invoice_presentation_dimensions - # An internal key you can use to search for a particular billable item. - # Must be unique among billable items. + # An internal key you can use to search for a particular metered item. + # Must be unique among metered items. # Maximum length of 200 characters. attr_accessor :lookup_key # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/lib/stripe/params/v2/billing/metered_item_update_params.rb b/lib/stripe/params/v2/billing/metered_item_update_params.rb index c8ca02ed4..af71fea50 100644 --- a/lib/stripe/params/v2/billing/metered_item_update_params.rb +++ b/lib/stripe/params/v2/billing/metered_item_update_params.rb @@ -16,7 +16,7 @@ def initialize(tax_code: nil) # Description that customers will see in the invoice line item. # Maximum length of 250 characters. attr_accessor :display_name - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular metered item. # Maximum length of 200 characters. # To remove the lookup_key from the object, set it to null in the request. attr_accessor :lookup_key diff --git a/lib/stripe/params/v2/billing/one_time_item_create_params.rb b/lib/stripe/params/v2/billing/one_time_item_create_params.rb index 9d79dc56d..a784c8692 100644 --- a/lib/stripe/params/v2/billing/one_time_item_create_params.rb +++ b/lib/stripe/params/v2/billing/one_time_item_create_params.rb @@ -17,7 +17,7 @@ def initialize(tax_code: nil) # Maximum length of 250 characters. attr_accessor :display_name # An internal key you can use to search for a particular one-time item. - # Must be unique among billable items. + # Must be unique among one-time items. # Maximum length of 200 characters. attr_accessor :lookup_key # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/lib/stripe/params/v2/billing/pricing_plan_subscription_list_params.rb b/lib/stripe/params/v2/billing/pricing_plan_subscription_list_params.rb index 78b4b9958..a8f6cc45d 100644 --- a/lib/stripe/params/v2/billing/pricing_plan_subscription_list_params.rb +++ b/lib/stripe/params/v2/billing/pricing_plan_subscription_list_params.rb @@ -18,19 +18,22 @@ def initialize(customer: nil, type: nil) end # Filter by Billing Cadence ID. Mutually exclusive with `payer`, `pricing_plan`, and `pricing_plan_version`. attr_accessor :billing_cadence + # Expand to include additional data such as discount_details, billing_cadence_details, or pricing_plan_component_details. + attr_accessor :include # Optionally set the maximum number of results per page. Defaults to 20. attr_accessor :limit # Filter by payer. Mutually exclusive with `billing_cadence`, `pricing_plan`, and `pricing_plan_version`. attr_accessor :payer - # Filter by PricingPlan ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan_version`. + # Filter by PricingPlan ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan_version`. attr_accessor :pricing_plan - # Filter by Pricing Plan Version ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan`. + # Filter by Pricing Plan Version ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan`. attr_accessor :pricing_plan_version # Filter by servicing status. attr_accessor :servicing_status def initialize( billing_cadence: nil, + include: nil, limit: nil, payer: nil, pricing_plan: nil, @@ -38,6 +41,7 @@ def initialize( servicing_status: nil ) @billing_cadence = billing_cadence + @include = include @limit = limit @payer = payer @pricing_plan = pricing_plan diff --git a/lib/stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params.rb b/lib/stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params.rb new file mode 100644 index 000000000..3bc3f02dd --- /dev/null +++ b/lib/stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params.rb @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Billing + class PricingPlanSubscriptionRemoveDiscountsParams < ::Stripe::RequestParams + # Expand to include additional data such as discount_details. + attr_accessor :include + + def initialize(include: nil) + @include = include + end + end + end + end +end diff --git a/lib/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rb b/lib/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rb index db68f663b..c77f3dd96 100644 --- a/lib/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rb +++ b/lib/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rb @@ -4,7 +4,14 @@ module Stripe module V2 module Billing - class PricingPlanSubscriptionRetrieveParams < ::Stripe::RequestParams; end + class PricingPlanSubscriptionRetrieveParams < ::Stripe::RequestParams + # Expand to include additional data such as discount_details. + attr_accessor :include + + def initialize(include: nil) + @include = include + end + end end end end diff --git a/lib/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rb b/lib/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rb deleted file mode 100644 index 594c45b4e..000000000 --- a/lib/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rb +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - module V2 - module Billing - module PricingPlanSubscriptions - class ComponentRetrieveParams < ::Stripe::RequestParams; end - end - end - end -end diff --git a/lib/stripe/params/v2/billing/pricing_plans/component_create_params.rb b/lib/stripe/params/v2/billing/pricing_plans/component_create_params.rb index 6e71ff4d6..d3564037a 100644 --- a/lib/stripe/params/v2/billing/pricing_plans/component_create_params.rb +++ b/lib/stripe/params/v2/billing/pricing_plans/component_create_params.rb @@ -9,7 +9,7 @@ class ComponentCreateParams < ::Stripe::RequestParams class LicenseFee < ::Stripe::RequestParams # The ID of the License Fee. attr_accessor :id - # The version of the LicenseFee. Defaults to 'latest', if not specified. + # The ID of the License Fee Version. If not specified, defaults to 'latest'. attr_accessor :version def initialize(id: nil, version: nil) @@ -21,7 +21,7 @@ def initialize(id: nil, version: nil) class RateCard < ::Stripe::RequestParams # The ID of the Rate Card. attr_accessor :id - # The version of the RateCard. Defaults to 'latest', if not specified. + # The ID of the Rate Card Version. If not specified, defaults to 'latest'. attr_accessor :version def initialize(id: nil, version: nil) diff --git a/lib/stripe/params/v2/billing/rate_card_modify_rates_params.rb b/lib/stripe/params/v2/billing/rate_card_modify_rates_params.rb new file mode 100644 index 000000000..d09d3b5a4 --- /dev/null +++ b/lib/stripe/params/v2/billing/rate_card_modify_rates_params.rb @@ -0,0 +1,177 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Billing + class RateCardModifyRatesParams < ::Stripe::RequestParams + class RatesToCreate < ::Stripe::RequestParams + class MeteredItemData < ::Stripe::RequestParams + class MeterSegmentCondition < ::Stripe::RequestParams + # A Meter dimension. + attr_accessor :dimension + # To count usage towards this metered item, the dimension must have this value. + attr_accessor :value + + def initialize(dimension: nil, value: nil) + @dimension = dimension + @value = value + end + end + # Description that customers will see in the invoice line item. + # Maximum length of 250 characters. + attr_accessor :display_name + # An internal key you can use to search for a particular metered item. + # Must be unique among metered items. + # Maximum length of 200 characters. + attr_accessor :lookup_key + # ID of the Meter that measures usage for this Metered Item. + attr_accessor :meter + # Optional array of Meter segments to filter event dimension keys for billing. + attr_accessor :meter_segment_conditions + # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + # to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 + # million events". + # Maximum length of 100 characters. + attr_accessor :unit_label + + def initialize( + display_name: nil, + lookup_key: nil, + meter: nil, + meter_segment_conditions: nil, + unit_label: nil + ) + @display_name = display_name + @lookup_key = lookup_key + @meter = meter + @meter_segment_conditions = meter_segment_conditions + @unit_label = unit_label + end + end + + class Tier < ::Stripe::RequestParams + # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + attr_accessor :flat_amount + # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + # most 12 decimal places. + attr_accessor :unit_amount + # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + # be set. + attr_accessor :up_to_decimal + # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + attr_accessor :up_to_inf + + def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf: nil) + @flat_amount = flat_amount + @unit_amount = unit_amount + @up_to_decimal = up_to_decimal + @up_to_inf = up_to_inf + end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end + end + + class TransformQuantity < ::Stripe::RequestParams + # Divide usage by this number. + attr_accessor :divide_by + # After division, round the result up or down. + attr_accessor :round + + def initialize(divide_by: nil, round: nil) + @divide_by = divide_by + @round = round + end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end + end + # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The Metered Item that this rate binds to. Cannot be set if `metered_item_data` is provided, and must be set if it isn't. + attr_accessor :metered_item + # The data to create a metered item that binds to this rate. Cannot be set if `metered_item` is provided, and must be set if it isn't. + attr_accessor :metered_item_data + # Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum + # quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity + # grows into new tiers. Can only be set if `tiers` is set. + attr_accessor :tiering_mode + # Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. + attr_accessor :tiers + # Apply a transformation to the reported usage or set quantity before computing the amount billed. + attr_accessor :transform_quantity + # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal + # places. Cannot be set if `tiers` is provided. + attr_accessor :unit_amount + + def initialize( + metadata: nil, + metered_item: nil, + metered_item_data: nil, + tiering_mode: nil, + tiers: nil, + transform_quantity: nil, + unit_amount: nil + ) + @metadata = metadata + @metered_item = metered_item + @metered_item_data = metered_item_data + @tiering_mode = tiering_mode + @tiers = tiers + @transform_quantity = transform_quantity + @unit_amount = unit_amount + end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end + end + + class RatesToDelete < ::Stripe::RequestParams + # The ID of the RateCard rate to delete. + attr_accessor :id + + def initialize(id: nil) + @id = id + end + end + # The list of RateCard rates to create or update. Maximum of 100 rates. + attr_accessor :rates_to_create + # The list of RateCard rates to delete. Maximum of 100 rates. + attr_accessor :rates_to_delete + + def initialize(rates_to_create: nil, rates_to_delete: nil) + @rates_to_create = rates_to_create + @rates_to_delete = rates_to_delete + end + + def self.field_encodings + @field_encodings = { + rates_to_create: { + kind: :array, + element: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + }, + }, + }, + } + end + end + end + end +end diff --git a/lib/stripe/params/v2/billing/rate_card_subscription_list_params.rb b/lib/stripe/params/v2/billing/rate_card_subscription_list_params.rb index 625bbd040..60c1887f9 100644 --- a/lib/stripe/params/v2/billing/rate_card_subscription_list_params.rb +++ b/lib/stripe/params/v2/billing/rate_card_subscription_list_params.rb @@ -18,7 +18,7 @@ def initialize(customer: nil, type: nil) end # Optionally filter by a BillingCadence. Mutually exclusive with `payers`, `rate_card`, and `rate_card_version`. attr_accessor :billing_cadence - # The page size limit, if not provided the default is 20. + # The page size limit. Defaults to 20. attr_accessor :limit # Optionally filter by the payer associated with Billing Cadences which the Rate Card Subscriptions are subscribed to. # Mutually exclusive with `billing_cadence`, `rate_card`, and `rate_card_version`. diff --git a/lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb b/lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb index 97cd4ff9f..a770ea3b8 100644 --- a/lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb +++ b/lib/stripe/params/v2/billing/rate_cards/rate_create_params.rb @@ -36,6 +36,10 @@ def initialize(flat_amount: nil, unit_amount: nil, up_to_decimal: nil, up_to_inf @up_to_decimal = up_to_decimal @up_to_inf = up_to_inf end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end end class TransformQuantity < ::Stripe::RequestParams @@ -48,6 +52,10 @@ def initialize(divide_by: nil, round: nil) @divide_by = divide_by @round = round end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end end # The custom pricing unit that this rate binds to. One of `unit_amount`, `tiers`, or `custom_pricing_unit_amount` is required. attr_accessor :custom_pricing_unit_amount @@ -84,6 +92,16 @@ def initialize( @transform_quantity = transform_quantity @unit_amount = unit_amount end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/service_action_create_params.rb b/lib/stripe/params/v2/billing/service_action_create_params.rb index 58c0c9cf5..445808045 100644 --- a/lib/stripe/params/v2/billing/service_action_create_params.rb +++ b/lib/stripe/params/v2/billing/service_action_create_params.rb @@ -17,17 +17,9 @@ def initialize(id: nil, value: nil) @id = id @value = value end - end - - class Monetary < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - def initialize(value: nil, currency: nil) - @value = value - @currency = currency + def self.field_encodings + @field_encodings = { value: :decimal_string } end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -42,6 +34,12 @@ def initialize(type: nil, custom_pricing_unit: nil, monetary: nil) @custom_pricing_unit = custom_pricing_unit @monetary = monetary end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams @@ -100,6 +98,15 @@ def initialize( @name = name @priority = priority end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class CreditGrantPerTenant < ::Stripe::RequestParams @@ -114,17 +121,9 @@ def initialize(id: nil, value: nil) @id = id @value = value end - end - class Monetary < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency + def self.field_encodings + @field_encodings = { value: :decimal_string } end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -139,6 +138,12 @@ def initialize(type: nil, custom_pricing_unit: nil, monetary: nil) @custom_pricing_unit = custom_pricing_unit @monetary = monetary end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams @@ -243,6 +248,15 @@ def initialize( @name = name @priority = priority end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end # An internal key you can use to search for this service action. Maximum length of 200 characters. attr_accessor :lookup_key @@ -272,6 +286,29 @@ def initialize( @credit_grant = credit_grant @credit_grant_per_tenant = credit_grant_per_tenant end + + def self.field_encodings + @field_encodings = { + credit_grant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + credit_grant_per_tenant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/core/account_create_params.rb b/lib/stripe/params/v2/core/account_create_params.rb index f11023289..5e0b18997 100644 --- a/lib/stripe/params/v2/core/account_create_params.rb +++ b/lib/stripe/params/v2/core/account_create_params.rb @@ -1723,12 +1723,21 @@ def initialize(fees_collector: nil, losses_collector: nil) attr_accessor :profile # Default responsibilities held by either Stripe or the platform. attr_accessor :responsibilities + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + attr_accessor :timezone - def initialize(currency: nil, locales: nil, profile: nil, responsibilities: nil) + def initialize( + currency: nil, + locales: nil, + profile: nil, + responsibilities: nil, + timezone: nil + ) @currency = currency @locales = locales @profile = profile @responsibilities = responsibilities + @timezone = timezone end end @@ -2731,17 +2740,6 @@ def initialize( end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # A non-negative integer representing the amount in the smallest currency unit. attr_accessor :amount # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -2946,17 +2944,6 @@ def initialize(registrar: nil, type: nil, value: nil) end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # A non-negative integer representing the amount in the smallest currency unit. attr_accessor :amount @@ -3400,6 +3387,10 @@ def initialize( @percent_ownership = percent_ownership @title = title end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::RequestParams @@ -3589,6 +3580,12 @@ def initialize( @script_names = script_names @surname = surname end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. attr_accessor :attestations @@ -3614,6 +3611,17 @@ def initialize( @entity_type = entity_type @individual = individual end + + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + } + end end # The account token generated by the account token api. attr_accessor :account_token @@ -3659,6 +3667,22 @@ def initialize( @include = include @metadata = metadata end + + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/core/account_evaluation_create_params.rb b/lib/stripe/params/v2/core/account_evaluation_create_params.rb new file mode 100644 index 000000000..d6c2c75d4 --- /dev/null +++ b/lib/stripe/params/v2/core/account_evaluation_create_params.rb @@ -0,0 +1,73 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + class AccountEvaluationCreateParams < ::Stripe::RequestParams + class AccountData < ::Stripe::RequestParams + class Defaults < ::Stripe::RequestParams + class Profile < ::Stripe::RequestParams + # The business URL. + attr_accessor :business_url + # Doing business as (DBA) name. + attr_accessor :doing_business_as + # Description of the account's product or service. + attr_accessor :product_description + + def initialize(business_url: nil, doing_business_as: nil, product_description: nil) + @business_url = business_url + @doing_business_as = doing_business_as + @product_description = product_description + end + end + # Account profile data. + attr_accessor :profile + + def initialize(profile: nil) + @profile = profile + end + end + + class Identity < ::Stripe::RequestParams + class BusinessDetails < ::Stripe::RequestParams + # Registered business name. + attr_accessor :registered_name + + def initialize(registered_name: nil) + @registered_name = registered_name + end + end + # Business details for identity data. + attr_accessor :business_details + + def initialize(business_details: nil) + @business_details = business_details + end + end + # Default account settings. + attr_accessor :defaults + # Identity data. + attr_accessor :identity + + def initialize(defaults: nil, identity: nil) + @defaults = defaults + @identity = identity + end + end + # The account ID to evaluate. Exactly one of account or account_data must be provided. + attr_accessor :account + # Account data for entity-less evaluation. Exactly one of account or account_data must be provided. + attr_accessor :account_data + # List of signals to evaluate. + attr_accessor :signals + + def initialize(account: nil, account_data: nil, signals: nil) + @account = account + @account_data = account_data + @signals = signals + end + end + end + end +end diff --git a/lib/stripe/params/v2/core/account_token_create_params.rb b/lib/stripe/params/v2/core/account_token_create_params.rb index 840175a49..1965ca0f3 100644 --- a/lib/stripe/params/v2/core/account_token_create_params.rb +++ b/lib/stripe/params/v2/core/account_token_create_params.rb @@ -380,17 +380,6 @@ def initialize( end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # A non-negative integer representing the amount in the smallest currency unit. attr_accessor :amount # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -595,17 +584,6 @@ def initialize(registrar: nil, type: nil, value: nil) end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # A non-negative integer representing the amount in the smallest currency unit. attr_accessor :amount @@ -1049,6 +1027,10 @@ def initialize( @percent_ownership = percent_ownership @title = title end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::RequestParams @@ -1238,6 +1220,12 @@ def initialize( @script_names = script_names @surname = surname end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. attr_accessor :attestations @@ -1259,6 +1247,17 @@ def initialize( @entity_type = entity_type @individual = individual end + + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + } + end end # The default contact email address for the Account. Required when configuring the account as a merchant or recipient. attr_accessor :contact_email @@ -1275,6 +1274,22 @@ def initialize(contact_email: nil, contact_phone: nil, display_name: nil, identi @display_name = display_name @identity = identity end + + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/core/account_update_params.rb b/lib/stripe/params/v2/core/account_update_params.rb index 1caabdf50..d53fb3165 100644 --- a/lib/stripe/params/v2/core/account_update_params.rb +++ b/lib/stripe/params/v2/core/account_update_params.rb @@ -1755,12 +1755,21 @@ def initialize(fees_collector: nil, losses_collector: nil) attr_accessor :profile # Default responsibilities held by either Stripe or the platform. attr_accessor :responsibilities + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + attr_accessor :timezone - def initialize(currency: nil, locales: nil, profile: nil, responsibilities: nil) + def initialize( + currency: nil, + locales: nil, + profile: nil, + responsibilities: nil, + timezone: nil + ) @currency = currency @locales = locales @profile = profile @responsibilities = responsibilities + @timezone = timezone end end @@ -2763,17 +2772,6 @@ def initialize( end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # A non-negative integer representing the amount in the smallest currency unit. attr_accessor :amount # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -2978,17 +2976,6 @@ def initialize(registrar: nil, type: nil, value: nil) end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # A non-negative integer representing the amount in the smallest currency unit. attr_accessor :amount @@ -3432,6 +3419,10 @@ def initialize( @percent_ownership = percent_ownership @title = title end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::RequestParams @@ -3621,6 +3612,12 @@ def initialize( @script_names = script_names @surname = surname end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. attr_accessor :attestations @@ -3646,6 +3643,17 @@ def initialize( @entity_type = entity_type @individual = individual end + + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + } + end end # The account token generated by the account token api. attr_accessor :account_token @@ -3691,6 +3699,22 @@ def initialize( @include = include @metadata = metadata end + + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/core/accounts/person_create_params.rb b/lib/stripe/params/v2/core/accounts/person_create_params.rb index 1bf64686b..2972a523a 100644 --- a/lib/stripe/params/v2/core/accounts/person_create_params.rb +++ b/lib/stripe/params/v2/core/accounts/person_create_params.rb @@ -293,6 +293,10 @@ def initialize( @representative = representative @title = title end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::RequestParams @@ -490,6 +494,12 @@ def initialize( @script_names = script_names @surname = surname end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end end end diff --git a/lib/stripe/params/v2/core/accounts/person_token_create_params.rb b/lib/stripe/params/v2/core/accounts/person_token_create_params.rb index 50b5f38f7..001edaea8 100644 --- a/lib/stripe/params/v2/core/accounts/person_token_create_params.rb +++ b/lib/stripe/params/v2/core/accounts/person_token_create_params.rb @@ -287,6 +287,10 @@ def initialize( @representative = representative @title = title end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::RequestParams @@ -480,6 +484,12 @@ def initialize( @script_names = script_names @surname = surname end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end end end diff --git a/lib/stripe/params/v2/core/accounts/person_update_params.rb b/lib/stripe/params/v2/core/accounts/person_update_params.rb index 4b6593d43..342f2a9e4 100644 --- a/lib/stripe/params/v2/core/accounts/person_update_params.rb +++ b/lib/stripe/params/v2/core/accounts/person_update_params.rb @@ -293,6 +293,10 @@ def initialize( @representative = representative @title = title end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::RequestParams @@ -490,6 +494,12 @@ def initialize( @script_names = script_names @surname = surname end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end end end diff --git a/lib/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rb b/lib/stripe/params/v2/core/batch_job_cancel_params.rb similarity index 53% rename from lib/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rb rename to lib/stripe/params/v2/core/batch_job_cancel_params.rb index f8841006d..68443ca3c 100644 --- a/lib/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rb +++ b/lib/stripe/params/v2/core/batch_job_cancel_params.rb @@ -3,8 +3,8 @@ module Stripe module V2 - module Billing - class LicenseFeeSubscriptionRetrieveParams < ::Stripe::RequestParams; end + module Core + class BatchJobCancelParams < ::Stripe::RequestParams; end end end end diff --git a/lib/stripe/params/v2/core/batch_job_create_params.rb b/lib/stripe/params/v2/core/batch_job_create_params.rb new file mode 100644 index 000000000..1f639d491 --- /dev/null +++ b/lib/stripe/params/v2/core/batch_job_create_params.rb @@ -0,0 +1,58 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + class BatchJobCreateParams < ::Stripe::RequestParams + class Endpoint < ::Stripe::RequestParams + # The HTTP method to use when calling the endpoint. + attr_accessor :http_method + # The path of the endpoint to run this batch job against. + # In the form used in the documentation. For instance, for + # subscription migration this would be `/v1/subscriptions/:id/migrate`. + attr_accessor :path + + def initialize(http_method: nil, path: nil) + @http_method = http_method + @path = path + end + end + + class NotificationSuppression < ::Stripe::RequestParams + # The scope of notification suppression. + attr_accessor :scope + + def initialize(scope: nil) + @scope = scope + end + end + # The endpoint configuration for the batch job. + attr_accessor :endpoint + # Optional field that allows the user to control how fast they want this batch job to run. + # Gives them a control over the number of webhooks they receive. + attr_accessor :maximum_rps + # The metadata of the `BatchJob` object. + attr_accessor :metadata + # Notification suppression settings for the batch job. + attr_accessor :notification_suppression + # Allows the user to skip validation. + attr_accessor :skip_validation + + def initialize( + endpoint: nil, + maximum_rps: nil, + metadata: nil, + notification_suppression: nil, + skip_validation: nil + ) + @endpoint = endpoint + @maximum_rps = maximum_rps + @metadata = metadata + @notification_suppression = notification_suppression + @skip_validation = skip_validation + end + end + end + end +end diff --git a/lib/stripe/params/v2/core/batch_job_retrieve_params.rb b/lib/stripe/params/v2/core/batch_job_retrieve_params.rb new file mode 100644 index 000000000..eb146a720 --- /dev/null +++ b/lib/stripe/params/v2/core/batch_job_retrieve_params.rb @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + class BatchJobRetrieveParams < ::Stripe::RequestParams; end + end + end +end diff --git a/lib/stripe/params/v2/core/event_destination_create_params.rb b/lib/stripe/params/v2/core/event_destination_create_params.rb index a5ed754fa..febf55d29 100644 --- a/lib/stripe/params/v2/core/event_destination_create_params.rb +++ b/lib/stripe/params/v2/core/event_destination_create_params.rb @@ -17,6 +17,25 @@ def initialize(aws_account_id: nil, aws_region: nil) end end + class AzureEventGrid < ::Stripe::RequestParams + # The Azure region. + attr_accessor :azure_region + # The name of the Azure resource group. + attr_accessor :azure_resource_group_name + # The Azure subscription ID. + attr_accessor :azure_subscription_id + + def initialize( + azure_region: nil, + azure_resource_group_name: nil, + azure_subscription_id: nil + ) + @azure_region = azure_region + @azure_resource_group_name = azure_resource_group_name + @azure_subscription_id = azure_subscription_id + end + end + class WebhookEndpoint < ::Stripe::RequestParams # The URL of the webhook endpoint. attr_accessor :url @@ -31,7 +50,11 @@ def initialize(url: nil) attr_accessor :enabled_events # Payload type of events being subscribed to. attr_accessor :event_payload - # Where events should be routed from. + # Specifies which accounts' events route to this destination. + # `@self`: Receive events from the account that owns the event destination. + # `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + # `@organization_members`: Receive events from accounts directly linked to the organization. + # `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. attr_accessor :events_from # Additional fields to include in the response. attr_accessor :include @@ -45,6 +68,8 @@ def initialize(url: nil) attr_accessor :type # Amazon EventBridge configuration. attr_accessor :amazon_eventbridge + # Azure Event Grid configuration. + attr_accessor :azure_event_grid # Webhook endpoint configuration. attr_accessor :webhook_endpoint @@ -59,6 +84,7 @@ def initialize( snapshot_api_version: nil, type: nil, amazon_eventbridge: nil, + azure_event_grid: nil, webhook_endpoint: nil ) @description = description @@ -71,6 +97,7 @@ def initialize( @snapshot_api_version = snapshot_api_version @type = type @amazon_eventbridge = amazon_eventbridge + @azure_event_grid = azure_event_grid @webhook_endpoint = webhook_endpoint end end diff --git a/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb b/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb index dea5a29c1..6de3d7243 100644 --- a/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb +++ b/lib/stripe/params/v2/core/vault/gb_bank_account_create_params.rb @@ -29,6 +29,10 @@ def initialize(business_type: nil, initiate: nil, name: nil) # against what was provided by the bank. Doing so is required for all bank accounts not owned # by you before making domestic UK OutboundPayments. attr_accessor :confirmation_of_payee + # The currency of the bank account. + attr_accessor :currency + # The IBAN of the bank account. + attr_accessor :iban # The Sort Code of the bank account. attr_accessor :sort_code @@ -36,11 +40,15 @@ def initialize( account_number: nil, bank_account_type: nil, confirmation_of_payee: nil, + currency: nil, + iban: nil, sort_code: nil ) @account_number = account_number @bank_account_type = bank_account_type @confirmation_of_payee = confirmation_of_payee + @currency = currency + @iban = iban @sort_code = sort_code end end diff --git a/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb b/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb index ad06dc2ed..0a92a8695 100644 --- a/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb +++ b/lib/stripe/params/v2/core/vault/us_bank_account_create_params.rb @@ -10,6 +10,8 @@ class UsBankAccountCreateParams < ::Stripe::RequestParams attr_accessor :account_number # Closed Enum. The type of the bank account (checking or savings). attr_accessor :bank_account_type + # The currency of the bank account. + attr_accessor :currency # The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number. attr_accessor :fedwire_routing_number # The ACH routing number of the bank account. Note that certain banks have the same ACH and wire routing number. @@ -18,11 +20,13 @@ class UsBankAccountCreateParams < ::Stripe::RequestParams def initialize( account_number: nil, bank_account_type: nil, + currency: nil, fedwire_routing_number: nil, routing_number: nil ) @account_number = account_number @bank_account_type = bank_account_type + @currency = currency @fedwire_routing_number = fedwire_routing_number @routing_number = routing_number end diff --git a/lib/stripe/params/v2/money_management/currency_conversion_create_params.rb b/lib/stripe/params/v2/money_management/currency_conversion_create_params.rb index b68efeb08..d234acd6a 100644 --- a/lib/stripe/params/v2/money_management/currency_conversion_create_params.rb +++ b/lib/stripe/params/v2/money_management/currency_conversion_create_params.rb @@ -6,17 +6,6 @@ module V2 module MoneyManagement class CurrencyConversionCreateParams < ::Stripe::RequestParams class From < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # Amount object. attr_accessor :amount # A lowercase alpha3 currency code like "usd". @@ -29,17 +18,6 @@ def initialize(amount: nil, currency: nil) end class To < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # Amount object. attr_accessor :amount # A lowercase alpha3 currency code like "usd". diff --git a/lib/stripe/params/v2/money_management/financial_account_list_params.rb b/lib/stripe/params/v2/money_management/financial_account_list_params.rb index b3d4b1b27..cd87d846d 100644 --- a/lib/stripe/params/v2/money_management/financial_account_list_params.rb +++ b/lib/stripe/params/v2/money_management/financial_account_list_params.rb @@ -5,6 +5,8 @@ module Stripe module V2 module MoneyManagement class FinancialAccountListParams < ::Stripe::RequestParams + # Additional fields to include in the response. + attr_accessor :include # The page limit. attr_accessor :limit # The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned. @@ -12,7 +14,8 @@ class FinancialAccountListParams < ::Stripe::RequestParams # Filter for FinancialAccount `type`. By default, FinancialAccounts of any `type` are returned. attr_accessor :types - def initialize(limit: nil, status: nil, types: nil) + def initialize(include: nil, limit: nil, status: nil, types: nil) + @include = include @limit = limit @status = status @types = types diff --git a/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb b/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb index 882b0e95b..f4a905314 100644 --- a/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb +++ b/lib/stripe/params/v2/money_management/financial_account_retrieve_params.rb @@ -4,7 +4,14 @@ module Stripe module V2 module MoneyManagement - class FinancialAccountRetrieveParams < ::Stripe::RequestParams; end + class FinancialAccountRetrieveParams < ::Stripe::RequestParams + # Additional fields to include in the response. + attr_accessor :include + + def initialize(include: nil) + @include = include + end + end end end end diff --git a/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb b/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb index 727898e67..e3cf77f5b 100644 --- a/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb +++ b/lib/stripe/params/v2/money_management/inbound_transfer_create_params.rb @@ -5,18 +5,6 @@ module Stripe module V2 module MoneyManagement class InboundTransferCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end - class From < ::Stripe::RequestParams # An optional currency field used to specify which currency is debited from the Payment Method. # Since many Payment Methods support only one currency, this field is optional. 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 368343008..6881aeeda 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 @@ -5,18 +5,6 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end - class DeliveryOptions < ::Stripe::RequestParams class PaperCheck < ::Stripe::RequestParams # Memo printed on the memo field of the check. @@ -106,6 +94,8 @@ def initialize(currency: nil, payout_method: nil, recipient: nil) attr_accessor :recipient_notification # The recipient verification id for this OutboundPayment. Only required for countries with regulatory mandates to verify recipient names before OutboundPayment creation. attr_accessor :recipient_verification + # The description that appears on the receiving end for an OutboundPayment (for example, on a bank statement). Must be between 3 and 22 characters long, and not contain profanity. + attr_accessor :statement_descriptor # To which payout method to send the OutboundPayment. attr_accessor :to @@ -119,6 +109,7 @@ def initialize( purpose: nil, recipient_notification: nil, recipient_verification: nil, + statement_descriptor: nil, to: nil ) @amount = amount @@ -130,6 +121,7 @@ def initialize( @purpose = purpose @recipient_notification = recipient_notification @recipient_verification = recipient_verification + @statement_descriptor = statement_descriptor @to = to 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 d62eeb8c6..2c3ebdd37 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 @@ -5,18 +5,6 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentQuoteCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end - class DeliveryOptions < ::Stripe::RequestParams # Open Enum. Speed of the payout. attr_accessor :speed diff --git a/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb b/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb index 9228c4559..fcce8ed35 100644 --- a/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb +++ b/lib/stripe/params/v2/money_management/outbound_setup_intent_create_params.rb @@ -15,6 +15,8 @@ class BankAccount < ::Stripe::RequestParams attr_accessor :branch_number # The country code of the bank account. attr_accessor :country + # The currency of the bank account. + attr_accessor :currency # The routing number of the bank account, if present. attr_accessor :routing_number # The swift code of the bank account, if present. @@ -25,6 +27,7 @@ def initialize( bank_account_type: nil, branch_number: nil, country: nil, + currency: nil, routing_number: nil, swift_code: nil ) @@ -32,12 +35,15 @@ def initialize( @bank_account_type = bank_account_type @branch_number = branch_number @country = country + @currency = currency @routing_number = routing_number @swift_code = swift_code end end class Card < ::Stripe::RequestParams + # The currency of the card. + attr_accessor :currency # The expiration month of the card. attr_accessor :exp_month # The expiration year of the card. @@ -45,7 +51,8 @@ class Card < ::Stripe::RequestParams # The card number. attr_accessor :number - def initialize(exp_month: nil, exp_year: nil, number: nil) + def initialize(currency: nil, exp_month: nil, exp_year: nil, number: nil) + @currency = currency @exp_month = exp_month @exp_year = exp_year @number = number diff --git a/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb b/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb index 9421356bb..5921a273d 100644 --- a/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb +++ b/lib/stripe/params/v2/money_management/outbound_setup_intent_update_params.rb @@ -15,6 +15,8 @@ class BankAccount < ::Stripe::RequestParams attr_accessor :branch_number # The country code of the bank account. attr_accessor :country + # The currency of the bank account. + attr_accessor :currency # The routing number of the bank account, if present. attr_accessor :routing_number # The swift code of the bank account, if present. @@ -25,6 +27,7 @@ def initialize( bank_account_type: nil, branch_number: nil, country: nil, + currency: nil, routing_number: nil, swift_code: nil ) @@ -32,12 +35,15 @@ def initialize( @bank_account_type = bank_account_type @branch_number = branch_number @country = country + @currency = currency @routing_number = routing_number @swift_code = swift_code end end class Card < ::Stripe::RequestParams + # The currency of the card. + attr_accessor :currency # The expiration month of the card. attr_accessor :exp_month # The expiration year of the card. @@ -45,7 +51,8 @@ class Card < ::Stripe::RequestParams # The card number. This can only be passed when creating a new credential on an outbound setup intent in the requires_payout_method state. attr_accessor :number - def initialize(exp_month: nil, exp_year: nil, number: nil) + def initialize(currency: nil, exp_month: nil, exp_year: nil, number: nil) + @currency = currency @exp_month = exp_month @exp_year = exp_year @number = number diff --git a/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb b/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb index 343038691..7e33af985 100644 --- a/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb +++ b/lib/stripe/params/v2/money_management/outbound_transfer_create_params.rb @@ -5,18 +5,6 @@ module Stripe module V2 module MoneyManagement class OutboundTransferCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end - class DeliveryOptions < ::Stripe::RequestParams # Open Enum. Method for bank account. attr_accessor :bank_account @@ -67,6 +55,8 @@ def initialize(currency: nil, payout_method: nil) attr_accessor :metadata # The recipient verification id for this OutboundTransfer. Only required for countries with regulatory mandates to verify recipient names before OutboundTransfer creation. attr_accessor :recipient_verification + # The description that appears on the receiving end for an OutboundTransfer (for example, on a bank statement). Must be between 3 and 22 characters long, and not contain profanity. + attr_accessor :statement_descriptor # To which payout method to send the OutboundTransfer. attr_accessor :to @@ -77,6 +67,7 @@ def initialize( from: nil, metadata: nil, recipient_verification: nil, + statement_descriptor: nil, to: nil ) @amount = amount @@ -85,6 +76,7 @@ def initialize( @from = from @metadata = metadata @recipient_verification = recipient_verification + @statement_descriptor = statement_descriptor @to = to end end diff --git a/lib/stripe/params/v2/payments/off_session_payment_create_params.rb b/lib/stripe/params/v2/payments/off_session_payment_create_params.rb index cd3eb0441..f621a5c8c 100644 --- a/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +++ b/lib/stripe/params/v2/payments/off_session_payment_create_params.rb @@ -5,18 +5,6 @@ module Stripe module V2 module Payments class OffSessionPaymentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end - class Capture < ::Stripe::RequestParams # The method to use to capture the payment. attr_accessor :capture_method diff --git a/lib/stripe/params/v2/payments/settlement_allocation_intent_create_params.rb b/lib/stripe/params/v2/payments/settlement_allocation_intent_create_params.rb index 149be9977..8ce785b03 100644 --- a/lib/stripe/params/v2/payments/settlement_allocation_intent_create_params.rb +++ b/lib/stripe/params/v2/payments/settlement_allocation_intent_create_params.rb @@ -5,17 +5,6 @@ module Stripe module V2 module Payments class SettlementAllocationIntentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # The amount and currency of the SettlementAllocationIntent. Allowed Currencies are `gbp` | `eur`. attr_accessor :amount # Date when we expect to receive the funds. Must be in future . diff --git a/lib/stripe/params/v2/payments/settlement_allocation_intent_update_params.rb b/lib/stripe/params/v2/payments/settlement_allocation_intent_update_params.rb index 5240d7026..55cc03520 100644 --- a/lib/stripe/params/v2/payments/settlement_allocation_intent_update_params.rb +++ b/lib/stripe/params/v2/payments/settlement_allocation_intent_update_params.rb @@ -5,17 +5,6 @@ module Stripe module V2 module Payments class SettlementAllocationIntentUpdateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # The new amount for the SettlementAllocationIntent. Only amount.value can be updated and currency must remain same. attr_accessor :amount # The new reference for the SettlementAllocationIntent. diff --git a/lib/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rb b/lib/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rb index c6c6a2e9f..5ebb71480 100644 --- a/lib/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rb +++ b/lib/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rb @@ -6,17 +6,6 @@ module V2 module Payments module SettlementAllocationIntents class SplitCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # The target account for settling the SettlementAllocationIntentSplit. attr_accessor :account # The amount and currency of the SettlementAllocationIntentSplit. diff --git a/lib/stripe/params/v2/tax/manual_rule_create_params.rb b/lib/stripe/params/v2/tax/manual_rule_create_params.rb index d65d1484b..7bcaccce2 100644 --- a/lib/stripe/params/v2/tax/manual_rule_create_params.rb +++ b/lib/stripe/params/v2/tax/manual_rule_create_params.rb @@ -65,6 +65,10 @@ def initialize( @percentage = percentage @state = state end + + def self.field_encodings + @field_encodings = { percentage: :decimal_string } + end end # The tax rates to be applied. attr_accessor :rates @@ -75,6 +79,15 @@ def initialize(rates: nil, starts_at: nil) @rates = rates @starts_at = starts_at end + + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: { kind: :object, fields: { percentage: :decimal_string } }, + }, + } + end end # Location where the rule applies. attr_accessor :location @@ -88,6 +101,23 @@ def initialize(location: nil, products: nil, scheduled_tax_rates: nil) @products = products @scheduled_tax_rates = scheduled_tax_rates end + + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: { kind: :object, fields: { percentage: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/tax/manual_rule_update_params.rb b/lib/stripe/params/v2/tax/manual_rule_update_params.rb index ee01b2731..82baa3a13 100644 --- a/lib/stripe/params/v2/tax/manual_rule_update_params.rb +++ b/lib/stripe/params/v2/tax/manual_rule_update_params.rb @@ -65,6 +65,10 @@ def initialize( @percentage = percentage @state = state end + + def self.field_encodings + @field_encodings = { percentage: :decimal_string } + end end # The tax rates to be applied. attr_accessor :rates @@ -75,6 +79,15 @@ def initialize(rates: nil, starts_at: nil) @rates = rates @starts_at = starts_at end + + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: { kind: :object, fields: { percentage: :decimal_string } }, + }, + } + end end # Location where the rule applies. attr_accessor :location @@ -88,6 +101,23 @@ def initialize(location: nil, products: nil, scheduled_tax_rates: nil) @products = products @scheduled_tax_rates = scheduled_tax_rates end + + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: { kind: :object, fields: { percentage: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb b/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb index a82243c4e..9bf8c8213 100644 --- a/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb +++ b/lib/stripe/params/v2/test_helpers/financial_address_credit_params.rb @@ -5,17 +5,6 @@ module Stripe module V2 module TestHelpers class FinancialAddressCreditParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_accessor :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_accessor :currency - - def initialize(value: nil, currency: nil) - @value = value - @currency = currency - end - end # Object containing the amount value and currency to credit. attr_accessor :amount # Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. diff --git a/lib/stripe/request_params.rb b/lib/stripe/request_params.rb index 55c7c9b66..58682c28b 100644 --- a/lib/stripe/request_params.rb +++ b/lib/stripe/request_params.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true # typed: true +require "bigdecimal" + module Stripe # For internal use only. Does not provide a stable API and may be broken # with future non-major changes. @@ -71,6 +73,8 @@ def self.coerce_value(value, encoding) case encoding when :int64_string coerce_int64_string(value) + when :decimal_string + coerce_decimal_string(value) when Hash coerce_composite(value, encoding) else @@ -86,6 +90,15 @@ def self.coerce_value(value, encoding) end end + private_class_method def self.coerce_decimal_string(value) + case value + when BigDecimal then value.to_s("F") + when Integer, Float then value.to_s + when Array then value.map { |v| coerce_decimal_string(v) } + else value + end + end + private_class_method def self.coerce_composite(value, encoding) case encoding[:kind] when :object diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index b379be648..35597b5ba 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -197,7 +197,6 @@ require "stripe/resources/v2/billing/intent" require "stripe/resources/v2/billing/intent_action" require "stripe/resources/v2/billing/license_fee" -require "stripe/resources/v2/billing/license_fee_subscription" require "stripe/resources/v2/billing/license_fee_version" require "stripe/resources/v2/billing/licensed_item" require "stripe/resources/v2/billing/meter_event" @@ -208,7 +207,6 @@ require "stripe/resources/v2/billing/pricing_plan" require "stripe/resources/v2/billing/pricing_plan_component" require "stripe/resources/v2/billing/pricing_plan_subscription" -require "stripe/resources/v2/billing/pricing_plan_subscription_components" require "stripe/resources/v2/billing/pricing_plan_version" require "stripe/resources/v2/billing/profile" require "stripe/resources/v2/billing/rate_card" @@ -218,10 +216,12 @@ require "stripe/resources/v2/billing/rate_card_version" require "stripe/resources/v2/billing/service_action" require "stripe/resources/v2/core/account" +require "stripe/resources/v2/core/account_evaluation" require "stripe/resources/v2/core/account_link" require "stripe/resources/v2/core/account_person" require "stripe/resources/v2/core/account_person_token" require "stripe/resources/v2/core/account_token" +require "stripe/resources/v2/core/batch_job" require "stripe/resources/v2/core/claimable_sandbox" require "stripe/resources/v2/core/connection_session" require "stripe/resources/v2/core/event" @@ -255,6 +255,7 @@ require "stripe/resources/v2/reporting/report_run" require "stripe/resources/v2/tax/manual_rule" require "stripe/resources/webhook_endpoint" +require "stripe/events/v1_account_signals_including_delinquency_created_event" require "stripe/events/v1_billing_meter_error_report_triggered_event" require "stripe/events/v1_billing_meter_no_meter_found_event" require "stripe/events/v2_billing_cadence_billed_event" @@ -315,7 +316,18 @@ require "stripe/events/v2_core_account_person_created_event" require "stripe/events/v2_core_account_person_deleted_event" require "stripe/events/v2_core_account_person_updated_event" +require "stripe/events/v2_core_account_signals_fraudulent_website_ready_event" require "stripe/events/v2_core_account_updated_event" +require "stripe/events/v2_core_batch_job_batch_failed_event" +require "stripe/events/v2_core_batch_job_canceled_event" +require "stripe/events/v2_core_batch_job_completed_event" +require "stripe/events/v2_core_batch_job_created_event" +require "stripe/events/v2_core_batch_job_ready_for_upload_event" +require "stripe/events/v2_core_batch_job_timeout_event" +require "stripe/events/v2_core_batch_job_updated_event" +require "stripe/events/v2_core_batch_job_upload_timeout_event" +require "stripe/events/v2_core_batch_job_validating_event" +require "stripe/events/v2_core_batch_job_validation_failed_event" require "stripe/events/v2_core_claimable_sandbox_claimed_event" require "stripe/events/v2_core_claimable_sandbox_created_event" require "stripe/events/v2_core_claimable_sandbox_expired_event" @@ -416,3 +428,4 @@ require "stripe/events/v2_reporting_report_run_failed_event" require "stripe/events/v2_reporting_report_run_succeeded_event" require "stripe/events/v2_reporting_report_run_updated_event" +require "stripe/events/v2_signals_account_signal_fraudulent_merchant_ready_event" diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb index 01f5b709c..53fa4c292 100644 --- a/lib/stripe/resources/billing/alert.rb +++ b/lib/stripe/resources/billing/alert.rb @@ -67,6 +67,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::StripeObject @@ -97,6 +101,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end # The filters allow limiting the scope of this credit balance alert. You must specify only a customer filter at this time. attr_reader :filters @@ -110,6 +120,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + lte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class SpendThreshold < ::Stripe::StripeObject @@ -185,6 +204,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end # The monetary amount. Present when type is `amount`. attr_reader :amount @@ -200,6 +223,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end # Defines the period over which spend is aggregated. attr_reader :aggregation_period @@ -217,6 +246,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + gte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class UsageThreshold < ::Stripe::StripeObject @@ -351,6 +389,29 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + credit_balance_threshold: { + kind: :object, + fields: { + lte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + spend_threshold: { + kind: :object, + fields: { + gte: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/billing/alert_recovered.rb b/lib/stripe/resources/billing/alert_recovered.rb index 50b69147d..baf98828d 100644 --- a/lib/stripe/resources/billing/alert_recovered.rb +++ b/lib/stripe/resources/billing/alert_recovered.rb @@ -35,6 +35,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end end end diff --git a/lib/stripe/resources/billing/alert_triggered.rb b/lib/stripe/resources/billing/alert_triggered.rb index 99d6ef66b..18217277e 100644 --- a/lib/stripe/resources/billing/alert_triggered.rb +++ b/lib/stripe/resources/billing/alert_triggered.rb @@ -72,6 +72,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end end end diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb index bed44ae1b..9e8c47d13 100644 --- a/lib/stripe/resources/billing/credit_balance_summary.rb +++ b/lib/stripe/resources/billing/credit_balance_summary.rb @@ -49,6 +49,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::StripeObject @@ -79,6 +83,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class BalanceUpdateDetails < ::Stripe::StripeObject @@ -146,6 +156,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::StripeObject @@ -176,6 +190,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end # Attribute for field available_balance attr_reader :available_balance @@ -195,6 +215,19 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + available_balance: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + ledger_balance: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. attr_reader :balances @@ -214,6 +247,27 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + balances: { + kind: :array, + element: { + kind: :object, + fields: { + available_balance: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + ledger_balance: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb index 1cb4a1605..b40136d87 100644 --- a/lib/stripe/resources/billing/credit_balance_transaction.rb +++ b/lib/stripe/resources/billing/credit_balance_transaction.rb @@ -51,6 +51,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::StripeObject @@ -81,6 +85,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class CreditsApplicationInvoiceVoided < ::Stripe::StripeObject @@ -114,6 +124,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class Debit < ::Stripe::StripeObject @@ -155,6 +174,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::StripeObject @@ -185,6 +208,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class CreditsApplied < ::Stripe::StripeObject @@ -215,6 +244,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -254,6 +292,29 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + credit: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + debit: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index 9247b2770..a5f89ab0e 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -54,6 +54,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end end class Monetary < ::Stripe::StripeObject @@ -84,6 +88,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject @@ -251,6 +261,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end end end diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index ac44a0576..7f9a3819b 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -304,6 +304,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { fx_rate: :decimal_string } + end end class CustomField < ::Stripe::StripeObject @@ -2768,6 +2772,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + currency_conversion: { kind: :object, fields: { fx_rate: :decimal_string } }, + } + end end end end diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb index 7fb8f9b0d..cbabecf13 100644 --- a/lib/stripe/resources/climate/order.rb +++ b/lib/stripe/resources/climate/order.rb @@ -168,6 +168,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { metric_tons: :decimal_string } + end end end end diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb index 6a60ef9ec..5a41caa87 100644 --- a/lib/stripe/resources/climate/product.rb +++ b/lib/stripe/resources/climate/product.rb @@ -67,6 +67,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { metric_tons_available: :decimal_string } + end end end end diff --git a/lib/stripe/resources/credit_note_line_item.rb b/lib/stripe/resources/credit_note_line_item.rb index dccbcb5f8..5b328db6f 100644 --- a/lib/stripe/resources/credit_note_line_item.rb +++ b/lib/stripe/resources/credit_note_line_item.rb @@ -137,5 +137,9 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end end diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index 11edfd7a4..034086ea6 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -212,6 +212,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class ProrationDetails < ::Stripe::StripeObject @@ -343,5 +347,9 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { pricing: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } } + end end end diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index c87e10e2a..ba9123f80 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -373,6 +373,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { unit_amount_decimal: :decimal_string } + end end class TaxCalculationReference < ::Stripe::StripeObject @@ -498,5 +502,9 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { pricing: { kind: :object, fields: { unit_amount_decimal: :decimal_string } } } + end end end diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index 00d12f5c7..8361a4061 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -69,6 +69,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::StripeObject @@ -82,6 +86,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::StripeObject @@ -97,6 +105,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_reader :fuel @@ -112,6 +127,20 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. attr_reader :cardholder_prompt_data @@ -132,6 +161,25 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class FraudChallenge < ::Stripe::StripeObject @@ -170,6 +218,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string } + end end class MerchantData < ::Stripe::StripeObject @@ -795,6 +847,34 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + } + end end end end diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index 034d5f516..8de94a986 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -117,6 +117,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class NonFuel < ::Stripe::StripeObject @@ -130,6 +134,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { gross_amount_decimal: :decimal_string } + end end class Tax < ::Stripe::StripeObject @@ -145,6 +153,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. attr_reader :fuel @@ -160,6 +175,20 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to cardholder at point of sale. attr_reader :cardholder_prompt_data @@ -180,6 +209,25 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::StripeObject @@ -244,6 +292,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::StripeObject @@ -305,6 +360,34 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + } + end end class Treasury < ::Stripe::StripeObject @@ -452,6 +535,39 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + non_fuel: { kind: :object, fields: { gross_amount_decimal: :decimal_string } }, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: { quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index c8c981768..b475627c0 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -4128,8 +4128,6 @@ def self.field_remappings attr_reader :transaction_purpose # Bank account verification method. attr_reader :verification_method - # Preferred transaction settlement speed - attr_reader :preferred_settlement_speed def self.inner_class_types @inner_class_types = { diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb index cd4de8a86..9228f69ce 100644 --- a/lib/stripe/resources/plan.rb +++ b/lib/stripe/resources/plan.rb @@ -40,6 +40,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformUsage < ::Stripe::StripeObject @@ -148,5 +155,18 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + amount_decimal: :decimal_string, + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + } + end end end diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb index 6db5414ee..7a7773376 100644 --- a/lib/stripe/resources/price.rb +++ b/lib/stripe/resources/price.rb @@ -56,6 +56,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. attr_reader :custom_unit_amount @@ -75,6 +82,19 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::StripeObject @@ -151,6 +171,13 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformQuantity < ::Stripe::StripeObject @@ -258,5 +285,18 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end end diff --git a/lib/stripe/resources/v2/billing/cadence.rb b/lib/stripe/resources/v2/billing/cadence.rb index 30e7dd508..ddcc67a26 100644 --- a/lib/stripe/resources/v2/billing/cadence.rb +++ b/lib/stripe/resources/v2/billing/cadence.rb @@ -207,6 +207,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { percent_off: :decimal_string } + end end # Unique identifier for the object. attr_reader :id @@ -222,6 +226,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + percent_off: { kind: :object, fields: { percent_off: :decimal_string } }, + } + end end class Payer < ::Stripe::StripeObject @@ -440,6 +450,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { amount: :int64_string } + end end # Configuration options for setting up an eMandate for cards issued in India. attr_reader :mandate_options @@ -458,6 +472,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + mandate_options: { kind: :object, fields: { amount: :int64_string } }, + } + end end class CustomerBalance < ::Stripe::StripeObject @@ -571,6 +591,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -594,6 +623,20 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + }, + }, + } + end end # Expanded bill settings data with actual configuration values. attr_reader :bill @@ -607,6 +650,25 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + collection: { + kind: :object, + fields: { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + }, + }, + }, + }, + } + end end # The billing cycle is the object that defines future billing cycle dates. attr_reader :billing_cycle @@ -650,6 +712,39 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + invoice_discount_rules: { + kind: :array, + element: { + kind: :object, + fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, + }, + }, + settings_data: { + kind: :object, + fields: { + collection: { + kind: :object, + fields: { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { + mandate_options: { kind: :object, fields: { amount: :int64_string } }, + }, + }, + }, + }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/collection_setting.rb b/lib/stripe/resources/v2/billing/collection_setting.rb index 84c3e62fd..5db669e7a 100644 --- a/lib/stripe/resources/v2/billing/collection_setting.rb +++ b/lib/stripe/resources/v2/billing/collection_setting.rb @@ -95,6 +95,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { amount: :int64_string } + end end # Configuration options for setting up an eMandate for cards issued in India. attr_reader :mandate_options @@ -113,6 +117,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { mandate_options: { kind: :object, fields: { amount: :int64_string } } } + end end class CustomerBalance < ::Stripe::StripeObject @@ -226,6 +234,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -268,6 +285,20 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/collection_setting_version.rb b/lib/stripe/resources/v2/billing/collection_setting_version.rb index 14ba82bdf..016a41a42 100644 --- a/lib/stripe/resources/v2/billing/collection_setting_version.rb +++ b/lib/stripe/resources/v2/billing/collection_setting_version.rb @@ -95,6 +95,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { amount: :int64_string } + end end # Configuration options for setting up an eMandate for cards issued in India. attr_reader :mandate_options @@ -113,6 +117,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { mandate_options: { kind: :object, fields: { amount: :int64_string } } } + end end class CustomerBalance < ::Stripe::StripeObject @@ -226,6 +234,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -257,6 +274,20 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: { mandate_options: { kind: :object, fields: { amount: :int64_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/intent.rb b/lib/stripe/resources/v2/billing/intent.rb index baf3bfb3f..0a98ae922 100644 --- a/lib/stripe/resources/v2/billing/intent.rb +++ b/lib/stripe/resources/v2/billing/intent.rb @@ -14,8 +14,12 @@ def self.object_name end class AmountDetails < ::Stripe::StripeObject + # The outstanding amount after discount, tax, and customer balance application. + attr_reader :amount_due # Three-letter ISO currency code, in lowercase. Must be a supported currency. attr_reader :currency + # The customer's account balance applied to the amount. + attr_reader :customer_balance_applied # Amount of discount applied. attr_reader :discount # Amount of shipping charges. @@ -36,6 +40,19 @@ def self.field_remappings end end + class InvoiceResources < ::Stripe::StripeObject + # ID of a preview invoice showing the breakdown of line items. Null if the billing intent will not create an invoice. Only present when "invoice_resources.preview_invoice" is included. + attr_reader :preview_invoice + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + class StatusTransitions < ::Stripe::StripeObject # Time at which the Billing Intent was canceled. attr_reader :canceled_at @@ -43,6 +60,8 @@ class StatusTransitions < ::Stripe::StripeObject attr_reader :committed_at # Time at which the Billing Intent was drafted. attr_reader :drafted_at + # Time at which the Billing Intent will expire. + attr_reader :expires_at # Time at which the Billing Intent was reserved. attr_reader :reserved_at @@ -322,6 +341,8 @@ def self.field_remappings attr_reader :currency # Unique identifier for the object. attr_reader :id + # Invoice resources associated with this Billing Intent. Populated when include parameters are specified. + attr_reader :invoice_resources # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object # Current status of the Billing Intent. @@ -338,6 +359,7 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { amount_details: AmountDetails, + invoice_resources: InvoiceResources, status_transitions: StatusTransitions, cadence_data: CadenceData, } diff --git a/lib/stripe/resources/v2/billing/intent_action.rb b/lib/stripe/resources/v2/billing/intent_action.rb index 3fa197240..0dea35e5e 100644 --- a/lib/stripe/resources/v2/billing/intent_action.rb +++ b/lib/stripe/resources/v2/billing/intent_action.rb @@ -14,7 +14,28 @@ def self.object_name end class Apply < ::Stripe::StripeObject + class Discount < ::Stripe::StripeObject + # The ID of the Coupon applied. + attr_reader :coupon + # The ID of the created Discount. + attr_reader :discount + # The ID of the PromotionCode applied. + attr_reader :promotion_code + # Type of the discount. + attr_reader :type + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + class EffectiveAt < ::Stripe::StripeObject + # The timestamp at which the apply action will take effect. Only present if type is timestamp. Only allowed for discount actions. + attr_reader :timestamp # When the apply action will take effect. attr_reader :type @@ -53,6 +74,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { percent_off: :decimal_string } + end end # The entity that the discount rule applies to, for example, the Billing Cadence. attr_reader :applies_to @@ -70,6 +95,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + percent_off: { kind: :object, fields: { percent_off: :decimal_string } }, + } + end end class SpendModifierRule < ::Stripe::StripeObject @@ -115,7 +146,7 @@ def self.field_remappings end # The maximum amount allowed for the billing period. attr_reader :amount - # The configration for the overage rate for the custom pricing unit. + # The configuration for the overage rate for the custom pricing unit. attr_reader :custom_pricing_unit_overage_rate def self.inner_class_types @@ -146,10 +177,12 @@ def self.field_remappings @field_remappings = {} end end - # When the apply action will take effect. Defaults to on_reserve if not specified. + # When the apply action will take effect. If not specified, defaults to on_reserve. attr_reader :effective_at # Type of the apply action details. attr_reader :type + # Details for applying a discount. + attr_reader :discount # Details for applying a discount rule to future invoices. attr_reader :invoice_discount_rule # Details for applying a spend modifier rule. Only present if type is spend_modifier_rule. @@ -158,6 +191,7 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { effective_at: EffectiveAt, + discount: Discount, invoice_discount_rule: InvoiceDiscountRule, spend_modifier_rule: SpendModifierRule, } @@ -166,6 +200,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + invoice_discount_rule: { + kind: :object, + fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, + }, + } + end end class Deactivate < ::Stripe::StripeObject @@ -405,7 +448,7 @@ def self.field_remappings @field_remappings = {} end end - # When the remove action will take effect. Defaults to on_reserve if not specified. + # When the remove action will take effect. If not specified, defaults to on_reserve. attr_reader :effective_at # Type of the remove action. attr_reader :type @@ -526,7 +569,7 @@ class Item < ::Stripe::StripeObject attr_reader :metadata # The ID of the price object. attr_reader :price - # Quantity for this item. If not provided, will default to 1. + # Quantity for this item. If not provided, defaults to 1. attr_reader :quantity def self.inner_class_types @@ -610,6 +653,20 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: { percent_off: { kind: :object, fields: { percent_off: :decimal_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/license_fee.rb b/lib/stripe/resources/v2/billing/license_fee.rb index c7e85bb58..fbe627c8d 100644 --- a/lib/stripe/resources/v2/billing/license_fee.rb +++ b/lib/stripe/resources/v2/billing/license_fee.rb @@ -13,6 +13,22 @@ def self.object_name "v2.billing.license_fee" end + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + attr_reader :interval + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + attr_reader :interval_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + class Tier < ::Stripe::StripeObject # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. attr_reader :flat_amount @@ -32,6 +48,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end end class TransformQuantity < ::Stripe::StripeObject @@ -47,6 +67,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end end # Whether this License Fee is active. Inactive License Fees cannot be used in new activations or be modified. attr_reader :active @@ -60,8 +84,6 @@ def self.field_remappings attr_reader :display_name # Unique identifier for the object. attr_reader :id - # The ID of the license fee's most recently created version. - attr_reader :latest_version # A Licensed Item represents a billable item whose pricing is based on license fees. You can use license fees # to specify the pricing and create subscriptions to these items. attr_reader :licensed_item @@ -73,11 +95,8 @@ def self.field_remappings attr_reader :metadata # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # The interval for assessing service. - attr_reader :service_interval - # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - # order to specify quarterly service. - attr_reader :service_interval_count + # The service cycle configuration for this License Fee. + attr_reader :service_cycle # The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax. attr_reader :tax_behavior # Defines whether the tiering price should be graduated or volume-based. In volume-based tiering, the maximum @@ -95,12 +114,26 @@ def self.field_remappings attr_reader :livemode def self.inner_class_types - @inner_class_types = { tiers: Tier, transform_quantity: TransformQuantity } + @inner_class_types = { + service_cycle: ServiceCycle, + tiers: Tier, + transform_quantity: TransformQuantity, + } end def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/license_fee_subscription.rb b/lib/stripe/resources/v2/billing/license_fee_subscription.rb deleted file mode 100644 index ad09e13e6..000000000 --- a/lib/stripe/resources/v2/billing/license_fee_subscription.rb +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - module V2 - module Billing - # A License Fee Subscription represents a customer's subscription to a License Fee at a specified quantity. It tracks - # the number of units (such as seats or licenses) the customer has subscribed to and bills them according to the service - # interval defined in the License Fee and the Billing Cadence. - class LicenseFeeSubscription < APIResource - OBJECT_NAME = "v2.billing.license_fee_subscription" - def self.object_name - "v2.billing.license_fee_subscription" - end - - # The ID of the Billing Cadence. - attr_reader :billing_cadence - # Timestamp of when the object was created. - attr_reader :created - # Unique identifier for the object. - attr_reader :id - # The ID of the License Fee. - attr_reader :license_fee - # The ID of the License Fee Version. - attr_reader :license_fee_version - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - attr_reader :metadata - # String representing the object's type. Objects of the same type share the same value of the object field. - attr_reader :object - # Quantity of the License Fee subscribed to. - attr_reader :quantity - # The ID of the Test Clock, if any. - attr_reader :test_clock - # 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 - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - end - end -end diff --git a/lib/stripe/resources/v2/billing/license_fee_version.rb b/lib/stripe/resources/v2/billing/license_fee_version.rb index 8d3c0a824..511ec148c 100644 --- a/lib/stripe/resources/v2/billing/license_fee_version.rb +++ b/lib/stripe/resources/v2/billing/license_fee_version.rb @@ -32,6 +32,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end end class TransformQuantity < ::Stripe::StripeObject @@ -47,6 +51,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end end # Timestamp of when the object was created. attr_reader :created @@ -77,6 +85,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/licensed_item.rb b/lib/stripe/resources/v2/billing/licensed_item.rb index e9efad6e0..598476bcc 100644 --- a/lib/stripe/resources/v2/billing/licensed_item.rb +++ b/lib/stripe/resources/v2/billing/licensed_item.rb @@ -31,7 +31,7 @@ def self.field_remappings attr_reader :display_name # Unique identifier for the object. attr_reader :id - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular licensed item. # Maximum length of 200 characters. attr_reader :lookup_key # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/lib/stripe/resources/v2/billing/metered_item.rb b/lib/stripe/resources/v2/billing/metered_item.rb index 5d34fbc74..a1fb22398 100644 --- a/lib/stripe/resources/v2/billing/metered_item.rb +++ b/lib/stripe/resources/v2/billing/metered_item.rb @@ -48,7 +48,7 @@ def self.field_remappings attr_reader :id # Optional array of Meter dimensions to group event dimension keys for invoice line items. attr_reader :invoice_presentation_dimensions - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular metered item. # Maximum length of 200 characters. attr_reader :lookup_key # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. diff --git a/lib/stripe/resources/v2/billing/pricing_plan.rb b/lib/stripe/resources/v2/billing/pricing_plan.rb index 5975e950c..aa57d533b 100644 --- a/lib/stripe/resources/v2/billing/pricing_plan.rb +++ b/lib/stripe/resources/v2/billing/pricing_plan.rb @@ -26,8 +26,6 @@ def self.object_name attr_reader :display_name # Unique identifier for the object. attr_reader :id - # The ID of the latest version of the PricingPlan. - attr_reader :latest_version # The ID of the live version of the PricingPlan. attr_reader :live_version # An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters. diff --git a/lib/stripe/resources/v2/billing/pricing_plan_component.rb b/lib/stripe/resources/v2/billing/pricing_plan_component.rb index 58ee3b3bd..c076a818e 100644 --- a/lib/stripe/resources/v2/billing/pricing_plan_component.rb +++ b/lib/stripe/resources/v2/billing/pricing_plan_component.rb @@ -16,7 +16,7 @@ def self.object_name class LicenseFee < ::Stripe::StripeObject # The ID of the License Fee. attr_reader :id - # The version of the LicenseFee. Defaults to 'latest', if not specified. + # The ID of the License Fee Version. If not specified, defaults to 'latest'. attr_reader :version def self.inner_class_types @@ -31,7 +31,7 @@ def self.field_remappings class RateCard < ::Stripe::StripeObject # The ID of the Rate Card. attr_reader :id - # The version of the RateCard. Defaults to 'latest', if not specified. + # The ID of the Rate Card Version. If not specified, defaults to 'latest'. attr_reader :version def self.inner_class_types diff --git a/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb b/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb index d07e9e0ca..22205c96c 100644 --- a/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb +++ b/lib/stripe/resources/v2/billing/pricing_plan_subscription.rb @@ -51,6 +51,546 @@ def self.field_remappings end end + class DiscountDetail < ::Stripe::StripeObject + class Source < ::Stripe::StripeObject + # The ID of the Coupon. + attr_reader :coupon + # Type of the Discount source. + attr_reader :type + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The ID of the Discount. + attr_reader :discount + # The time at which the Discount ends, if applicable. + attr_reader :end + # The ID of the PromotionCode, if applicable. + attr_reader :promotion_code + # The source of the Discount. + attr_reader :source + # The time at which the Discount starts. + attr_reader :start + + def self.inner_class_types + @inner_class_types = { source: Source } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class PricingPlanComponentDetail < ::Stripe::StripeObject + class LicenseFeeDetails < ::Stripe::StripeObject + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + attr_reader :interval + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + attr_reader :interval_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + + class Tier < ::Stripe::StripeObject + # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + attr_reader :flat_amount + # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + # most 12 decimal places. + attr_reader :unit_amount + # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + # be set. + attr_reader :up_to_decimal + # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + attr_reader :up_to_inf + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end + end + + class TransformQuantity < ::Stripe::StripeObject + # Divide usage by this number. + attr_reader :divide_by + # After division, round the result up or down. + attr_reader :round + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end + end + # Three-letter ISO currency code, in lowercase. + attr_reader :currency + # A customer-facing name for the license fee. + attr_reader :display_name + # The ID of the License Fee. + attr_reader :license_fee + # The ID of the License Fee Version. + attr_reader :license_fee_version + # Quantity of the license fee on the subscription. + attr_reader :quantity + # The service cycle configuration. + attr_reader :service_cycle + # Defines whether the tiering price should be graduated or volume-based. + attr_reader :tiering_mode + # Each element represents a pricing tier. + attr_reader :tiers + # Apply a transformation to the reported usage or set quantity before computing the amount billed. + attr_reader :transform_quantity + # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. + attr_reader :unit_amount + # The unit label from the licensed item, used for display purposes (e.g. "seat", "environment"). + attr_reader :unit_label + + def self.inner_class_types + @inner_class_types = { + service_cycle: ServiceCycle, + tiers: Tier, + transform_quantity: TransformQuantity, + } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end + end + + class RateCardDetails < ::Stripe::StripeObject + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + attr_reader :interval + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + attr_reader :interval_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Three-letter ISO currency code, in lowercase. + attr_reader :currency + # A customer-facing name for the rate card. + attr_reader :display_name + # The ID of the Rate Card. + attr_reader :rate_card + # The ID of the Rate Card Version. + attr_reader :rate_card_version + # The service cycle configuration. + attr_reader :service_cycle + # Whether the rates are inclusive or exclusive of tax. + attr_reader :tax_behavior + + def self.inner_class_types + @inner_class_types = { service_cycle: ServiceCycle } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class RecurringCreditGrantDetails < ::Stripe::StripeObject + class CreditGrantDetails < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + # The Custom Pricing Unit object. + attr_reader :custom_pricing_unit_details + # The id of the custom pricing unit. + attr_reader :id + # The value of the credit grant, decimal value represented as a string. + attr_reader :value + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end + end + # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + attr_reader :type + # The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + attr_reader :custom_pricing_unit + # The monetary amount of the credit grant. Required if `type` is `monetary`. + attr_reader :monetary + + def self.inner_class_types + @inner_class_types = { custom_pricing_unit: CustomPricingUnit } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end + end + + class ApplicabilityConfig < ::Stripe::StripeObject + class Scope < ::Stripe::StripeObject + # The billable items to apply the credit grant to. + attr_reader :billable_items + # The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + attr_reader :price_type + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The applicability scope of the credit grant. + attr_reader :scope + + def self.inner_class_types + @inner_class_types = { scope: Scope } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class ExpiryConfig < ::Stripe::StripeObject + # The type of the expiry configuration. We currently support `end_of_service_period`. + attr_reader :type + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The amount of the credit grant. + attr_reader :amount + # Defines the scope where the credit grant is applicable. + attr_reader :applicability_config + # The expiry configuration for the credit grant. + attr_reader :expiry_config + + def self.inner_class_types + @inner_class_types = { + amount: Amount, + applicability_config: ApplicabilityConfig, + expiry_config: ExpiryConfig, + } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + }, + }, + } + end + end + + class CreditGrantPerTenantDetails < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + # The Custom Pricing Unit object. + attr_reader :custom_pricing_unit_details + # The id of the custom pricing unit. + attr_reader :id + # The value of the credit grant, decimal value represented as a string. + attr_reader :value + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { value: :decimal_string } + end + end + # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + attr_reader :type + # The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + attr_reader :custom_pricing_unit + # The monetary amount of the credit grant. Required if `type` is `monetary`. + attr_reader :monetary + + def self.inner_class_types + @inner_class_types = { custom_pricing_unit: CustomPricingUnit } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end + end + + class ApplicabilityConfig < ::Stripe::StripeObject + class Scope < ::Stripe::StripeObject + # The billable items to apply the credit grant to. + attr_reader :billable_items + # The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + attr_reader :price_type + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The applicability scope of the credit grant. + attr_reader :scope + + def self.inner_class_types + @inner_class_types = { scope: Scope } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class ExpiryConfig < ::Stripe::StripeObject + # The type of the expiry configuration. We currently support `end_of_service_period`. + attr_reader :type + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The amount of the credit grant. + attr_reader :amount + # Defines the scope where the credit grant is applicable. + attr_reader :applicability_config + # The expiry configuration for the credit grant. + attr_reader :expiry_config + + def self.inner_class_types + @inner_class_types = { + amount: Amount, + applicability_config: ApplicabilityConfig, + expiry_config: ExpiryConfig, + } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + }, + }, + } + end + end + + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + attr_reader :interval + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + attr_reader :interval_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Credit grant details, present when type is CREDIT_GRANT. + attr_reader :credit_grant_details + # Credit grant per tenant details, present when type is CREDIT_GRANT_PER_TENANT. + attr_reader :credit_grant_per_tenant_details + # The ID of the Recurring Credit Grant. + attr_reader :recurring_credit_grant + # The service cycle configuration. + attr_reader :service_cycle + # The type of the recurring credit grant. + attr_reader :type + + def self.inner_class_types + @inner_class_types = { + credit_grant_details: CreditGrantDetails, + credit_grant_per_tenant_details: CreditGrantPerTenantDetails, + service_cycle: ServiceCycle, + } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + }, + }, + }, + }, + } + end + end + # License fee details, present when type is license_fee_details. + attr_reader :license_fee_details + # The ID of the Pricing Plan Component. + attr_reader :pricing_plan_component + # Rate card details, present when type is rate_card_details. + attr_reader :rate_card_details + # Recurring credit grant details, present when type is recurring_credit_grant_details. + attr_reader :recurring_credit_grant_details + # The type of component details included. + attr_reader :type + + def self.inner_class_types + @inner_class_types = { + license_fee_details: LicenseFeeDetails, + rate_card_details: RateCardDetails, + recurring_credit_grant_details: RecurringCreditGrantDetails, + } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + license_fee_details: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + }, + }, + recurring_credit_grant_details: { + kind: :object, + fields: { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + }, + }, + }, + }, + }, + }, + } + end + end + class ServicingStatusTransitions < ::Stripe::StripeObject # When the servicing status transitioned to activated. attr_reader :activated_at @@ -81,6 +621,8 @@ def self.field_remappings attr_reader :collection_status_transitions # Time at which the object was created. attr_reader :created + # Details about Discounts applied to this subscription. + attr_reader :discount_details # Unique identifier for the object. attr_reader :id # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. @@ -89,6 +631,8 @@ def self.field_remappings attr_reader :object # The ID of the Pricing Plan for this subscription. attr_reader :pricing_plan + # Pricing plan component details for the subscription, populated when pricing_plan_component_details is included. + attr_reader :pricing_plan_component_details # The ID of the Pricing Plan Version for this subscription. attr_reader :pricing_plan_version # Current servicing status of this subscription. @@ -104,6 +648,8 @@ def self.inner_class_types @inner_class_types = { cancellation_details: CancellationDetails, collection_status_transitions: CollectionStatusTransitions, + discount_details: DiscountDetail, + pricing_plan_component_details: PricingPlanComponentDetail, servicing_status_transitions: ServicingStatusTransitions, } end @@ -111,6 +657,62 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + pricing_plan_component_details: { + kind: :array, + element: { + kind: :object, + fields: { + license_fee_details: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + }, + }, + recurring_credit_grant_details: { + kind: :object, + fields: { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { + kind: :object, + fields: { value: :decimal_string }, + }, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: { + kind: :object, + fields: { value: :decimal_string }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/pricing_plan_subscription_components.rb b/lib/stripe/resources/v2/billing/pricing_plan_subscription_components.rb deleted file mode 100644 index c9ebce1f7..000000000 --- a/lib/stripe/resources/v2/billing/pricing_plan_subscription_components.rb +++ /dev/null @@ -1,49 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - module V2 - module Billing - # A set of component subscriptions for a Pricing Plan Subscription. - class PricingPlanSubscriptionComponents < APIResource - OBJECT_NAME = "v2.billing.pricing_plan_subscription_components" - def self.object_name - "v2.billing.pricing_plan_subscription_components" - end - - class Component < ::Stripe::StripeObject - # The Pricing Plan Component associated with this component subscription. - attr_reader :pricing_plan_component - # The type of subscription. - attr_reader :type - # The ID of the License Fee Subscription. - attr_reader :license_fee_subscription - # The ID of the Rate Card Subscription. - attr_reader :rate_card_subscription - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - # The component subscriptions of the Pricing Plan Subscription. - attr_reader :components - # String representing the object's type. Objects of the same type share the same value of the object field. - attr_reader :object - # 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 - - def self.inner_class_types - @inner_class_types = { components: Component } - end - - def self.field_remappings - @field_remappings = {} - end - end - end - end -end diff --git a/lib/stripe/resources/v2/billing/rate_card.rb b/lib/stripe/resources/v2/billing/rate_card.rb index 00c3f3444..e8dba700f 100644 --- a/lib/stripe/resources/v2/billing/rate_card.rb +++ b/lib/stripe/resources/v2/billing/rate_card.rb @@ -13,6 +13,21 @@ def self.object_name "v2.billing.rate_card" end + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + attr_reader :interval + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + attr_reader :interval_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end # Whether this RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added. attr_reader :active # Timestamp of when the object was created. @@ -25,8 +40,6 @@ def self.object_name attr_reader :display_name # Unique identifier for the object. attr_reader :id - # The ID of this rate card's most recently created version. - attr_reader :latest_version # The ID of the Rate Card Version that will be used by all subscriptions when no specific version is specified. attr_reader :live_version # An internal key you can use to search for a particular RateCard. Maximum length of 200 characters. @@ -35,21 +48,18 @@ def self.object_name attr_reader :metadata # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # The interval for assessing service. For example, a monthly Rate Card with a rate of $1 for the first 10 "workloads" - # and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but - # distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, - # while the billing interval in Cadence deals with the rate the customer is billed. - attr_reader :service_interval - # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - # order to specify quarterly service. - attr_reader :service_interval_count + # The service cycle configuration for this Rate Card. For example, a monthly Rate Card with a rate of $1 for the + # first 10 "workloads" and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." + # This is similar to but distinct from billing interval; the service interval deals with the rate at which the + # customer accumulates fees, while the billing interval in Cadence deals with the rate the customer is billed. + attr_reader :service_cycle # The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax. attr_reader :tax_behavior # 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 def self.inner_class_types - @inner_class_types = {} + @inner_class_types = { service_cycle: ServiceCycle } end def self.field_remappings diff --git a/lib/stripe/resources/v2/billing/rate_card_rate.rb b/lib/stripe/resources/v2/billing/rate_card_rate.rb index f3c923d1f..9f977bb00 100644 --- a/lib/stripe/resources/v2/billing/rate_card_rate.rb +++ b/lib/stripe/resources/v2/billing/rate_card_rate.rb @@ -49,6 +49,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { up_to_decimal: :decimal_string } + end end class TransformQuantity < ::Stripe::StripeObject @@ -64,6 +68,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { divide_by: :int64_string } + end end # Timestamp of when the object was created. attr_reader :created @@ -107,6 +115,16 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { kind: :object, fields: { up_to_decimal: :decimal_string } }, + }, + transform_quantity: { kind: :object, fields: { divide_by: :int64_string } }, + } + end end end end diff --git a/lib/stripe/resources/v2/billing/service_action.rb b/lib/stripe/resources/v2/billing/service_action.rb index f8eceba4e..6f4231acc 100644 --- a/lib/stripe/resources/v2/billing/service_action.rb +++ b/lib/stripe/resources/v2/billing/service_action.rb @@ -28,20 +28,9 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end - end - - class Monetary < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = { value: :decimal_string } end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -52,12 +41,18 @@ def self.field_remappings attr_reader :monetary def self.inner_class_types - @inner_class_types = { custom_pricing_unit: CustomPricingUnit, monetary: Monetary } + @inner_class_types = { custom_pricing_unit: CustomPricingUnit } end def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject @@ -123,6 +118,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end class CreditGrantPerTenant < ::Stripe::StripeObject @@ -142,20 +146,9 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end - end - class Monetary < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = { value: :decimal_string } end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -166,12 +159,18 @@ def self.field_remappings attr_reader :monetary def self.inner_class_types - @inner_class_types = { custom_pricing_unit: CustomPricingUnit, monetary: Monetary } + @inner_class_types = { custom_pricing_unit: CustomPricingUnit } end def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } }, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject @@ -237,6 +236,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + } + end end # Timestamp of when the object was created. attr_reader :created @@ -269,6 +277,29 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + credit_grant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + credit_grant_per_tenant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/core/account.rb b/lib/stripe/resources/v2/core/account.rb index 33bce0f95..aac4c3d0b 100644 --- a/lib/stripe/resources/v2/core/account.rb +++ b/lib/stripe/resources/v2/core/account.rb @@ -3490,6 +3490,8 @@ def self.field_remappings attr_reader :profile # Default responsibilities held by either Stripe or the platform. attr_reader :responsibilities + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + attr_reader :timezone def self.inner_class_types @inner_class_types = { profile: Profile, responsibilities: Responsibilities } @@ -4859,27 +4861,13 @@ def self.field_remappings end class AnnualRevenue < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). attr_reader :amount # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. attr_reader :fiscal_year_end def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings @@ -5108,25 +5096,11 @@ def self.field_remappings end class MonthlyEstimatedRevenue < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 USD). attr_reader :amount def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings @@ -5584,6 +5558,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::StripeObject @@ -5758,6 +5736,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. attr_reader :attestations @@ -5781,6 +5765,17 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + } + end end class Requirements < ::Stripe::StripeObject @@ -5999,6 +5994,22 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/resources/v2/core/account_evaluation.rb b/lib/stripe/resources/v2/core/account_evaluation.rb new file mode 100644 index 000000000..974827cb5 --- /dev/null +++ b/lib/stripe/resources/v2/core/account_evaluation.rb @@ -0,0 +1,106 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + # Account Evaluation resource. + class AccountEvaluation < APIResource + OBJECT_NAME = "v2.core.account_evaluation" + def self.object_name + "v2.core.account_evaluation" + end + + class AccountData < ::Stripe::StripeObject + class Defaults < ::Stripe::StripeObject + class Profile < ::Stripe::StripeObject + # The business URL. + attr_reader :business_url + # Doing business as (DBA) name. + attr_reader :doing_business_as + # Description of the account's product or service. + attr_reader :product_description + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Account profile data. + attr_reader :profile + + def self.inner_class_types + @inner_class_types = { profile: Profile } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class Identity < ::Stripe::StripeObject + class BusinessDetails < ::Stripe::StripeObject + # Registered business name. + attr_reader :registered_name + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # Business details for identity data. + attr_reader :business_details + + def self.inner_class_types + @inner_class_types = { business_details: BusinessDetails } + end + + def self.field_remappings + @field_remappings = {} + end + end + # Default account settings. + attr_reader :defaults + # Identity data. + attr_reader :identity + + def self.inner_class_types + @inner_class_types = { defaults: Defaults, identity: Identity } + end + + def self.field_remappings + @field_remappings = {} + end + end + # The account ID if this evaluation is for an existing account. + attr_reader :account + # Account data if this evaluation is for an account without an existing Stripe entity. + attr_reader :account_data + # Timestamp at which the evaluation was created. + attr_reader :created + # List of signals that were triggered for evaluation. + attr_reader :evaluations_triggered + # Unique identifier for the account evaluation. + attr_reader :id + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + # 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 + + def self.inner_class_types + @inner_class_types = { account_data: AccountData } + end + + def self.field_remappings + @field_remappings = {} + end + end + end + end +end diff --git a/lib/stripe/resources/v2/core/account_person.rb b/lib/stripe/resources/v2/core/account_person.rb index 0e16c9528..54a3dbfc1 100644 --- a/lib/stripe/resources/v2/core/account_person.rb +++ b/lib/stripe/resources/v2/core/account_person.rb @@ -295,6 +295,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { percent_ownership: :decimal_string } + end end class ScriptAddresses < ::Stripe::StripeObject @@ -471,6 +475,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + relationship: { kind: :object, fields: { percent_ownership: :decimal_string } }, + } + end end end end diff --git a/lib/stripe/resources/v2/core/batch_job.rb b/lib/stripe/resources/v2/core/batch_job.rb new file mode 100644 index 000000000..54104a75c --- /dev/null +++ b/lib/stripe/resources/v2/core/batch_job.rb @@ -0,0 +1,479 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + # BatchJob resource. + class BatchJob < APIResource + OBJECT_NAME = "v2.core.batch_job" + def self.object_name + "v2.core.batch_job" + end + + class StatusDetails < ::Stripe::StripeObject + class BatchFailed < ::Stripe::StripeObject + # Details about the `BatchJob` failure. + attr_reader :error + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + + class Canceled < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + attr_reader :expires_at + # The URL that can be used for accessing the file. + attr_reader :url + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + attr_reader :content_type + # A pre-signed URL that allows secure, time-limited access to download the file. + attr_reader :download_url + # The total size of the file in bytes. + attr_reader :size + + def self.inner_class_types + @inner_class_types = { download_url: DownloadUrl } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { size: :int64_string } + end + end + # The total number of records that failed processing. + attr_reader :failure_count + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + attr_reader :output_file + # The total number of records that were successfully processed. + attr_reader :success_count + + def self.inner_class_types + @inner_class_types = { output_file: OutputFile } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + } + end + end + + class Complete < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + attr_reader :expires_at + # The URL that can be used for accessing the file. + attr_reader :url + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + attr_reader :content_type + # A pre-signed URL that allows secure, time-limited access to download the file. + attr_reader :download_url + # The total size of the file in bytes. + attr_reader :size + + def self.inner_class_types + @inner_class_types = { download_url: DownloadUrl } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { size: :int64_string } + end + end + # The total number of records that failed processing. + attr_reader :failure_count + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + attr_reader :output_file + # The total number of records that were successfully processed. + attr_reader :success_count + + def self.inner_class_types + @inner_class_types = { output_file: OutputFile } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + } + end + end + + class InProgress < ::Stripe::StripeObject + # The number of records that failed processing so far. + attr_reader :failure_count + # The number of records that were successfully processed so far. + attr_reader :success_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { failure_count: :int64_string, success_count: :int64_string } + end + end + + class ReadyForUpload < ::Stripe::StripeObject + class UploadUrl < ::Stripe::StripeObject + # The time that the URL expires. + attr_reader :expires_at + # The URL that can be used for accessing the file. + attr_reader :url + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The upload file details. + attr_reader :upload_url + + def self.inner_class_types + @inner_class_types = { upload_url: UploadUrl } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class Timeout < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + attr_reader :expires_at + # The URL that can be used for accessing the file. + attr_reader :url + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + attr_reader :content_type + # A pre-signed URL that allows secure, time-limited access to download the file. + attr_reader :download_url + # The total size of the file in bytes. + attr_reader :size + + def self.inner_class_types + @inner_class_types = { download_url: DownloadUrl } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { size: :int64_string } + end + end + # The total number of records that failed processing. + attr_reader :failure_count + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + attr_reader :output_file + # The total number of records that were successfully processed. + attr_reader :success_count + + def self.inner_class_types + @inner_class_types = { output_file: OutputFile } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + } + end + end + + class Validating < ::Stripe::StripeObject + # The number of records that were validated. Note that there is no failure counter here; + # once we have any validation failures we give up. + attr_reader :validated_count + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { validated_count: :int64_string } + end + end + + class ValidationFailed < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + attr_reader :expires_at + # The URL that can be used for accessing the file. + attr_reader :url + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + attr_reader :content_type + # A pre-signed URL that allows secure, time-limited access to download the file. + attr_reader :download_url + # The total size of the file in bytes. + attr_reader :size + + def self.inner_class_types + @inner_class_types = { download_url: DownloadUrl } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { size: :int64_string } + end + end + # The total number of records that failed processing. + attr_reader :failure_count + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + attr_reader :output_file + # The total number of records that were successfully processed. + attr_reader :success_count + + def self.inner_class_types + @inner_class_types = { output_file: OutputFile } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + } + end + end + # Additional details for the `BATCH_FAILED` status of the `BatchJob`. + attr_reader :batch_failed + # Additional details for the `CANCELED` status of the `BatchJob`. + attr_reader :canceled + # Additional details for the `COMPLETE` status of the `BatchJob`. + attr_reader :complete + # Additional details for the `IN_PROGRESS` status of the `BatchJob`. + attr_reader :in_progress + # Additional details for the `READY_FOR_UPLOAD` status of the `BatchJob`. + attr_reader :ready_for_upload + # Additional details for the `TIMEOUT` status of the `BatchJob`. + attr_reader :timeout + # Additional details for the `VALIDATING` status of the `BatchJob`. + attr_reader :validating + # Additional details for the `VALIDATION_FAILED` status of the `BatchJob`. + attr_reader :validation_failed + + def self.inner_class_types + @inner_class_types = { + batch_failed: BatchFailed, + canceled: Canceled, + complete: Complete, + in_progress: InProgress, + ready_for_upload: ReadyForUpload, + timeout: Timeout, + validating: Validating, + validation_failed: ValidationFailed, + } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + canceled: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + complete: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + in_progress: { + kind: :object, + fields: { failure_count: :int64_string, success_count: :int64_string }, + }, + timeout: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + validating: { kind: :object, fields: { validated_count: :int64_string } }, + validation_failed: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + } + end + end + # Timestamp at which BatchJob was created. + attr_reader :created + # Unique identifier for the BatchJob. + attr_reader :id + # The maximum rps defined for the `BatchJob`. + attr_reader :maximum_rps + # The metadata of the `BatchJob` object. + attr_reader :metadata + # String representing the object's type. Objects of the same type share the same value of the object field. + attr_reader :object + # If the validation will be run previous to the execution of the `BatchJob`. + attr_reader :skip_validation + # The current status of the `BatchJob`. + attr_reader :status + # Additional details about the current state of the `BatchJob`. + attr_reader :status_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 + + def self.inner_class_types + @inner_class_types = { status_details: StatusDetails } + end + + def self.field_remappings + @field_remappings = {} + end + + def self.field_encodings + @field_encodings = { + status_details: { + kind: :object, + fields: { + canceled: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + complete: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + in_progress: { + kind: :object, + fields: { failure_count: :int64_string, success_count: :int64_string }, + }, + timeout: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + validating: { kind: :object, fields: { validated_count: :int64_string } }, + validation_failed: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: { kind: :object, fields: { size: :int64_string } }, + success_count: :int64_string, + }, + }, + }, + }, + } + end + end + end + end +end diff --git a/lib/stripe/resources/v2/core/event_destination.rb b/lib/stripe/resources/v2/core/event_destination.rb index b5e099555..967758fdc 100644 --- a/lib/stripe/resources/v2/core/event_destination.rb +++ b/lib/stripe/resources/v2/core/event_destination.rb @@ -53,6 +53,27 @@ def self.field_remappings end end + class AzureEventGrid < ::Stripe::StripeObject + # The name of the Azure partner topic. + attr_reader :azure_partner_topic_name + # The status of the Azure partner topic. + attr_reader :azure_partner_topic_status + # The Azure region. + attr_reader :azure_region + # The name of the Azure resource group. + attr_reader :azure_resource_group_name + # The Azure subscription ID. + attr_reader :azure_subscription_id + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + class WebhookEndpoint < ::Stripe::StripeObject # The signing secret of the webhook endpoint, only includable on creation. attr_reader :signing_secret @@ -75,7 +96,11 @@ def self.field_remappings attr_reader :enabled_events # Payload type of events being subscribed to. attr_reader :event_payload - # Where events should be routed from. + # Specifies which accounts' events route to this destination. + # `@self`: Receive events from the account that owns the event destination. + # `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + # `@organization_members`: Receive events from accounts directly linked to the organization. + # `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. attr_reader :events_from # Unique identifier for the object. attr_reader :id @@ -99,6 +124,8 @@ def self.field_remappings attr_reader :livemode # Amazon EventBridge configuration. attr_reader :amazon_eventbridge + # Azure Event Grid configuration. + attr_reader :azure_event_grid # Webhook endpoint configuration. attr_reader :webhook_endpoint @@ -106,6 +133,7 @@ def self.inner_class_types @inner_class_types = { status_details: StatusDetails, amazon_eventbridge: AmazonEventbridge, + azure_event_grid: AzureEventGrid, webhook_endpoint: WebhookEndpoint, } end diff --git a/lib/stripe/resources/v2/core/vault/gb_bank_account.rb b/lib/stripe/resources/v2/core/vault/gb_bank_account.rb index 26b2ca038..112249fee 100644 --- a/lib/stripe/resources/v2/core/vault/gb_bank_account.rb +++ b/lib/stripe/resources/v2/core/vault/gb_bank_account.rb @@ -114,6 +114,8 @@ def self.field_remappings attr_reader :object # The Sort Code of the bank account. attr_reader :sort_code + # The list of currencies supported by this bank account. + attr_reader :supported_currencies # 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 diff --git a/lib/stripe/resources/v2/core/vault/us_bank_account.rb b/lib/stripe/resources/v2/core/vault/us_bank_account.rb index d233e6dee..59d24dd50 100644 --- a/lib/stripe/resources/v2/core/vault/us_bank_account.rb +++ b/lib/stripe/resources/v2/core/vault/us_bank_account.rb @@ -81,6 +81,8 @@ def self.field_remappings attr_reader :object # The ACH routing number of the bank account. attr_reader :routing_number + # The list of currencies supported by this bank account. + attr_reader :supported_currencies # The bank account verification details. attr_reader :verification # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. diff --git a/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb b/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb index d3f75f056..9a1b4609d 100644 --- a/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb +++ b/lib/stripe/resources/v2/financial_address_generated_microdeposits.rb @@ -10,20 +10,6 @@ def self.object_name "financial_address_generated_microdeposits" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The amounts of the microdeposits that were generated. attr_reader :amounts # String representing the object's type. Objects of the same type share the same value of the object field. @@ -34,7 +20,7 @@ def self.field_remappings attr_reader :livemode def self.inner_class_types - @inner_class_types = { amounts: Amount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/resources/v2/money_management/adjustment.rb b/lib/stripe/resources/v2/money_management/adjustment.rb index dba316e9d..f1cf3cb70 100644 --- a/lib/stripe/resources/v2/money_management/adjustment.rb +++ b/lib/stripe/resources/v2/money_management/adjustment.rb @@ -35,21 +35,6 @@ def self.field_remappings @field_remappings = {} end end - - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # If applicable, contains information about the original flow linked to this Adjustment. attr_reader :adjusted_flow # The amount of the Adjustment. @@ -72,7 +57,7 @@ def self.field_remappings attr_reader :livemode def self.inner_class_types - @inner_class_types = { adjusted_flow: AdjustedFlow, amount: Amount } + @inner_class_types = { adjusted_flow: AdjustedFlow } end def self.field_remappings diff --git a/lib/stripe/resources/v2/money_management/currency_conversion.rb b/lib/stripe/resources/v2/money_management/currency_conversion.rb index 082f9a731..9605e0c88 100644 --- a/lib/stripe/resources/v2/money_management/currency_conversion.rb +++ b/lib/stripe/resources/v2/money_management/currency_conversion.rb @@ -12,25 +12,11 @@ def self.object_name end class From < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Amount object. attr_reader :amount def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings @@ -39,25 +25,11 @@ def self.field_remappings end class To < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Amount object. attr_reader :amount def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings diff --git a/lib/stripe/resources/v2/money_management/financial_account.rb b/lib/stripe/resources/v2/money_management/financial_account.rb index c1542aaef..eba145b48 100644 --- a/lib/stripe/resources/v2/money_management/financial_account.rb +++ b/lib/stripe/resources/v2/money_management/financial_account.rb @@ -27,50 +27,6 @@ def self.field_remappings end class Balance < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Balance that can be used for money movement. attr_reader :available # Balance of inbound funds that will later transition to the `available` balance. @@ -79,11 +35,7 @@ def self.field_remappings attr_reader :outbound_pending def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @@ -118,12 +70,31 @@ def self.field_remappings end class Payments < ::Stripe::StripeObject - class StartingBalance < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency + class BalanceByFundsType < ::Stripe::StripeObject + class PaymentProcessing < ::Stripe::StripeObject + # Balance that can be used for money movement. + attr_reader :available + # Balance of inbound funds that will later transition to the `available` balance. + attr_reader :inbound_pending + # Balance of funds that are being used for a pending outbound money movement. + attr_reader :outbound_pending + + def self.inner_class_types + @inner_class_types = {} + end + + def self.field_remappings + @field_remappings = {} + end + end + + class StoredValue < ::Stripe::StripeObject + # Balance that can be used for money movement. + attr_reader :available + # Balance of inbound funds that will later transition to the `available` balance. + attr_reader :inbound_pending + # Balance of funds that are being used for a pending outbound money movement. + attr_reader :outbound_pending def self.inner_class_types @inner_class_types = {} @@ -133,19 +104,40 @@ def self.field_remappings @field_remappings = {} end end + # Payment processing funds are those that are received for goods or services and may only be used for payouts to self. These funds may be converted to stored value funds. + attr_reader :payment_processing + # Stored value funds may be used for either payouts to self or payments to others. + attr_reader :stored_value + + def self.inner_class_types + @inner_class_types = { + payment_processing: PaymentProcessing, + stored_value: StoredValue, + } + end + + def self.field_remappings + @field_remappings = {} + end + end + + class StartingBalance < ::Stripe::StripeObject # When the balance was projected. attr_reader :at # The available balance at the time when the balance was projected. attr_reader :available def self.inner_class_types - @inner_class_types = { available: Available } + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end + # The balance of the `payments` FinancialAccount is a mix of payment processing and stored value funds, and this field + # describes the breakdown between the two. The sum will match the balance of the FinancialAccount. + attr_reader :balance_by_funds_type # The currency that non-settlement currency payments will be converted to. attr_reader :default_currency # Settlement currencies enabled for this FinancialAccount. Payments in other currencies will be automatically converted to `default_currency`. @@ -154,7 +146,10 @@ def self.field_remappings attr_reader :starting_balance def self.inner_class_types - @inner_class_types = { starting_balance: StartingBalance } + @inner_class_types = { + balance_by_funds_type: BalanceByFundsType, + starting_balance: StartingBalance, + } end def self.field_remappings @@ -178,9 +173,9 @@ def self.field_remappings @field_remappings = {} end end - # Attribute for field forwarding_settings + # The forwarding settings for the closed FinancialAccount. attr_reader :forwarding_settings - # Attribute for field reason + # The reason the FinancialAccount was closed. attr_reader :reason def self.inner_class_types @@ -191,7 +186,7 @@ def self.field_remappings @field_remappings = {} end end - # Attribute for field closed + # Details related to the closed state of the FinancialAccount. attr_reader :closed def self.inner_class_types @@ -242,7 +237,7 @@ def self.field_remappings attr_reader :payments # Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows. attr_reader :status - # Attribute for field status_details + # Additional details related to the status of the FinancialAccount. attr_reader :status_details # If this is a `storage` FinancialAccount, this hash includes details specific to `storage` FinancialAccounts. attr_reader :storage diff --git a/lib/stripe/resources/v2/money_management/inbound_transfer.rb b/lib/stripe/resources/v2/money_management/inbound_transfer.rb index 645510e70..b58d6baf8 100644 --- a/lib/stripe/resources/v2/money_management/inbound_transfer.rb +++ b/lib/stripe/resources/v2/money_management/inbound_transfer.rb @@ -12,37 +12,7 @@ def self.object_name "v2.money_management.inbound_transfer" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class PaymentMethod < ::Stripe::StripeObject # The type of object this destination represents. For a us bank account, we expect us_bank_account. attr_reader :type @@ -63,7 +33,7 @@ def self.field_remappings attr_reader :payment_method def self.inner_class_types - @inner_class_types = { debited: Debited, payment_method: PaymentMethod } + @inner_class_types = { payment_method: PaymentMethod } end def self.field_remappings @@ -72,27 +42,13 @@ def self.field_remappings end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The amount by which the FinancialAccount balance is credited. attr_reader :credited # The FinancialAccount that funds will land in. attr_reader :financial_account def self.inner_class_types - @inner_class_types = { credited: Credited } + @inner_class_types = {} end def self.field_remappings @@ -180,12 +136,7 @@ def self.field_remappings attr_reader :livemode def self.inner_class_types - @inner_class_types = { - amount: Amount, - from: From, - to: To, - transfer_history: TransferHistory, - } + @inner_class_types = { from: From, to: To, transfer_history: TransferHistory } 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 3022ab8ff..e31d3af7e 100644 --- a/lib/stripe/resources/v2/money_management/outbound_payment.rb +++ b/lib/stripe/resources/v2/money_management/outbound_payment.rb @@ -11,21 +11,6 @@ def self.object_name "v2.money_management.outbound_payment" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class DeliveryOptions < ::Stripe::StripeObject class PaperCheck < ::Stripe::StripeObject # Memo printed on the memo field of the check. @@ -60,27 +45,13 @@ def self.field_remappings end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. attr_reader :debited # The FinancialAccount that funds were pulled from. attr_reader :financial_account def self.inner_class_types - @inner_class_types = { debited: Debited } + @inner_class_types = {} end def self.field_remappings @@ -166,20 +137,6 @@ def self.field_remappings end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. attr_reader :credited # The payout method which the OutboundPayment uses to send payout. @@ -188,7 +145,7 @@ def self.field_remappings attr_reader :recipient def self.inner_class_types - @inner_class_types = { credited: Credited } + @inner_class_types = {} end def self.field_remappings @@ -328,7 +285,6 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { - amount: Amount, delivery_options: DeliveryOptions, from: From, recipient_notification: RecipientNotification, 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 6955a2e5c..0c25681d4 100644 --- a/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +++ b/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb @@ -11,21 +11,6 @@ def self.object_name "v2.money_management.outbound_payment_quote" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class DeliveryOptions < ::Stripe::StripeObject # Open Enum. Speed of the payout. attr_reader :speed @@ -42,27 +27,13 @@ def self.field_remappings end class EstimatedFee < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The fee amount for corresponding fee type. attr_reader :amount # The fee type. attr_reader :type def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings @@ -71,27 +42,13 @@ def self.field_remappings end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. attr_reader :debited # The FinancialAccount that funds were pulled from. attr_reader :financial_account def self.inner_class_types - @inner_class_types = { debited: Debited } + @inner_class_types = {} end def self.field_remappings @@ -133,20 +90,6 @@ def self.field_remappings end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. attr_reader :credited # The payout method which the OutboundPayment uses to send payout. @@ -155,7 +98,7 @@ def self.field_remappings attr_reader :recipient def self.inner_class_types - @inner_class_types = { credited: Credited } + @inner_class_types = {} end def self.field_remappings @@ -186,7 +129,6 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { - amount: Amount, delivery_options: DeliveryOptions, estimated_fees: EstimatedFee, from: From, diff --git a/lib/stripe/resources/v2/money_management/outbound_transfer.rb b/lib/stripe/resources/v2/money_management/outbound_transfer.rb index a247348aa..9f79c741f 100644 --- a/lib/stripe/resources/v2/money_management/outbound_transfer.rb +++ b/lib/stripe/resources/v2/money_management/outbound_transfer.rb @@ -11,21 +11,6 @@ def self.object_name "v2.money_management.outbound_transfer" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class DeliveryOptions < ::Stripe::StripeObject # Open Enum. Method for bank account. attr_reader :bank_account @@ -40,27 +25,13 @@ def self.field_remappings end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. attr_reader :debited # The FinancialAccount that funds were pulled from. attr_reader :financial_account def self.inner_class_types - @inner_class_types = { debited: Debited } + @inner_class_types = {} end def self.field_remappings @@ -132,27 +103,13 @@ def self.field_remappings end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. attr_reader :credited # The payout method which the OutboundTransfer uses to send payout. attr_reader :payout_method def self.inner_class_types - @inner_class_types = { credited: Credited } + @inner_class_types = {} end def self.field_remappings @@ -223,7 +180,6 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { - amount: Amount, delivery_options: DeliveryOptions, from: From, status_details: StatusDetails, diff --git a/lib/stripe/resources/v2/money_management/payout_method.rb b/lib/stripe/resources/v2/money_management/payout_method.rb index b3db75659..c69f4a8e0 100644 --- a/lib/stripe/resources/v2/money_management/payout_method.rb +++ b/lib/stripe/resources/v2/money_management/payout_method.rb @@ -90,6 +90,8 @@ class Card < ::Stripe::StripeObject attr_reader :fingerprint # The last 4 digits of the card number. attr_reader :last4 + # The list of currencies supported by this bank account. + attr_reader :supported_currencies def self.inner_class_types @inner_class_types = {} @@ -132,6 +134,9 @@ def self.field_remappings attr_reader :latest_outbound_setup_intent # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object + # Whether the Payout Method is currently unusable for money movement, despite potentially being correctly set up. + # Please reach out to Stripe Support for more information. + attr_reader :restricted # Closed Enum. The type of payout method. attr_reader :type # Indicates whether the payout method has met the necessary requirements for outbound money movement. diff --git a/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb b/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb index d809f53fe..7adbbbc7f 100644 --- a/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb +++ b/lib/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rb @@ -27,6 +27,8 @@ def self.field_remappings @field_remappings = {} end end + # The currencies supported by the corresponding credentials for bank accounts in the specified country. + attr_reader :currencies # The local name of the field. attr_reader :local_name # The human readable local name of the field. diff --git a/lib/stripe/resources/v2/money_management/received_credit.rb b/lib/stripe/resources/v2/money_management/received_credit.rb index 3e8ba6d0d..814751fc2 100644 --- a/lib/stripe/resources/v2/money_management/received_credit.rb +++ b/lib/stripe/resources/v2/money_management/received_credit.rb @@ -11,36 +11,6 @@ def self.object_name "v2.money_management.received_credit" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class ExternalAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class StatusDetails < ::Stripe::StripeObject class Failed < ::Stripe::StripeObject # Open Enum. The `failed` status reason. @@ -305,8 +275,6 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { - amount: Amount, - external_amount: ExternalAmount, status_details: StatusDetails, status_transitions: StatusTransitions, balance_transfer: BalanceTransfer, diff --git a/lib/stripe/resources/v2/money_management/received_debit.rb b/lib/stripe/resources/v2/money_management/received_debit.rb index ff12ca85f..937bb2e9f 100644 --- a/lib/stripe/resources/v2/money_management/received_debit.rb +++ b/lib/stripe/resources/v2/money_management/received_debit.rb @@ -11,36 +11,6 @@ def self.object_name "v2.money_management.received_debit" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class ExternalAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class StatusDetails < ::Stripe::StripeObject class Failed < ::Stripe::StripeObject # Open Enum. The reason for the failure of the ReceivedDebit. @@ -141,27 +111,13 @@ def self.field_remappings class CardSpend < ::Stripe::StripeObject class Authorization < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Amount associated with this issuing authorization. attr_reader :amount # The reference to the v1 issuing authorization ID. attr_reader :issuing_authorization_v1 def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings @@ -170,27 +126,13 @@ def self.field_remappings end class CardTransaction < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Amount associated with this issuing transaction. attr_reader :amount # The reference to the v1 issuing transaction ID. attr_reader :issuing_transaction_v1 def self.inner_class_types - @inner_class_types = { amount: Amount } + @inner_class_types = {} end def self.field_remappings @@ -265,8 +207,6 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { - amount: Amount, - external_amount: ExternalAmount, status_details: StatusDetails, status_transitions: StatusTransitions, balance_transfer: BalanceTransfer, diff --git a/lib/stripe/resources/v2/money_management/transaction.rb b/lib/stripe/resources/v2/money_management/transaction.rb index 67b90c916..edae675a7 100644 --- a/lib/stripe/resources/v2/money_management/transaction.rb +++ b/lib/stripe/resources/v2/money_management/transaction.rb @@ -11,11 +11,13 @@ def self.object_name "v2.money_management.transaction" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency + class BalanceImpact < ::Stripe::StripeObject + # Impact to the available balance. + attr_reader :available + # Impact to the inbound_pending balance. + attr_reader :inbound_pending + # Impact to the outbound_pending balance. + attr_reader :outbound_pending def self.inner_class_types @inner_class_types = {} @@ -26,64 +28,12 @@ def self.field_remappings end end - class BalanceImpact < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - # Impact to the available balance. - attr_reader :available - # Impact to the inbound_pending balance. - attr_reader :inbound_pending - # Impact to the outbound_pending balance. - attr_reader :outbound_pending + class Counterparty < ::Stripe::StripeObject + # Name of the counterparty. + attr_reader :name def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @@ -132,6 +82,22 @@ class Flow < ::Stripe::StripeObject attr_reader :transfer # If applicable, the ID of the Transfer Reversal that created this Transaction. attr_reader :transfer_reversal + # If applicable, the ID of the Treasury CreditReversal that created this Transaction. + attr_reader :treasury_credit_reversal + # If applicable, the ID of the Treasury DebitReversal that created this Transaction. + attr_reader :treasury_debit_reversal + # If applicable, the ID of the Treasury InboundTransfer that created this Transaction. + attr_reader :treasury_inbound_transfer + # If applicable, the ID of the Treasury IssuingAuthorization that created this Transaction. + attr_reader :treasury_issuing_authorization + # If applicable, the ID of the Treasury OutboundPayment that created this Transaction. + attr_reader :treasury_outbound_payment + # If applicable, the ID of the Treasury OutboundTransfer that created this Transaction. + attr_reader :treasury_outbound_transfer + # If applicable, the ID of the Treasury ReceivedCredit that created this Transaction. + attr_reader :treasury_received_credit + # If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. + attr_reader :treasury_received_debit def self.inner_class_types @inner_class_types = {} @@ -163,8 +129,13 @@ def self.field_remappings attr_reader :balance_impact # Open Enum. A descriptive category used to classify the Transaction. attr_reader :category + # Counterparty to this Transaction. + attr_reader :counterparty # Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. attr_reader :created + # Description of this Transaction. When applicable, the description is copied from the Flow object at the time + # of transaction creation. + attr_reader :description # Indicates the FinancialAccount affected by this Transaction. attr_reader :financial_account # Details about the Flow object that created the Transaction. @@ -181,13 +152,15 @@ def self.field_remappings attr_reader :status # Timestamps for when the Transaction transitioned to a particular status. attr_reader :status_transitions + # The v1 Treasury transaction associated with this transaction. + attr_reader :treasury_transaction # 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 def self.inner_class_types @inner_class_types = { - amount: Amount, balance_impact: BalanceImpact, + counterparty: Counterparty, flow: Flow, status_transitions: StatusTransitions, } diff --git a/lib/stripe/resources/v2/money_management/transaction_entry.rb b/lib/stripe/resources/v2/money_management/transaction_entry.rb index b31a88c21..96412a439 100644 --- a/lib/stripe/resources/v2/money_management/transaction_entry.rb +++ b/lib/stripe/resources/v2/money_management/transaction_entry.rb @@ -12,50 +12,6 @@ def self.object_name end class BalanceImpact < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end # Impact to the available balance. attr_reader :available # Impact to the inbound_pending balance. @@ -64,11 +20,7 @@ def self.field_remappings attr_reader :outbound_pending def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @@ -118,6 +70,22 @@ class Flow < ::Stripe::StripeObject attr_reader :transfer # If applicable, the ID of the Transfer Reversal that created this Transaction. attr_reader :transfer_reversal + # If applicable, the ID of the Treasury CreditReversal that created this Transaction. + attr_reader :treasury_credit_reversal + # If applicable, the ID of the Treasury DebitReversal that created this Transaction. + attr_reader :treasury_debit_reversal + # If applicable, the ID of the Treasury InboundTransfer that created this Transaction. + attr_reader :treasury_inbound_transfer + # If applicable, the ID of the Treasury IssuingAuthorization that created this Transaction. + attr_reader :treasury_issuing_authorization + # If applicable, the ID of the Treasury OutboundPayment that created this Transaction. + attr_reader :treasury_outbound_payment + # If applicable, the ID of the Treasury OutboundTransfer that created this Transaction. + attr_reader :treasury_outbound_transfer + # If applicable, the ID of the Treasury ReceivedCredit that created this Transaction. + attr_reader :treasury_received_credit + # If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. + attr_reader :treasury_received_debit def self.inner_class_types @inner_class_types = {} @@ -156,6 +124,8 @@ def self.field_remappings attr_reader :transaction # Details copied from the transaction that this TransactionEntry belongs to. attr_reader :transaction_details + # The v1 Treasury transaction entry associated with this transaction entry. + attr_reader :treasury_transaction_entry # 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 diff --git a/lib/stripe/resources/v2/payments/off_session_payment.rb b/lib/stripe/resources/v2/payments/off_session_payment.rb index 879e27c9e..79516ee77 100644 --- a/lib/stripe/resources/v2/payments/off_session_payment.rb +++ b/lib/stripe/resources/v2/payments/off_session_payment.rb @@ -16,36 +16,6 @@ def self.object_name "v2.payments.off_session_payment" end - class AmountCapturable < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - - class AmountRequested < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class Capture < ::Stripe::StripeObject # The timestamp when this payment is no longer eligible to be captured. attr_reader :capture_before @@ -173,8 +143,6 @@ def self.field_remappings def self.inner_class_types @inner_class_types = { - amount_capturable: AmountCapturable, - amount_requested: AmountRequested, capture: Capture, payments_orchestration: PaymentsOrchestration, retry_details: RetryDetails, diff --git a/lib/stripe/resources/v2/payments/settlement_allocation_intent.rb b/lib/stripe/resources/v2/payments/settlement_allocation_intent.rb index bfb5e86df..84c739341 100644 --- a/lib/stripe/resources/v2/payments/settlement_allocation_intent.rb +++ b/lib/stripe/resources/v2/payments/settlement_allocation_intent.rb @@ -11,21 +11,6 @@ def self.object_name "v2.payments.settlement_allocation_intent" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class StatusDetails < ::Stripe::StripeObject class Errored < ::Stripe::StripeObject # Stripe doc link to debug the issue. @@ -80,7 +65,7 @@ def self.field_remappings attr_reader :livemode def self.inner_class_types - @inner_class_types = { amount: Amount, status_details: StatusDetails } + @inner_class_types = { status_details: StatusDetails } end def self.field_remappings diff --git a/lib/stripe/resources/v2/payments/settlement_allocation_intent_split.rb b/lib/stripe/resources/v2/payments/settlement_allocation_intent_split.rb index 32b8d2c06..02a6939f2 100644 --- a/lib/stripe/resources/v2/payments/settlement_allocation_intent_split.rb +++ b/lib/stripe/resources/v2/payments/settlement_allocation_intent_split.rb @@ -11,21 +11,6 @@ def self.object_name "v2.payments.settlement_allocation_intent_split" end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - attr_reader :value - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency - - def self.inner_class_types - @inner_class_types = {} - end - - def self.field_remappings - @field_remappings = {} - end - end - class Flow < ::Stripe::StripeObject # Type of the flow linked to the transaction which settled the SettlementAllocationIntentSplit. The field matching this value will contain the ID of the flow. attr_reader :type @@ -54,9 +39,11 @@ def self.field_remappings attr_reader :flow # Unique identifier for the SettlementAllocationIntentSplit. attr_reader :id + # Metadata associated with the SettlementAllocationIntentSplit. + attr_reader :metadata # String representing the object's type. Objects of the same type share the same value of the object field. attr_reader :object - # The ID of the SettlementAllocationIntent that this split belongs too. + # The ID of the SettlementAllocationIntent that this split belongs to. attr_reader :settlement_allocation_intent # The status of the SettlementAllocationIntentSplit. attr_reader :status @@ -66,7 +53,7 @@ def self.field_remappings attr_reader :livemode def self.inner_class_types - @inner_class_types = { amount: Amount, flow: Flow } + @inner_class_types = { flow: Flow } end def self.field_remappings diff --git a/lib/stripe/resources/v2/reporting/report_run.rb b/lib/stripe/resources/v2/reporting/report_run.rb index 2327baf81..82088cede 100644 --- a/lib/stripe/resources/v2/reporting/report_run.rb +++ b/lib/stripe/resources/v2/reporting/report_run.rb @@ -43,6 +43,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { size: :int64_string } + end end # Contains metadata about the file produced by the `ReportRun`, including # its content type, size, and a URL to download its contents. @@ -57,6 +61,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { file: { kind: :object, fields: { size: :int64_string } } } + end end class ResultOptions < ::Stripe::StripeObject @@ -122,6 +130,12 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + result: { kind: :object, fields: { file: { kind: :object, fields: { size: :int64_string } } } }, + } + end end end end diff --git a/lib/stripe/resources/v2/tax/manual_rule.rb b/lib/stripe/resources/v2/tax/manual_rule.rb index 9ac3864b6..c185531d2 100644 --- a/lib/stripe/resources/v2/tax/manual_rule.rb +++ b/lib/stripe/resources/v2/tax/manual_rule.rb @@ -67,6 +67,10 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { percentage: :decimal_string } + end end # The tax rates to be applied. attr_reader :rates @@ -80,6 +84,15 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: { kind: :object, fields: { percentage: :decimal_string } }, + }, + } + end end # The time at which the ManualRule object was created. attr_reader :created @@ -109,6 +122,23 @@ def self.inner_class_types def self.field_remappings @field_remappings = {} end + + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: { kind: :object, fields: { percentage: :decimal_string } }, + }, + }, + }, + }, + } + end end end end diff --git a/lib/stripe/services.rb b/lib/stripe/services.rb index ac4bd3d8e..7643c1c2a 100644 --- a/lib/stripe/services.rb +++ b/lib/stripe/services.rb @@ -236,7 +236,6 @@ require "stripe/services/v2/billing/intent_service" require "stripe/services/v2/billing/intents/action_service" require "stripe/services/v2/billing/license_fee_service" -require "stripe/services/v2/billing/license_fee_subscription_service" require "stripe/services/v2/billing/license_fees/version_service" require "stripe/services/v2/billing/licensed_item_service" require "stripe/services/v2/billing/meter_event_adjustment_service" @@ -247,7 +246,6 @@ require "stripe/services/v2/billing/one_time_item_service" require "stripe/services/v2/billing/pricing_plan_service" require "stripe/services/v2/billing/pricing_plan_subscription_service" -require "stripe/services/v2/billing/pricing_plan_subscriptions/component_service" require "stripe/services/v2/billing/pricing_plans/component_service" require "stripe/services/v2/billing/pricing_plans/version_service" require "stripe/services/v2/billing/profile_service" @@ -258,11 +256,13 @@ require "stripe/services/v2/billing/rate_cards/version_service" require "stripe/services/v2/billing/service_action_service" require "stripe/services/v2/billing_service" +require "stripe/services/v2/core/account_evaluation_service" require "stripe/services/v2/core/account_link_service" require "stripe/services/v2/core/account_service" require "stripe/services/v2/core/account_token_service" require "stripe/services/v2/core/accounts/person_service" require "stripe/services/v2/core/accounts/person_token_service" +require "stripe/services/v2/core/batch_job_service" require "stripe/services/v2/core/claimable_sandbox_service" require "stripe/services/v2/core/connection_session_service" require "stripe/services/v2/core/event_destination_service" diff --git a/lib/stripe/services/billing/alert_service.rb b/lib/stripe/services/billing/alert_service.rb index e076a8037..17b6e98b8 100644 --- a/lib/stripe/services/billing/alert_service.rb +++ b/lib/stripe/services/billing/alert_service.rb @@ -28,6 +28,8 @@ def archive(id, params = {}, opts = {}) # Creates a billing alert def create(params = {}, opts = {}) + params = Billing::AlertCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/billing/alerts", diff --git a/lib/stripe/services/billing/credit_grant_service.rb b/lib/stripe/services/billing/credit_grant_service.rb index ccb7414b0..0f567d7cf 100644 --- a/lib/stripe/services/billing/credit_grant_service.rb +++ b/lib/stripe/services/billing/credit_grant_service.rb @@ -6,6 +6,8 @@ module Billing class CreditGrantService < StripeService # Creates a credit grant. def create(params = {}, opts = {}) + params = Billing::CreditGrantCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/billing/credit_grants", diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb index c5864b5f9..734180cc8 100644 --- a/lib/stripe/services/checkout/session_service.rb +++ b/lib/stripe/services/checkout/session_service.rb @@ -24,6 +24,8 @@ def approve(session, params = {}, opts = {}) # Creates a Checkout Session object. def create(params = {}, opts = {}) + params = Checkout::SessionCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/checkout/sessions", @@ -72,6 +74,8 @@ def retrieve(session, params = {}, opts = {}) # # Related guide: [Dynamically update a Checkout Session](https://docs.stripe.com/payments/advanced/dynamic-updates) def update(session, params = {}, opts = {}) + params = Checkout::SessionUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/checkout/sessions/%s", { session: CGI.escape(session) }), diff --git a/lib/stripe/services/climate/order_service.rb b/lib/stripe/services/climate/order_service.rb index ee37d3a8b..f4c8e45ca 100644 --- a/lib/stripe/services/climate/order_service.rb +++ b/lib/stripe/services/climate/order_service.rb @@ -21,6 +21,8 @@ def cancel(order, params = {}, opts = {}) # Creates a Climate order object for a given Climate product. The order will be processed immediately # after creation and payment will be deducted your Stripe balance. def create(params = {}, opts = {}) + params = Climate::OrderCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/climate/orders", diff --git a/lib/stripe/services/credit_note_preview_lines_service.rb b/lib/stripe/services/credit_note_preview_lines_service.rb index 392dd619a..527ed95c2 100644 --- a/lib/stripe/services/credit_note_preview_lines_service.rb +++ b/lib/stripe/services/credit_note_preview_lines_service.rb @@ -5,6 +5,8 @@ module Stripe class CreditNotePreviewLinesService < StripeService # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. def list(params = {}, opts = {}) + params = CreditNotePreviewLinesListParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :get, path: "/v1/credit_notes/preview/lines", diff --git a/lib/stripe/services/credit_note_service.rb b/lib/stripe/services/credit_note_service.rb index 9fa15a2d8..e87166baa 100644 --- a/lib/stripe/services/credit_note_service.rb +++ b/lib/stripe/services/credit_note_service.rb @@ -25,6 +25,8 @@ def initialize(requestor) # You may issue multiple credit notes for an invoice. Each credit note may increment the invoice's pre_payment_credit_notes_amount, # post_payment_credit_notes_amount, or both, depending on the invoice's amount_remaining at the time of credit note creation. def create(params = {}, opts = {}) + params = CreditNoteCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/credit_notes", @@ -47,6 +49,8 @@ def list(params = {}, opts = {}) # Get a preview of a credit note without creating it. def preview(params = {}, opts = {}) + params = CreditNotePreviewParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :get, path: "/v1/credit_notes/preview", diff --git a/lib/stripe/services/invoice_item_service.rb b/lib/stripe/services/invoice_item_service.rb index 9c69a6205..c19a65c2a 100644 --- a/lib/stripe/services/invoice_item_service.rb +++ b/lib/stripe/services/invoice_item_service.rb @@ -5,6 +5,8 @@ module Stripe class InvoiceItemService < StripeService # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. def create(params = {}, opts = {}) + params = InvoiceItemCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/invoiceitems", @@ -49,6 +51,8 @@ def retrieve(invoiceitem, params = {}, opts = {}) # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. def update(invoiceitem, params = {}, opts = {}) + params = InvoiceItemUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/invoiceitems/%s", { invoiceitem: CGI.escape(invoiceitem) }), diff --git a/lib/stripe/services/invoice_line_item_service.rb b/lib/stripe/services/invoice_line_item_service.rb index e8edbbc54..6e9a8c567 100644 --- a/lib/stripe/services/invoice_line_item_service.rb +++ b/lib/stripe/services/invoice_line_item_service.rb @@ -19,6 +19,8 @@ def list(invoice, params = {}, opts = {}) # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. # Updating an invoice's line item is only possible before the invoice is finalized. def update(invoice, line_item_id, params = {}, opts = {}) + params = InvoiceLineItemUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/invoices/%s/lines/%s", { invoice: CGI.escape(invoice), line_item_id: CGI.escape(line_item_id) }), diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb index bee24731c..b53b595f3 100644 --- a/lib/stripe/services/invoice_service.rb +++ b/lib/stripe/services/invoice_service.rb @@ -12,6 +12,8 @@ def initialize(requestor) # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. def add_lines(invoice, params = {}, opts = {}) + params = InvoiceAddLinesParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/invoices/%s/add_lines", { invoice: CGI.escape(invoice) }), @@ -56,6 +58,8 @@ def create(params = {}, opts = {}) # # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) def create_preview(params = {}, opts = {}) + params = InvoiceCreatePreviewParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/invoices/create_preview", @@ -192,6 +196,8 @@ def update(invoice, params = {}, opts = {}) # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. def update_lines(invoice, params = {}, opts = {}) + params = InvoiceUpdateLinesParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/invoices/%s/update_lines", { invoice: CGI.escape(invoice) }), diff --git a/lib/stripe/services/order_service.rb b/lib/stripe/services/order_service.rb index 418787df7..5f165e0ff 100644 --- a/lib/stripe/services/order_service.rb +++ b/lib/stripe/services/order_service.rb @@ -5,6 +5,8 @@ module Stripe class OrderService < StripeService # Creates a new open order object. def create(params = {}, opts = {}) + params = OrderCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request(method: :post, path: "/v1/orders", params: params, opts: opts, base_address: :api) end @@ -37,6 +39,8 @@ def submit(id, params = {}, opts = {}) # Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. def update(id, params = {}, opts = {}) + params = OrderUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/orders/%s", { id: CGI.escape(id) }), diff --git a/lib/stripe/services/payment_link_service.rb b/lib/stripe/services/payment_link_service.rb index 0a932b0ee..e8dba76fd 100644 --- a/lib/stripe/services/payment_link_service.rb +++ b/lib/stripe/services/payment_link_service.rb @@ -12,6 +12,8 @@ def initialize(requestor) # Creates a payment link. def create(params = {}, opts = {}) + params = PaymentLinkCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/payment_links", diff --git a/lib/stripe/services/plan_service.rb b/lib/stripe/services/plan_service.rb index 8d0799186..e48af9613 100644 --- a/lib/stripe/services/plan_service.rb +++ b/lib/stripe/services/plan_service.rb @@ -5,6 +5,8 @@ module Stripe class PlanService < StripeService # You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. def create(params = {}, opts = {}) + params = PlanCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request(method: :post, path: "/v1/plans", params: params, opts: opts, base_address: :api) end diff --git a/lib/stripe/services/price_service.rb b/lib/stripe/services/price_service.rb index 1f56544ed..1708dae1b 100644 --- a/lib/stripe/services/price_service.rb +++ b/lib/stripe/services/price_service.rb @@ -5,6 +5,8 @@ module Stripe class PriceService < StripeService # Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time. def create(params = {}, opts = {}) + params = PriceCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request(method: :post, path: "/v1/prices", params: params, opts: opts, base_address: :api) end diff --git a/lib/stripe/services/product_service.rb b/lib/stripe/services/product_service.rb index a5652db7c..38f989963 100644 --- a/lib/stripe/services/product_service.rb +++ b/lib/stripe/services/product_service.rb @@ -12,6 +12,8 @@ def initialize(requestor) # Creates a new product object. def create(params = {}, opts = {}) + params = ProductCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request(method: :post, path: "/v1/products", params: params, opts: opts, base_address: :api) end diff --git a/lib/stripe/services/quote_service.rb b/lib/stripe/services/quote_service.rb index bf3190b63..167cfadf2 100644 --- a/lib/stripe/services/quote_service.rb +++ b/lib/stripe/services/quote_service.rb @@ -39,6 +39,8 @@ def cancel(quote, params = {}, opts = {}) # A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). def create(params = {}, opts = {}) + params = QuoteCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request(method: :post, path: "/v1/quotes", params: params, opts: opts, base_address: :api) end @@ -128,6 +130,8 @@ def retrieve(quote, params = {}, opts = {}) # A quote models prices and services for a customer. def update(quote, params = {}, opts = {}) + params = QuoteUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/quotes/%s", { quote: CGI.escape(quote) }), diff --git a/lib/stripe/services/subscription_item_service.rb b/lib/stripe/services/subscription_item_service.rb index 78ab0cb35..bf4c67663 100644 --- a/lib/stripe/services/subscription_item_service.rb +++ b/lib/stripe/services/subscription_item_service.rb @@ -5,6 +5,8 @@ module Stripe class SubscriptionItemService < StripeService # Adds a new item to an existing subscription. No existing items will be changed or replaced. def create(params = {}, opts = {}) + params = SubscriptionItemCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/subscription_items", @@ -49,6 +51,8 @@ def retrieve(item, params = {}, opts = {}) # Updates the plan or quantity of an item on a current subscription. def update(item, params = {}, opts = {}) + params = SubscriptionItemUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/subscription_items/%s", { item: CGI.escape(item) }), diff --git a/lib/stripe/services/subscription_schedule_service.rb b/lib/stripe/services/subscription_schedule_service.rb index 214bd461f..46698957d 100644 --- a/lib/stripe/services/subscription_schedule_service.rb +++ b/lib/stripe/services/subscription_schedule_service.rb @@ -27,6 +27,8 @@ def cancel(schedule, params = {}, opts = {}) # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. def create(params = {}, opts = {}) + params = SubscriptionScheduleCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/subscription_schedules", @@ -71,6 +73,8 @@ def retrieve(schedule, params = {}, opts = {}) # Updates an existing subscription schedule. def update(schedule, params = {}, opts = {}) + params = SubscriptionScheduleUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/subscription_schedules/%s", { schedule: CGI.escape(schedule) }), diff --git a/lib/stripe/services/subscription_service.rb b/lib/stripe/services/subscription_service.rb index 6e23dea1c..75d86b351 100644 --- a/lib/stripe/services/subscription_service.rb +++ b/lib/stripe/services/subscription_service.rb @@ -37,6 +37,8 @@ def cancel(subscription_exposed_id, params = {}, opts = {}) # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://docs.stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead. # Schedules provide the flexibility to model more complex billing configurations that change over time. def create(params = {}, opts = {}) + params = SubscriptionCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v1/subscriptions", @@ -148,6 +150,8 @@ def search(params = {}, opts = {}) # # Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing](https://docs.stripe.com/docs/rate-limits) instead. def update(subscription_exposed_id, params = {}, opts = {}) + params = SubscriptionUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v1/subscriptions/%s", { subscription_exposed_id: CGI.escape(subscription_exposed_id) }), diff --git a/lib/stripe/services/test_helpers/issuing/authorization_service.rb b/lib/stripe/services/test_helpers/issuing/authorization_service.rb index 45c620db9..27eb9bff8 100644 --- a/lib/stripe/services/test_helpers/issuing/authorization_service.rb +++ b/lib/stripe/services/test_helpers/issuing/authorization_service.rb @@ -7,6 +7,10 @@ module Issuing class AuthorizationService < StripeService # Capture a test-mode authorization. def capture(authorization, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = TestHelpers::Issuing::AuthorizationCaptureParams.coerce_params(params) + end + request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%s/capture", { authorization: CGI.escape(authorization) }), @@ -18,6 +22,10 @@ def capture(authorization, params = {}, opts = {}) # Create a test-mode authorization. def create(params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = TestHelpers::Issuing::AuthorizationCreateParams.coerce_params(params) + end + request( method: :post, path: "/v1/test_helpers/issuing/authorizations", @@ -40,6 +48,10 @@ def expire(authorization, params = {}, opts = {}) # Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. def finalize_amount(authorization, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = TestHelpers::Issuing::AuthorizationFinalizeAmountParams.coerce_params(params) + end + request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%s/finalize_amount", { authorization: CGI.escape(authorization) }), diff --git a/lib/stripe/services/test_helpers/issuing/transaction_service.rb b/lib/stripe/services/test_helpers/issuing/transaction_service.rb index 021d133d0..91f3d8ff2 100644 --- a/lib/stripe/services/test_helpers/issuing/transaction_service.rb +++ b/lib/stripe/services/test_helpers/issuing/transaction_service.rb @@ -7,6 +7,10 @@ module Issuing class TransactionService < StripeService # Allows the user to capture an arbitrary amount, also known as a forced capture. def create_force_capture(params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = TestHelpers::Issuing::TransactionCreateForceCaptureParams.coerce_params(params) + end + request( method: :post, path: "/v1/test_helpers/issuing/transactions/create_force_capture", @@ -18,6 +22,10 @@ def create_force_capture(params = {}, opts = {}) # Allows the user to refund an arbitrary amount, also known as a unlinked refund. def create_unlinked_refund(params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams.coerce_params(params) + end + request( method: :post, path: "/v1/test_helpers/issuing/transactions/create_unlinked_refund", diff --git a/lib/stripe/services/v2/billing/collection_setting_service.rb b/lib/stripe/services/v2/billing/collection_setting_service.rb index 7bb2e9887..91c0f81e4 100644 --- a/lib/stripe/services/v2/billing/collection_setting_service.rb +++ b/lib/stripe/services/v2/billing/collection_setting_service.rb @@ -14,6 +14,10 @@ def initialize(requestor) # Create a CollectionSetting object. def create(params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Billing::CollectionSettingCreateParams.coerce_params(params) + end + request( method: :post, path: "/v2/billing/collection_settings", @@ -47,6 +51,10 @@ def retrieve(id, params = {}, opts = {}) # Update fields on an existing CollectionSetting. def update(id, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Billing::CollectionSettingUpdateParams.coerce_params(params) + end + request( method: :post, path: format("/v2/billing/collection_settings/%s", { id: CGI.escape(id) }), diff --git a/lib/stripe/services/v2/billing/intent_service.rb b/lib/stripe/services/v2/billing/intent_service.rb index 33af34431..ca5bbfe5f 100644 --- a/lib/stripe/services/v2/billing/intent_service.rb +++ b/lib/stripe/services/v2/billing/intent_service.rb @@ -36,6 +36,8 @@ def commit(id, params = {}, opts = {}) # Create a Billing Intent. def create(params = {}, opts = {}) + params = V2::Billing::IntentCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v2/billing/intents", diff --git a/lib/stripe/services/v2/billing/license_fee_service.rb b/lib/stripe/services/v2/billing/license_fee_service.rb index 5b19b6e72..ec6744336 100644 --- a/lib/stripe/services/v2/billing/license_fee_service.rb +++ b/lib/stripe/services/v2/billing/license_fee_service.rb @@ -14,6 +14,8 @@ def initialize(requestor) # Create a License Fee object. def create(params = {}, opts = {}) + params = V2::Billing::LicenseFeeCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v2/billing/license_fees", @@ -47,6 +49,8 @@ def retrieve(id, params = {}, opts = {}) # Update a License Fee object. def update(id, params = {}, opts = {}) + params = V2::Billing::LicenseFeeUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v2/billing/license_fees/%s", { id: CGI.escape(id) }), diff --git a/lib/stripe/services/v2/billing/license_fee_subscription_service.rb b/lib/stripe/services/v2/billing/license_fee_subscription_service.rb deleted file mode 100644 index 82c27146c..000000000 --- a/lib/stripe/services/v2/billing/license_fee_subscription_service.rb +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - module V2 - module Billing - class LicenseFeeSubscriptionService < StripeService - # Retrieve a License Fee Subscription object. - def retrieve(id, params = {}, opts = {}) - request( - method: :get, - path: format("/v2/billing/license_fee_subscriptions/%s", { id: CGI.escape(id) }), - params: params, - opts: opts, - base_address: :api - ) - end - end - end - end -end diff --git a/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb b/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb index b45edb761..8e0f4df4d 100644 --- a/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb +++ b/lib/stripe/services/v2/billing/pricing_plan_subscription_service.rb @@ -5,14 +5,6 @@ module Stripe module V2 module Billing class PricingPlanSubscriptionService < StripeService - attr_reader :components - - def initialize(requestor) - super - @components = Stripe::V2::Billing::PricingPlanSubscriptions::ComponentService - .new(@requestor) - end - # List all Pricing Plan Subscription objects. def list(params = {}, opts = {}) request( @@ -24,6 +16,17 @@ def list(params = {}, opts = {}) ) end + # Remove Discounts from a Pricing Plan Subscription. + def remove_discounts(id, params = {}, opts = {}) + request( + method: :post, + path: format("/v2/billing/pricing_plan_subscriptions/%s/remove_discounts", { id: CGI.escape(id) }), + params: params, + opts: opts, + base_address: :api + ) + end + # Retrieve a Pricing Plan Subscription object. def retrieve(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rb b/lib/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rb deleted file mode 100644 index 837338cea..000000000 --- a/lib/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rb +++ /dev/null @@ -1,23 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -module Stripe - module V2 - module Billing - module PricingPlanSubscriptions - class ComponentService < StripeService - # Retrieve a Pricing Plan Subscription's components. - def retrieve(id, params = {}, opts = {}) - request( - method: :get, - path: format("/v2/billing/pricing_plan_subscriptions/%s/components", { id: CGI.escape(id) }), - params: params, - opts: opts, - base_address: :api - ) - end - end - end - end - end -end diff --git a/lib/stripe/services/v2/billing/rate_card_service.rb b/lib/stripe/services/v2/billing/rate_card_service.rb index 8b883cebb..8a6d06acc 100644 --- a/lib/stripe/services/v2/billing/rate_card_service.rb +++ b/lib/stripe/services/v2/billing/rate_card_service.rb @@ -37,6 +37,21 @@ def list(params = {}, opts = {}) ) end + # Creates, updates, and/or deletes multiple Rates on a Rate Card atomically. + def modify_rates(id, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Billing::RateCardModifyRatesParams.coerce_params(params) + end + + request( + method: :post, + path: format("/v2/billing/rate_cards/%s/modify_rates", { id: CGI.escape(id) }), + params: params, + opts: opts, + base_address: :api + ) + end + # Retrieve the latest version of a Rate Card object. def retrieve(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/billing/rate_cards/rate_service.rb b/lib/stripe/services/v2/billing/rate_cards/rate_service.rb index 0fd043d06..920f8ee24 100644 --- a/lib/stripe/services/v2/billing/rate_cards/rate_service.rb +++ b/lib/stripe/services/v2/billing/rate_cards/rate_service.rb @@ -9,6 +9,10 @@ class RateService < StripeService # Set the Rate for a Metered Item on the latest version of a Rate Card object. This will create a new Rate Card version # if the Metered Item already has a rate on the Rate Card. def create(rate_card_id, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Billing::RateCards::RateCreateParams.coerce_params(params) + end + request( method: :post, path: format("/v2/billing/rate_cards/%s/rates", { rate_card_id: CGI.escape(rate_card_id) }), @@ -29,7 +33,7 @@ def delete(rate_card_id, id, params = {}, opts = {}) ) end - # List all Rates associated with a Rate Card for a specific version (defaults to latest). Rates remain active for all subsequent versions until a new rate is created for the same Metered Item. + # List all Rates associated with a Rate Card for a specific version. Defaults to latest. Rates remain active for all subsequent versions until a new rate is created for the same Metered Item. def list(rate_card_id, params = {}, opts = {}) request( method: :get, diff --git a/lib/stripe/services/v2/billing/service_action_service.rb b/lib/stripe/services/v2/billing/service_action_service.rb index 4967a3eb2..1a25f2d48 100644 --- a/lib/stripe/services/v2/billing/service_action_service.rb +++ b/lib/stripe/services/v2/billing/service_action_service.rb @@ -7,6 +7,10 @@ module Billing class ServiceActionService < StripeService # Create a Service Action object. def create(params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Billing::ServiceActionCreateParams.coerce_params(params) + end + request( method: :post, path: "/v2/billing/service_actions", diff --git a/lib/stripe/services/v2/billing_service.rb b/lib/stripe/services/v2/billing_service.rb index c2a520ac6..dfa4662a7 100644 --- a/lib/stripe/services/v2/billing_service.rb +++ b/lib/stripe/services/v2/billing_service.rb @@ -4,7 +4,7 @@ module Stripe module V2 class BillingService < StripeService - attr_reader :bill_settings, :cadences, :collection_settings, :custom_pricing_units, :intents, :license_fees, :license_fee_subscriptions, :licensed_items, :meter_events, :meter_event_adjustments, :meter_event_session, :meter_event_stream, :metered_items, :one_time_items, :pricing_plans, :pricing_plan_subscriptions, :profiles, :rate_cards, :rate_card_subscriptions, :service_actions + attr_reader :bill_settings, :cadences, :collection_settings, :custom_pricing_units, :intents, :license_fees, :licensed_items, :meter_events, :meter_event_adjustments, :meter_event_session, :meter_event_stream, :metered_items, :one_time_items, :pricing_plans, :pricing_plan_subscriptions, :profiles, :rate_cards, :rate_card_subscriptions, :service_actions def initialize(requestor) super @@ -14,8 +14,6 @@ def initialize(requestor) @custom_pricing_units = Stripe::V2::Billing::CustomPricingUnitService.new(@requestor) @intents = Stripe::V2::Billing::IntentService.new(@requestor) @license_fees = Stripe::V2::Billing::LicenseFeeService.new(@requestor) - @license_fee_subscriptions = Stripe::V2::Billing::LicenseFeeSubscriptionService - .new(@requestor) @licensed_items = Stripe::V2::Billing::LicensedItemService.new(@requestor) @meter_events = Stripe::V2::Billing::MeterEventService.new(@requestor) @meter_event_adjustments = Stripe::V2::Billing::MeterEventAdjustmentService.new(@requestor) diff --git a/lib/stripe/services/v2/core/account_evaluation_service.rb b/lib/stripe/services/v2/core/account_evaluation_service.rb new file mode 100644 index 000000000..6c9523bf8 --- /dev/null +++ b/lib/stripe/services/v2/core/account_evaluation_service.rb @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + class AccountEvaluationService < StripeService + # Creates a new account evaluation to trigger signal evaluations on an account or account data. + def create(params = {}, opts = {}) + request( + method: :post, + path: "/v2/core/account_evaluations", + params: params, + opts: opts, + base_address: :api + ) + end + end + end + end +end diff --git a/lib/stripe/services/v2/core/account_service.rb b/lib/stripe/services/v2/core/account_service.rb index f4a8e8b69..ea772d6a3 100644 --- a/lib/stripe/services/v2/core/account_service.rb +++ b/lib/stripe/services/v2/core/account_service.rb @@ -30,6 +30,8 @@ def close(id, params = {}, opts = {}) # # ** raises RateLimitError def create(params = {}, opts = {}) + params = V2::Core::AccountCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v2/core/accounts", @@ -69,6 +71,8 @@ def retrieve(id, params = {}, opts = {}) # # ** raises RateLimitError def update(id, params = {}, opts = {}) + params = V2::Core::AccountUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v2/core/accounts/%s", { id: CGI.escape(id) }), diff --git a/lib/stripe/services/v2/core/account_token_service.rb b/lib/stripe/services/v2/core/account_token_service.rb index ddb047147..d2a49d125 100644 --- a/lib/stripe/services/v2/core/account_token_service.rb +++ b/lib/stripe/services/v2/core/account_token_service.rb @@ -9,6 +9,8 @@ class AccountTokenService < StripeService # # ** raises RateLimitError def create(params = {}, opts = {}) + params = V2::Core::AccountTokenCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v2/core/account_tokens", diff --git a/lib/stripe/services/v2/core/accounts/person_service.rb b/lib/stripe/services/v2/core/accounts/person_service.rb index 4001c7d10..0f63ca184 100644 --- a/lib/stripe/services/v2/core/accounts/person_service.rb +++ b/lib/stripe/services/v2/core/accounts/person_service.rb @@ -10,6 +10,10 @@ class PersonService < StripeService # # ** raises RateLimitError def create(account_id, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Core::Accounts::PersonCreateParams.coerce_params(params) + end + request( method: :post, path: format("/v2/core/accounts/%s/persons", { account_id: CGI.escape(account_id) }), @@ -62,6 +66,10 @@ def retrieve(account_id, id, params = {}, opts = {}) # # ** raises RateLimitError def update(account_id, id, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Core::Accounts::PersonUpdateParams.coerce_params(params) + end + request( method: :post, path: format("/v2/core/accounts/%s/persons/%s", { account_id: CGI.escape(account_id), id: CGI.escape(id) }), 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 943997407..e0a87c539 100644 --- a/lib/stripe/services/v2/core/accounts/person_token_service.rb +++ b/lib/stripe/services/v2/core/accounts/person_token_service.rb @@ -10,6 +10,10 @@ class PersonTokenService < StripeService # # ** raises RateLimitError def create(account_id, params = {}, opts = {}) + unless params.is_a?(Stripe::RequestParams) + params = V2::Core::Accounts::PersonTokenCreateParams.coerce_params(params) + end + request( method: :post, path: format("/v2/core/accounts/%s/person_tokens", { account_id: CGI.escape(account_id) }), diff --git a/lib/stripe/services/v2/core/batch_job_service.rb b/lib/stripe/services/v2/core/batch_job_service.rb new file mode 100644 index 000000000..1465c8600 --- /dev/null +++ b/lib/stripe/services/v2/core/batch_job_service.rb @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module V2 + module Core + class BatchJobService < StripeService + # Cancels an existing batch job. + def cancel(id, params = {}, opts = {}) + request( + method: :post, + path: format("/v2/core/batch_jobs/%s/cancel", { id: CGI.escape(id) }), + params: params, + opts: opts, + base_address: :api + ) + end + + # Creates a new batch job. + def create(params = {}, opts = {}) + request( + method: :post, + path: "/v2/core/batch_jobs", + params: params, + opts: opts, + base_address: :api + ) + end + + # Retrieves an existing batch job. + def retrieve(id, params = {}, opts = {}) + request( + method: :get, + path: format("/v2/core/batch_jobs/%s", { id: CGI.escape(id) }), + params: params, + opts: opts, + base_address: :api + ) + end + end + end + end +end diff --git a/lib/stripe/services/v2/core_service.rb b/lib/stripe/services/v2/core_service.rb index c47b6dd50..964df1fc4 100644 --- a/lib/stripe/services/v2/core_service.rb +++ b/lib/stripe/services/v2/core_service.rb @@ -4,13 +4,15 @@ module Stripe module V2 class CoreService < StripeService - attr_reader :accounts, :account_links, :account_tokens, :claimable_sandboxes, :connection_sessions, :events, :event_destinations, :vault + attr_reader :accounts, :account_evaluations, :account_links, :account_tokens, :batch_jobs, :claimable_sandboxes, :connection_sessions, :events, :event_destinations, :vault def initialize(requestor) super @accounts = Stripe::V2::Core::AccountService.new(@requestor) + @account_evaluations = Stripe::V2::Core::AccountEvaluationService.new(@requestor) @account_links = Stripe::V2::Core::AccountLinkService.new(@requestor) @account_tokens = Stripe::V2::Core::AccountTokenService.new(@requestor) + @batch_jobs = Stripe::V2::Core::BatchJobService.new(@requestor) @claimable_sandboxes = Stripe::V2::Core::ClaimableSandboxService.new(@requestor) @connection_sessions = Stripe::V2::Core::ConnectionSessionService.new(@requestor) @events = Stripe::V2::Core::EventService.new(@requestor) diff --git a/lib/stripe/services/v2/tax/manual_rule_service.rb b/lib/stripe/services/v2/tax/manual_rule_service.rb index afe8939cc..0d14137a6 100644 --- a/lib/stripe/services/v2/tax/manual_rule_service.rb +++ b/lib/stripe/services/v2/tax/manual_rule_service.rb @@ -7,6 +7,8 @@ module Tax class ManualRuleService < StripeService # Creates a ManualRule object. def create(params = {}, opts = {}) + params = V2::Tax::ManualRuleCreateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: "/v2/tax/manual_rules", @@ -51,6 +53,8 @@ def retrieve(id, params = {}, opts = {}) # Updates the Tax configuration for a ManualRule object. def update(id, params = {}, opts = {}) + params = V2::Tax::ManualRuleUpdateParams.coerce_params(params) unless params.is_a?(Stripe::RequestParams) + request( method: :post, path: format("/v2/tax/manual_rules/%s", { id: CGI.escape(id) }), diff --git a/lib/stripe/stripe_client.rb b/lib/stripe/stripe_client.rb index 5e4d7236c..fb6a89be5 100644 --- a/lib/stripe/stripe_client.rb +++ b/lib/stripe/stripe_client.rb @@ -68,6 +68,12 @@ def parse_event_notification(payload, sig_header, secret, tolerance: Webhook::DE parsed = JSON.parse(payload, symbolize_names: true) + if parsed[:object] == "event" + raise ArgumentError, + "You passed a webhook payload to StripeClient#parse_event_notification, which " \ + "expects an event notification. Use Webhook.construct_event instead." + end + cls = Util.event_notification_classes.fetch(parsed[:type], Stripe::Events::UnknownEventNotification) cls.new(parsed, self) diff --git a/lib/stripe/stripe_object.rb b/lib/stripe/stripe_object.rb index 30b77262e..dedc15831 100644 --- a/lib/stripe/stripe_object.rb +++ b/lib/stripe/stripe_object.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require "bigdecimal" + module Stripe class StripeObject include Enumerable @@ -155,6 +157,9 @@ def update_attributes(values, opts = {}, dirty: true) values.each do |k, v| add_accessors([k], values) unless metaclass.method_defined?(k.to_sym) @values[k] = convert_value_with_inner_types(k, v, opts) + if self.class.field_encodings[k.to_sym] == :decimal_string && @values[k].is_a?(String) + @values[k] = BigDecimal(@values[k]) + end dirty_value!(@values[k]) if dirty @unsaved_values.add(k) end @@ -679,5 +684,9 @@ def self.inner_class_types def self.field_remappings @field_remappings ||= {} end + + def self.field_encodings + @field_encodings ||= {} + end end end diff --git a/lib/stripe/webhook.rb b/lib/stripe/webhook.rb index 6a1dc9f55..1ca5e6849 100644 --- a/lib/stripe/webhook.rb +++ b/lib/stripe/webhook.rb @@ -18,6 +18,13 @@ def self.construct_event(payload, sig_header, secret, # doesn't GC symbols. It also decreases the likelihood that we receive a # bad payload that fails to parse and throws an exception. data = JSON.parse(payload, symbolize_names: true) + + if data[:object] == "v2.core.event" + raise ArgumentError, + "You passed an event notification to Webhook.construct_event, which expects " \ + "a webhook payload. Use StripeClient#parse_event_notification instead." + end + Event.construct_from(data, {}, nil, :v1, APIRequestor.active_requestor) end diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index bda2f4cdf..08b066d01 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -102,7 +102,7 @@ module Stripe sig { returns(String) } def object; end # The value at which the alert recovered - sig { returns(String) } + sig { returns(BigDecimal) } def value; end end end @@ -176,7 +176,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def triggered_at; end # The value triggering the alert - sig { returns(String) } + sig { returns(BigDecimal) } def value; end end end @@ -1208,22 +1208,8 @@ module Stripe module V2 # Generated Microdeposits represent verification deposits sent to a financial address for ownership verification, containing the deposited amounts and status. class FinancialAddressGeneratedMicrodeposits < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The amounts of the microdeposits that were generated. - sig { returns(T::Array[Amount]) } + sig { returns(T::Array[::Stripe::V2::Amount]) } def amounts; end # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } @@ -7476,7 +7462,7 @@ module Stripe sig { returns(String) } def id; end # A positive decimal string representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -7484,6 +7470,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -7514,6 +7503,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # The filters allow limiting the scope of this credit balance alert. You must specify only a customer filter at this time. sig { returns(T.nilable(T::Array[Filter])) } @@ -7527,6 +7521,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + lte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class SpendThreshold < ::Stripe::StripeObject class Filters < ::Stripe::StripeObject @@ -7598,7 +7600,7 @@ module Stripe sig { returns(String) } def id; end # A positive decimal string representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -7606,6 +7608,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The monetary amount. Present when type is `amount`. sig { returns(T.nilable(Amount)) } @@ -7622,6 +7627,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # Defines the period over which spend is aggregated. sig { returns(String) } @@ -7641,6 +7651,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + gte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class UsageThreshold < ::Stripe::StripeObject class Filter < ::Stripe::StripeObject @@ -7816,7 +7834,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -7824,6 +7842,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -7854,6 +7875,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class BalanceUpdateDetails < ::Stripe::StripeObject class LatestMeterEvent < ::Stripe::StripeObject @@ -7915,7 +7941,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -7923,231 +7949,8 @@ module Stripe def self.field_remappings @field_remappings = {} end - end - class Monetary < ::Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - # A positive integer representing the amount. - sig { returns(Integer) } - def value; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # The custom pricing unit amount. - sig { returns(T.nilable(CustomPricingUnit)) } - def custom_pricing_unit; end - # The monetary amount. - sig { returns(T.nilable(Monetary)) } - def monetary; end - # The type of this amount. We currently only support `monetary` billing credits. - sig { returns(String) } - def type; end - def self.inner_class_types - @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} - end - def self.field_remappings - @field_remappings = {} - end - end - # Attribute for field available_balance - sig { returns(AvailableBalance) } - def available_balance; end - # Attribute for field ledger_balance - sig { returns(LedgerBalance) } - def ledger_balance; end - # Attribute for field balance_update_details - sig { returns(T.nilable(BalanceUpdateDetails)) } - def balance_update_details; end - def self.inner_class_types - @inner_class_types = { - available_balance: AvailableBalance, - ledger_balance: LedgerBalance, - balance_update_details: BalanceUpdateDetails, - } - end - def self.field_remappings - @field_remappings = {} - end - end - # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. - sig { returns(T::Array[Balance]) } - def balances; end - # The customer the balance is for. - sig { returns(T.any(String, ::Stripe::Customer)) } - def customer; end - # The account the balance is for. - sig { returns(T.nilable(String)) } - def customer_account; 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 - # String representing the object's type. Objects of the same type share the same value. - sig { returns(String) } - def object; end - end - end -end -# typed: true -module Stripe - module Billing - # A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. - class CreditBalanceTransaction < APIResource - class Credit < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - class CustomPricingUnit < ::Stripe::StripeObject - class CustomPricingUnitDetails < ::Stripe::StripeObject - # Time at which the object was created. Measured in seconds since the Unix epoch. - sig { returns(Integer) } - def created; end - # The name of the custom pricing unit. - sig { returns(String) } - def display_name; end - # Unique identifier for the object. - sig { returns(String) } - def id; end - # A lookup key for the custom pricing unit. - sig { returns(T.nilable(String)) } - def lookup_key; end - # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - sig { returns(T::Hash[String, String]) } - def metadata; end - # The status of the custom pricing unit. - sig { returns(String) } - def status; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # The custom pricing unit object. - sig { returns(T.nilable(CustomPricingUnitDetails)) } - def custom_pricing_unit_details; end - # Unique identifier for the object. - sig { returns(String) } - def id; end - # A positive integer representing the amount. - sig { returns(String) } - def value; end - def self.inner_class_types - @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} - end - def self.field_remappings - @field_remappings = {} - end - end - class Monetary < ::Stripe::StripeObject - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - # A positive integer representing the amount. - sig { returns(Integer) } - def value; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # The custom pricing unit amount. - sig { returns(T.nilable(CustomPricingUnit)) } - def custom_pricing_unit; end - # The monetary amount. - sig { returns(T.nilable(Monetary)) } - def monetary; end - # The type of this amount. We currently only support `monetary` billing credits. - sig { returns(String) } - def type; end - def self.inner_class_types - @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} - end - def self.field_remappings - @field_remappings = {} - end - end - class CreditsApplicationInvoiceVoided < ::Stripe::StripeObject - # The invoice to which the reinstated billing credits were originally applied. - sig { returns(T.any(String, ::Stripe::Invoice)) } - def invoice; end - # The invoice line item to which the reinstated billing credits were originally applied. - sig { returns(String) } - def invoice_line_item; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # Attribute for field amount - sig { returns(Amount) } - def amount; end - # Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. - sig { returns(T.nilable(CreditsApplicationInvoiceVoided)) } - def credits_application_invoice_voided; end - # The type of credit transaction. - sig { returns(String) } - def type; end - def self.inner_class_types - @inner_class_types = { - amount: Amount, - credits_application_invoice_voided: CreditsApplicationInvoiceVoided, - } - end - def self.field_remappings - @field_remappings = {} - end - end - class Debit < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - class CustomPricingUnit < ::Stripe::StripeObject - class CustomPricingUnitDetails < ::Stripe::StripeObject - # Time at which the object was created. Measured in seconds since the Unix epoch. - sig { returns(Integer) } - def created; end - # The name of the custom pricing unit. - sig { returns(String) } - def display_name; end - # Unique identifier for the object. - sig { returns(String) } - def id; end - # A lookup key for the custom pricing unit. - sig { returns(T.nilable(String)) } - def lookup_key; end - # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - sig { returns(T::Hash[String, String]) } - def metadata; end - # The status of the custom pricing unit. - sig { returns(String) } - def status; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # The custom pricing unit object. - sig { returns(T.nilable(CustomPricingUnitDetails)) } - def custom_pricing_unit_details; end - # Unique identifier for the object. - sig { returns(String) } - def id; end - # A positive integer representing the amount. - sig { returns(String) } - def value; end - def self.inner_class_types - @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} - end - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = {value: :decimal_string} end end class Monetary < ::Stripe::StripeObject @@ -8179,6 +7982,273 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end + end + # Attribute for field available_balance + sig { returns(AvailableBalance) } + def available_balance; end + # Attribute for field ledger_balance + sig { returns(LedgerBalance) } + def ledger_balance; end + # Attribute for field balance_update_details + sig { returns(T.nilable(BalanceUpdateDetails)) } + def balance_update_details; end + def self.inner_class_types + @inner_class_types = { + available_balance: AvailableBalance, + ledger_balance: LedgerBalance, + balance_update_details: BalanceUpdateDetails, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + available_balance: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + ledger_balance: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end + end + # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + sig { returns(T::Array[Balance]) } + def balances; end + # The customer the balance is for. + sig { returns(T.any(String, ::Stripe::Customer)) } + def customer; end + # The account the balance is for. + sig { returns(T.nilable(String)) } + def customer_account; 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 + # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } + def object; end + end + end +end +# typed: true +module Stripe + module Billing + # A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. + class CreditBalanceTransaction < APIResource + class Credit < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + class CustomPricingUnitDetails < ::Stripe::StripeObject + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + def created; end + # The name of the custom pricing unit. + sig { returns(String) } + def display_name; end + # Unique identifier for the object. + sig { returns(String) } + def id; end + # A lookup key for the custom pricing unit. + sig { returns(T.nilable(String)) } + def lookup_key; end + # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + def metadata; end + # The status of the custom pricing unit. + sig { returns(String) } + def status; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The custom pricing unit object. + sig { returns(T.nilable(CustomPricingUnitDetails)) } + def custom_pricing_unit_details; end + # Unique identifier for the object. + sig { returns(String) } + def id; end + # A positive integer representing the amount. + sig { returns(BigDecimal) } + def value; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end + end + class Monetary < ::Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + def currency; end + # A positive integer representing the amount. + sig { returns(Integer) } + def value; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The custom pricing unit amount. + sig { returns(T.nilable(CustomPricingUnit)) } + def custom_pricing_unit; end + # The monetary amount. + sig { returns(T.nilable(Monetary)) } + def monetary; end + # The type of this amount. We currently only support `monetary` billing credits. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end + end + class CreditsApplicationInvoiceVoided < ::Stripe::StripeObject + # The invoice to which the reinstated billing credits were originally applied. + sig { returns(T.any(String, ::Stripe::Invoice)) } + def invoice; end + # The invoice line item to which the reinstated billing credits were originally applied. + sig { returns(String) } + def invoice_line_item; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Attribute for field amount + sig { returns(Amount) } + def amount; end + # Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. + sig { returns(T.nilable(CreditsApplicationInvoiceVoided)) } + def credits_application_invoice_voided; end + # The type of credit transaction. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = { + amount: Amount, + credits_application_invoice_voided: CreditsApplicationInvoiceVoided, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end + end + class Debit < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + class CustomPricingUnitDetails < ::Stripe::StripeObject + # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + def created; end + # The name of the custom pricing unit. + sig { returns(String) } + def display_name; end + # Unique identifier for the object. + sig { returns(String) } + def id; end + # A lookup key for the custom pricing unit. + sig { returns(T.nilable(String)) } + def lookup_key; end + # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + def metadata; end + # The status of the custom pricing unit. + sig { returns(String) } + def status; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The custom pricing unit object. + sig { returns(T.nilable(CustomPricingUnitDetails)) } + def custom_pricing_unit_details; end + # Unique identifier for the object. + sig { returns(String) } + def id; end + # A positive integer representing the amount. + sig { returns(BigDecimal) } + def value; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end + end + class Monetary < ::Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + def currency; end + # A positive integer representing the amount. + sig { returns(Integer) } + def value; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The custom pricing unit amount. + sig { returns(T.nilable(CustomPricingUnit)) } + def custom_pricing_unit; end + # The monetary amount. + sig { returns(T.nilable(Monetary)) } + def monetary; end + # The type of this amount. We currently only support `monetary` billing credits. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class CreditsApplied < ::Stripe::StripeObject # The invoice to which the billing credits were applied. @@ -8209,6 +8279,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } @@ -8290,7 +8368,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -8298,6 +8376,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -8328,6 +8409,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject class Scope < ::Stripe::StripeObject @@ -12693,7 +12779,7 @@ module Stripe sig { returns(Integer) } def amount_total; end # Exchange rate used to convert source currency amounts to customer currency amounts - sig { returns(String) } + sig { returns(BigDecimal) } def fx_rate; end # Creation currency of the CheckoutSession before localization sig { returns(String) } @@ -12704,6 +12790,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {fx_rate: :decimal_string} + end end class CustomField < ::Stripe::StripeObject class Dropdown < ::Stripe::StripeObject @@ -15315,7 +15404,7 @@ module Stripe sig { returns(T::Hash[String, String]) } def metadata; end # Quantity of carbon removal that is included in this order. - sig { returns(String) } + sig { returns(BigDecimal) } def metric_tons; end # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } @@ -15410,7 +15499,7 @@ module Stripe sig { returns(T::Boolean) } def livemode; end # The quantity of metric tons available for reservation. - sig { returns(String) } + sig { returns(BigDecimal) } def metric_tons_available; end # The Climate product's name. sig { returns(String) } @@ -18155,7 +18244,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end end end @@ -23154,7 +23243,7 @@ module Stripe sig { returns(String) } def type; end # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end def self.inner_class_types @inner_class_types = { @@ -23167,6 +23256,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class ProrationDetails < ::Stripe::StripeObject class DiscountAmount < ::Stripe::StripeObject @@ -25131,7 +25223,7 @@ module Stripe sig { returns(String) } def type; end # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end def self.inner_class_types @inner_class_types = { @@ -25144,6 +25236,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class TaxCalculationReference < ::Stripe::StripeObject # The calculation identifier for tax calculation response. @@ -25325,7 +25420,7 @@ module Stripe class ReportedBreakdown < ::Stripe::StripeObject class Fuel < ::Stripe::StripeObject # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -25333,10 +25428,13 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::StripeObject # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -25344,13 +25442,16 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::StripeObject # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -25358,6 +25459,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } @@ -25374,6 +25481,19 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { returns(T.nilable(CardholderPromptData)) } @@ -25396,6 +25516,24 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class FraudChallenge < ::Stripe::StripeObject # The method by which the fraud challenge was delivered to the cardholder. @@ -25419,7 +25557,7 @@ module Stripe sig { returns(T.nilable(String)) } def industry_product_code; end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end # The type of fuel that was purchased. sig { returns(T.nilable(String)) } @@ -25428,7 +25566,7 @@ module Stripe sig { returns(T.nilable(String)) } def unit; end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end def self.inner_class_types @inner_class_types = {} @@ -25436,6 +25574,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string} + end end class MerchantData < ::Stripe::StripeObject # A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values. @@ -27703,7 +27844,7 @@ module Stripe class ReportedBreakdown < ::Stripe::StripeObject class Fuel < ::Stripe::StripeObject # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -27711,10 +27852,13 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::StripeObject # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -27722,13 +27866,16 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::StripeObject # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -27736,6 +27883,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } @@ -27752,6 +27905,19 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to cardholder at point of sale. sig { returns(T.nilable(CardholderPromptData)) } @@ -27774,6 +27940,24 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::StripeObject class Segment < ::Stripe::StripeObject @@ -27829,7 +28013,7 @@ module Stripe sig { returns(T.nilable(String)) } def industry_product_code; end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(String) } @@ -27838,7 +28022,7 @@ module Stripe sig { returns(String) } def unit; end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(String) } + sig { returns(BigDecimal) } def unit_cost_decimal; end def self.inner_class_types @inner_class_types = {} @@ -27846,6 +28030,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::StripeObject # The time of checking into the lodging. @@ -27911,6 +28101,33 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end class Treasury < ::Stripe::StripeObject # The Treasury [ReceivedCredit](https://docs.stripe.com/api/treasury/received_credits) representing this Issuing transaction if it is a refund @@ -36126,9 +36343,6 @@ module Stripe # Bank account verification method. sig { returns(T.nilable(String)) } def verification_method; end - # Preferred transaction settlement speed - sig { returns(T.nilable(String)) } - def preferred_settlement_speed; end def self.inner_class_types @inner_class_types = { financial_connections: FinancialConnections, @@ -44695,13 +44909,13 @@ module Stripe sig { returns(T.nilable(Integer)) } def flat_amount; end # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } @@ -44712,6 +44926,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformUsage < ::Stripe::StripeObject # Divide usage by this number. @@ -44734,7 +44954,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def amount; end # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def amount_decimal; end # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. sig { returns(String) } @@ -44856,13 +45076,13 @@ module Stripe sig { returns(T.nilable(Integer)) } def flat_amount; end # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } @@ -44873,6 +45093,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(CustomUnitAmount)) } @@ -44887,7 +45113,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def unit_amount; end # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end def self.inner_class_types @inner_class_types = {custom_unit_amount: CustomUnitAmount, tiers: Tier} @@ -44895,6 +45121,18 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::StripeObject # The maximum unit amount the customer can specify for this item. @@ -44958,13 +45196,13 @@ module Stripe sig { returns(T.nilable(Integer)) } def flat_amount; end # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } @@ -44975,6 +45213,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -45057,7 +45301,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def unit_amount; end # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Always true for a deleted object sig { returns(T.nilable(T::Boolean)) } @@ -65000,7 +65244,7 @@ module Stripe sig { returns(MaximumApplications) } def maximum_applications; end # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - sig { returns(String) } + sig { returns(BigDecimal) } def percent_off; end def self.inner_class_types @inner_class_types = {maximum_applications: MaximumApplications} @@ -65008,6 +65252,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_off: :decimal_string} + end end # Unique identifier for the object. sig { returns(String) } @@ -65024,6 +65271,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + } + end end class Payer < ::Stripe::StripeObject # The ID of the Billing Profile object which determines how a bill will be paid. @@ -65230,6 +65482,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } @@ -65249,6 +65504,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + mandate_options: {kind: :object, fields: {amount: :int64_string}}, + } + end end class CustomerBalance < ::Stripe::StripeObject class BankTransfer < ::Stripe::StripeObject @@ -65364,6 +65624,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -65389,6 +65657,19 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + } + end end # Expanded bill settings data with actual configuration values. sig { returns(Bill) } @@ -65402,6 +65683,24 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + collection: { + kind: :object, + fields: { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + }, + }, + } + end end # The billing cycle is the object that defines future billing cycle dates. sig { returns(BillingCycle) } @@ -65627,6 +65926,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } @@ -65646,6 +65948,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::StripeObject class BankTransfer < ::Stripe::StripeObject @@ -65761,6 +66066,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -65893,6 +66206,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } @@ -65912,6 +66228,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::StripeObject class BankTransfer < ::Stripe::StripeObject @@ -66027,6 +66346,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -66104,9 +66431,15 @@ module Stripe # previewed before committing, allowing you to see the billing impact before changes take effect. class Intent < APIResource class AmountDetails < ::Stripe::StripeObject + # The outstanding amount after discount, tax, and customer balance application. + sig { returns(String) } + def amount_due; end # Three-letter ISO currency code, in lowercase. Must be a supported currency. sig { returns(String) } def currency; end + # The customer's account balance applied to the amount. + sig { returns(String) } + def customer_balance_applied; end # Amount of discount applied. sig { returns(String) } def discount; end @@ -66129,6 +66462,17 @@ module Stripe @field_remappings = {} end end + class InvoiceResources < ::Stripe::StripeObject + # ID of a preview invoice showing the breakdown of line items. Null if the billing intent will not create an invoice. Only present when "invoice_resources.preview_invoice" is included. + sig { returns(T.nilable(String)) } + def preview_invoice; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class StatusTransitions < ::Stripe::StripeObject # Time at which the Billing Intent was canceled. sig { returns(T.nilable(String)) } @@ -66139,6 +66483,9 @@ module Stripe # Time at which the Billing Intent was drafted. sig { returns(T.nilable(String)) } def drafted_at; end + # Time at which the Billing Intent will expire. + sig { returns(String) } + def expires_at; end # Time at which the Billing Intent was reserved. sig { returns(T.nilable(String)) } def reserved_at; end @@ -66424,6 +66771,9 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end + # Invoice resources associated with this Billing Intent. Populated when include parameters are specified. + sig { returns(T.nilable(InvoiceResources)) } + def invoice_resources; end # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end @@ -66455,7 +66805,30 @@ module Stripe # define what change will be made when the Intent is committed. class IntentAction < APIResource class Apply < ::Stripe::StripeObject + class Discount < ::Stripe::StripeObject + # The ID of the Coupon applied. + sig { returns(T.nilable(String)) } + def coupon; end + # The ID of the created Discount. + sig { returns(T.nilable(String)) } + def discount; end + # The ID of the PromotionCode applied. + sig { returns(T.nilable(String)) } + def promotion_code; end + # Type of the discount. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class EffectiveAt < ::Stripe::StripeObject + # The timestamp at which the apply action will take effect. Only present if type is timestamp. Only allowed for discount actions. + sig { returns(T.nilable(String)) } + def timestamp; end # When the apply action will take effect. sig { returns(String) } def type; end @@ -66483,7 +66856,7 @@ module Stripe sig { returns(MaximumApplications) } def maximum_applications; end # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - sig { returns(String) } + sig { returns(BigDecimal) } def percent_off; end def self.inner_class_types @inner_class_types = {maximum_applications: MaximumApplications} @@ -66491,6 +66864,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_off: :decimal_string} + end end # The entity that the discount rule applies to, for example, the Billing Cadence. sig { returns(String) } @@ -66510,6 +66886,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + } + end end class SpendModifierRule < ::Stripe::StripeObject class MaxBillingPeriodSpend < ::Stripe::StripeObject @@ -66552,7 +66933,7 @@ module Stripe # The maximum amount allowed for the billing period. sig { returns(Amount) } def amount; end - # The configration for the overage rate for the custom pricing unit. + # The configuration for the overage rate for the custom pricing unit. sig { returns(CustomPricingUnitOverageRate) } def custom_pricing_unit_overage_rate; end def self.inner_class_types @@ -66584,12 +66965,15 @@ module Stripe @field_remappings = {} end end - # When the apply action will take effect. Defaults to on_reserve if not specified. + # When the apply action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(EffectiveAt)) } def effective_at; end # Type of the apply action details. sig { returns(String) } def type; end + # Details for applying a discount. + sig { returns(T.nilable(Discount)) } + def discount; end # Details for applying a discount rule to future invoices. sig { returns(T.nilable(InvoiceDiscountRule)) } def invoice_discount_rule; end @@ -66599,6 +66983,7 @@ module Stripe def self.inner_class_types @inner_class_types = { effective_at: EffectiveAt, + discount: Discount, invoice_discount_rule: InvoiceDiscountRule, spend_modifier_rule: SpendModifierRule, } @@ -66606,6 +66991,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + invoice_discount_rule: { + kind: :object, + fields: {percent_off: {kind: :object, fields: {percent_off: :decimal_string}}}, + }, + } + end end class Deactivate < ::Stripe::StripeObject class CancellationDetails < ::Stripe::StripeObject @@ -66843,7 +67236,7 @@ module Stripe @field_remappings = {} end end - # When the remove action will take effect. Defaults to on_reserve if not specified. + # When the remove action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(EffectiveAt)) } def effective_at; end # Type of the remove action. @@ -66967,7 +67360,7 @@ module Stripe # The ID of the price object. sig { returns(String) } def price; end - # Quantity for this item. If not provided, will default to 1. + # Quantity for this item. If not provided, defaults to 1. sig { returns(T.nilable(Integer)) } def quantity; end def self.inner_class_types @@ -67055,48 +67448,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module Billing - # A License Fee Subscription represents a customer's subscription to a License Fee at a specified quantity. It tracks - # the number of units (such as seats or licenses) the customer has subscribed to and bills them according to the service - # interval defined in the License Fee and the Billing Cadence. - class LicenseFeeSubscription < APIResource - # The ID of the Billing Cadence. - sig { returns(String) } - def billing_cadence; end - # Timestamp of when the object was created. - sig { returns(String) } - def created; end - # Unique identifier for the object. - sig { returns(String) } - def id; end - # The ID of the License Fee. - sig { returns(String) } - def license_fee; end - # The ID of the License Fee Version. - sig { returns(String) } - def license_fee_version; end - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - sig { returns(T.nilable(T::Hash[String, String])) } - def metadata; end - # String representing the object's type. Objects of the same type share the same value of the object field. - sig { returns(String) } - def object; end - # Quantity of the License Fee subscribed to. - sig { returns(Integer) } - def quantity; end - # The ID of the Test Clock, if any. - sig { returns(T.nilable(String)) } - def test_clock; 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 - end - end - end -end -# typed: true module Stripe module V2 module Billing @@ -67104,6 +67455,21 @@ module Stripe # pricing. Each License Fee defines the pricing structure (flat unit amount or tiered pricing) and service interval. After # creating a License Fee, you can subscribe customers to it by creating a License Fee Subscription. class LicenseFee < APIResource + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class Tier < ::Stripe::StripeObject # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. sig { returns(T.nilable(String)) } @@ -67114,7 +67480,7 @@ module Stripe def unit_amount; end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -67125,6 +67491,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -67139,6 +67508,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Whether this License Fee is active. Inactive License Fees cannot be used in new activations or be modified. sig { returns(T::Boolean) } @@ -67157,9 +67529,6 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # The ID of the license fee's most recently created version. - sig { returns(String) } - def latest_version; end # A Licensed Item represents a billable item whose pricing is based on license fees. You can use license fees # to specify the pricing and create subscriptions to these items. sig { returns(::Stripe::V2::Billing::LicensedItem) } @@ -67176,13 +67545,9 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end - # The interval for assessing service. - sig { returns(String) } - def service_interval; end - # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - # order to specify quarterly service. - sig { returns(Integer) } - def service_interval_count; end + # The service cycle configuration for this License Fee. + sig { returns(ServiceCycle) } + def service_cycle; end # The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax. sig { returns(String) } def tax_behavior; end @@ -67226,7 +67591,7 @@ module Stripe def unit_amount; end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -67237,6 +67602,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -67251,6 +67619,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Timestamp of when the object was created. sig { returns(String) } @@ -67314,7 +67685,7 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular licensed item. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end @@ -67493,7 +67864,7 @@ module Stripe # Optional array of Meter dimensions to group event dimension keys for invoice line items. sig { returns(T::Array[String]) } def invoice_presentation_dimensions; end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular metered item. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end @@ -67626,6 +67997,549 @@ module Stripe @field_remappings = {} end end + class DiscountDetail < ::Stripe::StripeObject + class Source < ::Stripe::StripeObject + # The ID of the Coupon. + sig { returns(T.nilable(String)) } + def coupon; end + # Type of the Discount source. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The ID of the Discount. + sig { returns(String) } + def discount; end + # The time at which the Discount ends, if applicable. + sig { returns(T.nilable(String)) } + def end; end + # The ID of the PromotionCode, if applicable. + sig { returns(T.nilable(String)) } + def promotion_code; end + # The source of the Discount. + sig { returns(Source) } + def source; end + # The time at which the Discount starts. + sig { returns(String) } + def start; end + def self.inner_class_types + @inner_class_types = {source: Source} + end + def self.field_remappings + @field_remappings = {} + end + end + class PricingPlanComponentDetail < ::Stripe::StripeObject + class LicenseFeeDetails < ::Stripe::StripeObject + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class Tier < ::Stripe::StripeObject + # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + sig { returns(T.nilable(String)) } + def flat_amount; end + # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + # most 12 decimal places. + sig { returns(T.nilable(String)) } + def unit_amount; end + # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + # be set. + sig { returns(T.nilable(BigDecimal)) } + def up_to_decimal; end + # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + sig { returns(T.nilable(String)) } + def up_to_inf; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end + end + class TransformQuantity < ::Stripe::StripeObject + # Divide usage by this number. + sig { returns(Integer) } + def divide_by; end + # After division, round the result up or down. + sig { returns(String) } + def round; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end + end + # Three-letter ISO currency code, in lowercase. + sig { returns(String) } + def currency; end + # A customer-facing name for the license fee. + sig { returns(String) } + def display_name; end + # The ID of the License Fee. + sig { returns(String) } + def license_fee; end + # The ID of the License Fee Version. + sig { returns(String) } + def license_fee_version; end + # Quantity of the license fee on the subscription. + sig { returns(Integer) } + def quantity; end + # The service cycle configuration. + sig { returns(ServiceCycle) } + def service_cycle; end + # Defines whether the tiering price should be graduated or volume-based. + sig { returns(T.nilable(String)) } + def tiering_mode; end + # Each element represents a pricing tier. + sig { returns(T::Array[Tier]) } + def tiers; end + # Apply a transformation to the reported usage or set quantity before computing the amount billed. + sig { returns(T.nilable(TransformQuantity)) } + def transform_quantity; end + # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. + sig { returns(T.nilable(String)) } + def unit_amount; end + # The unit label from the licensed item, used for display purposes (e.g. "seat", "environment"). + sig { returns(T.nilable(String)) } + def unit_label; end + def self.inner_class_types + @inner_class_types = { + service_cycle: ServiceCycle, + tiers: Tier, + transform_quantity: TransformQuantity, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end + end + class RateCardDetails < ::Stripe::StripeObject + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Three-letter ISO currency code, in lowercase. + sig { returns(String) } + def currency; end + # A customer-facing name for the rate card. + sig { returns(String) } + def display_name; end + # The ID of the Rate Card. + sig { returns(String) } + def rate_card; end + # The ID of the Rate Card Version. + sig { returns(String) } + def rate_card_version; end + # The service cycle configuration. + sig { returns(ServiceCycle) } + def service_cycle; end + # Whether the rates are inclusive or exclusive of tax. + sig { returns(String) } + def tax_behavior; end + def self.inner_class_types + @inner_class_types = {service_cycle: ServiceCycle} + end + def self.field_remappings + @field_remappings = {} + end + end + class RecurringCreditGrantDetails < ::Stripe::StripeObject + class CreditGrantDetails < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + # The Custom Pricing Unit object. + sig { returns(T.nilable(::Stripe::V2::Billing::CustomPricingUnit)) } + def custom_pricing_unit_details; end + # The id of the custom pricing unit. + sig { returns(String) } + def id; end + # The value of the credit grant, decimal value represented as a string. + sig { returns(BigDecimal) } + def value; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end + end + # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + sig { returns(String) } + def type; end + # The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + sig { returns(T.nilable(CustomPricingUnit)) } + def custom_pricing_unit; end + # The monetary amount of the credit grant. Required if `type` is `monetary`. + sig { returns(T.nilable(::Stripe::V2::Amount)) } + def monetary; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end + end + class ApplicabilityConfig < ::Stripe::StripeObject + class Scope < ::Stripe::StripeObject + # The billable items to apply the credit grant to. + sig { returns(T.nilable(T::Array[String])) } + def billable_items; end + # The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + sig { returns(T.nilable(String)) } + def price_type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The applicability scope of the credit grant. + sig { returns(Scope) } + def scope; end + def self.inner_class_types + @inner_class_types = {scope: Scope} + end + def self.field_remappings + @field_remappings = {} + end + end + class ExpiryConfig < ::Stripe::StripeObject + # The type of the expiry configuration. We currently support `end_of_service_period`. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The amount of the credit grant. + sig { returns(Amount) } + def amount; end + # Defines the scope where the credit grant is applicable. + sig { returns(ApplicabilityConfig) } + def applicability_config; end + # The expiry configuration for the credit grant. + sig { returns(ExpiryConfig) } + def expiry_config; end + def self.inner_class_types + @inner_class_types = { + amount: Amount, + applicability_config: ApplicabilityConfig, + expiry_config: ExpiryConfig, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + } + end + end + class CreditGrantPerTenantDetails < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + # The Custom Pricing Unit object. + sig { returns(T.nilable(::Stripe::V2::Billing::CustomPricingUnit)) } + def custom_pricing_unit_details; end + # The id of the custom pricing unit. + sig { returns(String) } + def id; end + # The value of the credit grant, decimal value represented as a string. + sig { returns(BigDecimal) } + def value; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end + end + # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + sig { returns(String) } + def type; end + # The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + sig { returns(T.nilable(CustomPricingUnit)) } + def custom_pricing_unit; end + # The monetary amount of the credit grant. Required if `type` is `monetary`. + sig { returns(T.nilable(::Stripe::V2::Amount)) } + def monetary; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end + end + class ApplicabilityConfig < ::Stripe::StripeObject + class Scope < ::Stripe::StripeObject + # The billable items to apply the credit grant to. + sig { returns(T.nilable(T::Array[String])) } + def billable_items; end + # The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + sig { returns(T.nilable(String)) } + def price_type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The applicability scope of the credit grant. + sig { returns(Scope) } + def scope; end + def self.inner_class_types + @inner_class_types = {scope: Scope} + end + def self.field_remappings + @field_remappings = {} + end + end + class ExpiryConfig < ::Stripe::StripeObject + # The type of the expiry configuration. We currently support `end_of_service_period`. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The amount of the credit grant. + sig { returns(Amount) } + def amount; end + # Defines the scope where the credit grant is applicable. + sig { returns(ApplicabilityConfig) } + def applicability_config; end + # The expiry configuration for the credit grant. + sig { returns(ExpiryConfig) } + def expiry_config; end + def self.inner_class_types + @inner_class_types = { + amount: Amount, + applicability_config: ApplicabilityConfig, + expiry_config: ExpiryConfig, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + } + end + end + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Credit grant details, present when type is CREDIT_GRANT. + sig { returns(T.nilable(CreditGrantDetails)) } + def credit_grant_details; end + # Credit grant per tenant details, present when type is CREDIT_GRANT_PER_TENANT. + sig { returns(T.nilable(CreditGrantPerTenantDetails)) } + def credit_grant_per_tenant_details; end + # The ID of the Recurring Credit Grant. + sig { returns(String) } + def recurring_credit_grant; end + # The service cycle configuration. + sig { returns(ServiceCycle) } + def service_cycle; end + # The type of the recurring credit grant. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = { + credit_grant_details: CreditGrantDetails, + credit_grant_per_tenant_details: CreditGrantPerTenantDetails, + service_cycle: ServiceCycle, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + } + end + end + # License fee details, present when type is license_fee_details. + sig { returns(T.nilable(LicenseFeeDetails)) } + def license_fee_details; end + # The ID of the Pricing Plan Component. + sig { returns(String) } + def pricing_plan_component; end + # Rate card details, present when type is rate_card_details. + sig { returns(T.nilable(RateCardDetails)) } + def rate_card_details; end + # Recurring credit grant details, present when type is recurring_credit_grant_details. + sig { returns(T.nilable(RecurringCreditGrantDetails)) } + def recurring_credit_grant_details; end + # The type of component details included. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = { + license_fee_details: LicenseFeeDetails, + rate_card_details: RateCardDetails, + recurring_credit_grant_details: RecurringCreditGrantDetails, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + license_fee_details: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + }, + }, + recurring_credit_grant_details: { + kind: :object, + fields: { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end + end class ServicingStatusTransitions < ::Stripe::StripeObject # When the servicing status transitioned to activated. sig { returns(T.nilable(String)) } @@ -67664,6 +68578,9 @@ module Stripe # Time at which the object was created. sig { returns(String) } def created; end + # Details about Discounts applied to this subscription. + sig { returns(T.nilable(T::Array[DiscountDetail])) } + def discount_details; end # Unique identifier for the object. sig { returns(String) } def id; end @@ -67676,6 +68593,9 @@ module Stripe # The ID of the Pricing Plan for this subscription. sig { returns(String) } def pricing_plan; end + # Pricing plan component details for the subscription, populated when pricing_plan_component_details is included. + sig { returns(T.nilable(T::Array[PricingPlanComponentDetail])) } + def pricing_plan_component_details; end # The ID of the Pricing Plan Version for this subscription. sig { returns(String) } def pricing_plan_version; end @@ -67696,45 +68616,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module Billing - # A set of component subscriptions for a Pricing Plan Subscription. - class PricingPlanSubscriptionComponents < APIResource - class Component < ::Stripe::StripeObject - # The Pricing Plan Component associated with this component subscription. - sig { returns(String) } - def pricing_plan_component; end - # The type of subscription. - sig { returns(String) } - def type; end - # The ID of the License Fee Subscription. - sig { returns(T.nilable(String)) } - def license_fee_subscription; end - # The ID of the Rate Card Subscription. - sig { returns(T.nilable(String)) } - def rate_card_subscription; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # The component subscriptions of the Pricing Plan Subscription. - sig { returns(T::Array[Component]) } - def components; end - # String representing the object's type. Objects of the same type share the same value of the object field. - sig { returns(String) } - def object; 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 - end - end - end -end -# typed: true module Stripe module V2 module Billing @@ -67761,9 +68642,6 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # The ID of the latest version of the PricingPlan. - sig { returns(String) } - def latest_version; end # The ID of the live version of the PricingPlan. sig { returns(T.nilable(String)) } def live_version; end @@ -67798,7 +68676,7 @@ module Stripe # The ID of the License Fee. sig { returns(String) } def id; end - # The version of the LicenseFee. Defaults to 'latest', if not specified. + # The ID of the License Fee Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end def self.inner_class_types @@ -67812,7 +68690,7 @@ module Stripe # The ID of the Rate Card. sig { returns(String) } def id; end - # The version of the RateCard. Defaults to 'latest', if not specified. + # The ID of the Rate Card Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end def self.inner_class_types @@ -68053,6 +68931,21 @@ module Stripe # defines how much to charge for usage of that item. After you've set up a RateCard, you can subscribe customers to it # by creating a Rate Card Subscription. class RateCard < APIResource + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end # Whether this RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added. sig { returns(T::Boolean) } def active; end @@ -68070,9 +68963,6 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # The ID of this rate card's most recently created version. - sig { returns(String) } - def latest_version; end # The ID of the Rate Card Version that will be used by all subscriptions when no specific version is specified. sig { returns(String) } def live_version; end @@ -68085,16 +68975,12 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end - # The interval for assessing service. For example, a monthly Rate Card with a rate of $1 for the first 10 "workloads" - # and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but - # distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, - # while the billing interval in Cadence deals with the rate the customer is billed. - sig { returns(String) } - def service_interval; end - # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - # order to specify quarterly service. - sig { returns(Integer) } - def service_interval_count; end + # The service cycle configuration for this Rate Card. For example, a monthly Rate Card with a rate of $1 for the + # first 10 "workloads" and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." + # This is similar to but distinct from billing interval; the service interval deals with the rate at which the + # customer accumulates fees, while the billing interval in Cadence deals with the rate the customer is billed. + sig { returns(ServiceCycle) } + def service_cycle; end # The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax. sig { returns(String) } def tax_behavior; end @@ -68183,7 +69069,7 @@ module Stripe def unit_amount; end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -68194,6 +69080,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -68208,6 +69097,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Timestamp of when the object was created. sig { returns(String) } @@ -68299,7 +69191,7 @@ module Stripe sig { returns(String) } def id; end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {} @@ -68307,19 +69199,8 @@ module Stripe def self.field_remappings @field_remappings = {} end - end - class Monetary < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = {value: :decimal_string} end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -68329,14 +69210,19 @@ module Stripe sig { returns(T.nilable(CustomPricingUnit)) } def custom_pricing_unit; end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { returns(T.nilable(Monetary)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end def self.inner_class_types - @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} end def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject class Scope < ::Stripe::StripeObject @@ -68402,6 +69288,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class CreditGrantPerTenant < ::Stripe::StripeObject class Amount < ::Stripe::StripeObject @@ -68413,7 +69307,7 @@ module Stripe sig { returns(String) } def id; end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {} @@ -68421,19 +69315,8 @@ module Stripe def self.field_remappings @field_remappings = {} end - end - class Monetary < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = {value: :decimal_string} end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -68443,14 +69326,19 @@ module Stripe sig { returns(T.nilable(CustomPricingUnit)) } def custom_pricing_unit; end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { returns(T.nilable(Monetary)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end def self.inner_class_types - @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} end def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject class Scope < ::Stripe::StripeObject @@ -68516,6 +69404,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # Timestamp of when the object was created. sig { returns(String) } @@ -68552,6 +69448,101 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + # Account Evaluation resource. + class AccountEvaluation < APIResource + class AccountData < ::Stripe::StripeObject + class Defaults < ::Stripe::StripeObject + class Profile < ::Stripe::StripeObject + # The business URL. + sig { returns(String) } + def business_url; end + # Doing business as (DBA) name. + sig { returns(T.nilable(String)) } + def doing_business_as; end + # Description of the account's product or service. + sig { returns(T.nilable(String)) } + def product_description; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Account profile data. + sig { returns(Profile) } + def profile; end + def self.inner_class_types + @inner_class_types = {profile: Profile} + end + def self.field_remappings + @field_remappings = {} + end + end + class Identity < ::Stripe::StripeObject + class BusinessDetails < ::Stripe::StripeObject + # Registered business name. + sig { returns(T.nilable(String)) } + def registered_name; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Business details for identity data. + sig { returns(BusinessDetails) } + def business_details; end + def self.inner_class_types + @inner_class_types = {business_details: BusinessDetails} + end + def self.field_remappings + @field_remappings = {} + end + end + # Default account settings. + sig { returns(T.nilable(Defaults)) } + def defaults; end + # Identity data. + sig { returns(T.nilable(Identity)) } + def identity; end + def self.inner_class_types + @inner_class_types = {defaults: Defaults, identity: Identity} + end + def self.field_remappings + @field_remappings = {} + end + end + # The account ID if this evaluation is for an existing account. + sig { returns(T.nilable(String)) } + def account; end + # Account data if this evaluation is for an account without an existing Stripe entity. + sig { returns(T.nilable(AccountData)) } + def account_data; end + # Timestamp at which the evaluation was created. + sig { returns(String) } + def created; end + # List of signals that were triggered for evaluation. + sig { returns(T::Array[String]) } + def evaluations_triggered; end + # Unique identifier for the account evaluation. + sig { returns(String) } + def id; end + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } + def object; 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 + end + end + end +end +# typed: true module Stripe module V2 module Core @@ -72264,6 +73255,9 @@ module Stripe # Default responsibilities held by either Stripe or the platform. sig { returns(Responsibilities) } def responsibilities; end + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + sig { returns(T.nilable(String)) } + def timezone; end def self.inner_class_types @inner_class_types = {profile: Profile, responsibilities: Responsibilities} end @@ -73685,28 +74679,14 @@ module Stripe end end class AnnualRevenue < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). - sig { returns(T.nilable(Amount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. sig { returns(T.nilable(String)) } def fiscal_year_end; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -73930,25 +74910,11 @@ module Stripe end end class MonthlyEstimatedRevenue < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 USD). - sig { returns(T.nilable(Amount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -74416,7 +75382,7 @@ module Stripe sig { returns(T.nilable(T::Boolean)) } def owner; end # The percentage of the Account's identity that the individual owns. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end # Whether the individual is authorized as the primary representative of the Account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } @@ -74430,6 +75396,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::StripeObject class Kana < ::Stripe::StripeObject @@ -74631,6 +75600,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { returns(T.nilable(Attestations)) } @@ -74657,6 +75631,16 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end class Requirements < ::Stripe::StripeObject class Entry < ::Stripe::StripeObject @@ -75192,7 +76176,7 @@ module Stripe sig { returns(T.nilable(T::Boolean)) } def owner; end # The percentage of the Account's identity that the individual owns. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end # Whether the individual is authorized as the primary representative of the Account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } @@ -75206,6 +76190,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::StripeObject class Kana < ::Stripe::StripeObject @@ -75398,6 +76385,425 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + # BatchJob resource. + class BatchJob < APIResource + class StatusDetails < ::Stripe::StripeObject + class BatchFailed < ::Stripe::StripeObject + # Details about the `BatchJob` failure. + sig { returns(String) } + def error; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class Canceled < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + class Complete < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + class InProgress < ::Stripe::StripeObject + # The number of records that failed processing so far. + sig { returns(Integer) } + def failure_count; end + # The number of records that were successfully processed so far. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {failure_count: :int64_string, success_count: :int64_string} + end + end + class ReadyForUpload < ::Stripe::StripeObject + class UploadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The upload file details. + sig { returns(UploadUrl) } + def upload_url; end + def self.inner_class_types + @inner_class_types = {upload_url: UploadUrl} + end + def self.field_remappings + @field_remappings = {} + end + end + class Timeout < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + class Validating < ::Stripe::StripeObject + # The number of records that were validated. Note that there is no failure counter here; + # once we have any validation failures we give up. + sig { returns(Integer) } + def validated_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {validated_count: :int64_string} + end + end + class ValidationFailed < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + # Additional details for the `BATCH_FAILED` status of the `BatchJob`. + sig { returns(T.nilable(BatchFailed)) } + def batch_failed; end + # Additional details for the `CANCELED` status of the `BatchJob`. + sig { returns(T.nilable(Canceled)) } + def canceled; end + # Additional details for the `COMPLETE` status of the `BatchJob`. + sig { returns(T.nilable(Complete)) } + def complete; end + # Additional details for the `IN_PROGRESS` status of the `BatchJob`. + sig { returns(T.nilable(InProgress)) } + def in_progress; end + # Additional details for the `READY_FOR_UPLOAD` status of the `BatchJob`. + sig { returns(T.nilable(ReadyForUpload)) } + def ready_for_upload; end + # Additional details for the `TIMEOUT` status of the `BatchJob`. + sig { returns(T.nilable(Timeout)) } + def timeout; end + # Additional details for the `VALIDATING` status of the `BatchJob`. + sig { returns(T.nilable(Validating)) } + def validating; end + # Additional details for the `VALIDATION_FAILED` status of the `BatchJob`. + sig { returns(T.nilable(ValidationFailed)) } + def validation_failed; end + def self.inner_class_types + @inner_class_types = { + batch_failed: BatchFailed, + canceled: Canceled, + complete: Complete, + in_progress: InProgress, + ready_for_upload: ReadyForUpload, + timeout: Timeout, + validating: Validating, + validation_failed: ValidationFailed, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + canceled: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + complete: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + in_progress: { + kind: :object, + fields: {failure_count: :int64_string, success_count: :int64_string}, + }, + timeout: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + validating: {kind: :object, fields: {validated_count: :int64_string}}, + validation_failed: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + } + end + end + # Timestamp at which BatchJob was created. + sig { returns(String) } + def created; end + # Unique identifier for the BatchJob. + sig { returns(String) } + def id; end + # The maximum rps defined for the `BatchJob`. + sig { returns(Integer) } + def maximum_rps; end + # The metadata of the `BatchJob` object. + sig { returns(T::Hash[String, String]) } + def metadata; end + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } + def object; end + # If the validation will be run previous to the execution of the `BatchJob`. + sig { returns(T::Boolean) } + def skip_validation; end + # The current status of the `BatchJob`. + sig { returns(String) } + def status; end + # Additional details about the current state of the `BatchJob`. + sig { returns(T.nilable(StatusDetails)) } + def status_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 + end + end + end +end +# typed: true module Stripe module V2 module Core @@ -75595,6 +77001,29 @@ module Stripe @field_remappings = {} end end + class AzureEventGrid < ::Stripe::StripeObject + # The name of the Azure partner topic. + sig { returns(String) } + def azure_partner_topic_name; end + # The status of the Azure partner topic. + sig { returns(String) } + def azure_partner_topic_status; end + # The Azure region. + sig { returns(String) } + def azure_region; end + # The name of the Azure resource group. + sig { returns(String) } + def azure_resource_group_name; end + # The Azure subscription ID. + sig { returns(String) } + def azure_subscription_id; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class WebhookEndpoint < ::Stripe::StripeObject # The signing secret of the webhook endpoint, only includable on creation. sig { returns(T.nilable(String)) } @@ -75621,7 +77050,11 @@ module Stripe # Payload type of events being subscribed to. sig { returns(String) } def event_payload; end - # Where events should be routed from. + # Specifies which accounts' events route to this destination. + # `@self`: Receive events from the account that owns the event destination. + # `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + # `@organization_members`: Receive events from accounts directly linked to the organization. + # `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. sig { returns(T.nilable(T::Array[String])) } def events_from; end # Unique identifier for the object. @@ -75657,6 +77090,9 @@ module Stripe # Amazon EventBridge configuration. sig { returns(T.nilable(AmazonEventbridge)) } def amazon_eventbridge; end + # Azure Event Grid configuration. + sig { returns(T.nilable(AzureEventGrid)) } + def azure_event_grid; end # Webhook endpoint configuration. sig { returns(T.nilable(WebhookEndpoint)) } def webhook_endpoint; end @@ -75895,8 +77331,11 @@ module Stripe sig { returns(String) } def object; end # The Sort Code of the bank account. - sig { returns(String) } + sig { returns(T.nilable(String)) } def sort_code; end + # The list of currencies supported by this bank account. + sig { returns(T::Array[String]) } + def supported_currencies; 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 @@ -75992,6 +77431,9 @@ module Stripe # The ACH routing number of the bank account. sig { returns(T.nilable(String)) } def routing_number; end + # The list of currencies supported by this bank account. + sig { returns(T::Array[String]) } + def supported_currencies; end # The bank account verification details. sig { returns(Verification) } def verification; end @@ -76160,25 +77602,11 @@ module Stripe @field_remappings = {} end end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # If applicable, contains information about the original flow linked to this Adjustment. sig { returns(T.nilable(AdjustedFlow)) } def adjusted_flow; end # The amount of the Adjustment. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. sig { returns(String) } @@ -76215,50 +77643,22 @@ module Stripe # The CurrencyConversion object. Contains details such as the amount debited and credited and the FinancialAccount the CurrencyConversion was performed on. class CurrencyConversion < APIResource class From < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount object. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end class To < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount object. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -76313,63 +77713,17 @@ module Stripe end end class Balance < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Balance that can be used for money movement. - sig { returns(T::Hash[String, Available]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def available; end # Balance of inbound funds that will later transition to the `available` balance. - sig { returns(T::Hash[String, InboundPending]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def inbound_pending; end # Balance of funds that are being used for a pending outbound money movement. - sig { returns(T::Hash[String, OutboundPending]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def outbound_pending; end def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -76398,14 +77752,34 @@ module Stripe end end class Payments < ::Stripe::StripeObject - class StartingBalance < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end + class BalanceByFundsType < ::Stripe::StripeObject + class PaymentProcessing < ::Stripe::StripeObject + # Balance that can be used for money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def available; end + # Balance of inbound funds that will later transition to the `available` balance. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def inbound_pending; end + # Balance of funds that are being used for a pending outbound money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def outbound_pending; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class StoredValue < ::Stripe::StripeObject + # Balance that can be used for money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def available; end + # Balance of inbound funds that will later transition to the `available` balance. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def inbound_pending; end + # Balance of funds that are being used for a pending outbound money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def outbound_pending; end def self.inner_class_types @inner_class_types = {} end @@ -76413,19 +77787,40 @@ module Stripe @field_remappings = {} end end + # Payment processing funds are those that are received for goods or services and may only be used for payouts to self. These funds may be converted to stored value funds. + sig { returns(PaymentProcessing) } + def payment_processing; end + # Stored value funds may be used for either payouts to self or payments to others. + sig { returns(StoredValue) } + def stored_value; end + def self.inner_class_types + @inner_class_types = { + payment_processing: PaymentProcessing, + stored_value: StoredValue, + } + end + def self.field_remappings + @field_remappings = {} + end + end + class StartingBalance < ::Stripe::StripeObject # When the balance was projected. sig { returns(String) } def at; end # The available balance at the time when the balance was projected. - sig { returns(T::Hash[String, Available]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def available; end def self.inner_class_types - @inner_class_types = {available: Available} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end + # The balance of the `payments` FinancialAccount is a mix of payment processing and stored value funds, and this field + # describes the breakdown between the two. The sum will match the balance of the FinancialAccount. + sig { returns(T.nilable(BalanceByFundsType)) } + def balance_by_funds_type; end # The currency that non-settlement currency payments will be converted to. sig { returns(String) } def default_currency; end @@ -76436,7 +77831,10 @@ module Stripe sig { returns(T.nilable(StartingBalance)) } def starting_balance; end def self.inner_class_types - @inner_class_types = {starting_balance: StartingBalance} + @inner_class_types = { + balance_by_funds_type: BalanceByFundsType, + starting_balance: StartingBalance, + } end def self.field_remappings @field_remappings = {} @@ -76458,10 +77856,10 @@ module Stripe @field_remappings = {} end end - # Attribute for field forwarding_settings + # The forwarding settings for the closed FinancialAccount. sig { returns(T.nilable(ForwardingSettings)) } def forwarding_settings; end - # Attribute for field reason + # The reason the FinancialAccount was closed. sig { returns(String) } def reason; end def self.inner_class_types @@ -76471,7 +77869,7 @@ module Stripe @field_remappings = {} end end - # Attribute for field closed + # Details related to the closed state of the FinancialAccount. sig { returns(T.nilable(Closed)) } def closed; end def self.inner_class_types @@ -76532,7 +77930,7 @@ module Stripe # Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows. sig { returns(String) } def status; end - # Attribute for field status_details + # Additional details related to the status of the FinancialAccount. sig { returns(T.nilable(StatusDetails)) } def status_details; end # If this is a `storage` FinancialAccount, this hash includes details specific to `storage` FinancialAccounts. @@ -76726,35 +78124,7 @@ module Stripe # An InboundTransfer object, representing a money movement from a # user owned PaymentMethod to a FinancialAccount belonging to the same user. class InboundTransfer < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class PaymentMethod < ::Stripe::StripeObject # The type of object this destination represents. For a us bank account, we expect us_bank_account. sig { returns(String) } @@ -76770,41 +78140,27 @@ module Stripe end end # The amount in specified currency that was debited from the Payment Method. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The Payment Method object used to create the InboundTransfer. sig { returns(PaymentMethod) } def payment_method; end def self.inner_class_types - @inner_class_types = {debited: Debited, payment_method: PaymentMethod} + @inner_class_types = {payment_method: PaymentMethod} end def self.field_remappings @field_remappings = {} end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The amount by which the FinancialAccount balance is credited. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The FinancialAccount that funds will land in. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -76874,7 +78230,7 @@ module Stripe end end # The amount in specified currency that will land in the FinancialAccount balance. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Creation time of the InboundTransfer. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. sig { returns(String) } @@ -76913,20 +78269,6 @@ module Stripe module MoneyManagement # OutboundPaymentQuote represents a quote that provides fee and amount estimates for OutboundPayment. class OutboundPaymentQuote < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class DeliveryOptions < ::Stripe::StripeObject # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } @@ -76942,56 +78284,28 @@ module Stripe end end class EstimatedFee < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The fee amount for corresponding fee type. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The fee type. sig { returns(String) } def type; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The FinancialAccount that funds were pulled from. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {debited: Debited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -77032,22 +78346,8 @@ module Stripe end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The payout method which the OutboundPayment uses to send payout. sig { returns(String) } @@ -77056,14 +78356,14 @@ module Stripe sig { returns(String) } def recipient; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end # The "presentment amount" for the OutboundPaymentQuote. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Time at which the OutboundPaymentQuote was created. # Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -77103,20 +78403,6 @@ module Stripe module MoneyManagement # OutboundPayment represents a single money movement from one FinancialAccount you own to a payout method someone else owns. class OutboundPayment < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class DeliveryOptions < ::Stripe::StripeObject class PaperCheck < ::Stripe::StripeObject # Memo printed on the memo field of the check. @@ -77152,28 +78438,14 @@ module Stripe end end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The FinancialAccount that funds were pulled from. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {debited: Debited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -77252,22 +78524,8 @@ module Stripe end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The payout method which the OutboundPayment uses to send payout. sig { returns(String) } @@ -77276,7 +78534,7 @@ module Stripe sig { returns(String) } def recipient; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -77369,7 +78627,7 @@ module Stripe end end # The "presentment amount" for the OutboundPayment. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Returns true if the OutboundPayment can be canceled, and false otherwise. sig { returns(T::Boolean) } @@ -77514,20 +78772,6 @@ module Stripe module MoneyManagement # OutboundTransfer represents a single money movement from one FinancialAccount you own to a payout method you also own. class OutboundTransfer < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class DeliveryOptions < ::Stripe::StripeObject # Open Enum. Method for bank account. sig { returns(T.nilable(String)) } @@ -77540,28 +78784,14 @@ module Stripe end end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The FinancialAccount that funds were pulled from. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {debited: Debited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -77628,28 +78858,14 @@ module Stripe end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The payout method which the OutboundTransfer uses to send payout. sig { returns(String) } def payout_method; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -77673,7 +78889,7 @@ module Stripe end end # The "presentment amount" for the OutboundTransfer. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Returns true if the OutboundTransfer can be canceled, and false otherwise. sig { returns(T::Boolean) } @@ -77834,6 +79050,9 @@ module Stripe # The last 4 digits of the card number. sig { returns(String) } def last4; end + # The list of currencies supported by this bank account. + sig { returns(T::Array[String]) } + def supported_currencies; end def self.inner_class_types @inner_class_types = {} end @@ -77881,6 +79100,10 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end + # Whether the Payout Method is currently unusable for money movement, despite potentially being correctly set up. + # Please reach out to Stripe Support for more information. + sig { returns(T::Boolean) } + def restricted; end # Closed Enum. The type of payout method. sig { returns(String) } def type; end @@ -77925,6 +79148,9 @@ module Stripe @field_remappings = {} end end + # The currencies supported by the corresponding credentials for bank accounts in the specified country. + sig { returns(T.nilable(T::Array[String])) } + def currencies; end # The local name of the field. sig { returns(String) } def local_name; end @@ -77982,34 +79208,6 @@ module Stripe module MoneyManagement # Use ReceivedCredits API to retrieve information on when, where, and how funds are sent into your FinancialAccount. class ReceivedCredit < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class ExternalAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class StatusDetails < ::Stripe::StripeObject class Failed < ::Stripe::StripeObject # Open Enum. The `failed` status reason. @@ -78242,7 +79440,7 @@ module Stripe end end # The amount and currency of the ReceivedCredit. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Time at which the ReceivedCredit was created. # Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -78252,7 +79450,7 @@ module Stripe sig { returns(T.nilable(String)) } def description; end # The amount and currency of the original/external credit request. - sig { returns(T.nilable(ExternalAmount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def external_amount; end # Financial Account ID on which funds for ReceivedCredit were received. sig { returns(String) } @@ -78303,34 +79501,6 @@ module Stripe module MoneyManagement # ReceivedDebit resource class ReceivedDebit < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class ExternalAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class StatusDetails < ::Stripe::StripeObject class Failed < ::Stripe::StripeObject # Open Enum. The reason for the failure of the ReceivedDebit. @@ -78430,56 +79600,28 @@ module Stripe end class CardSpend < ::Stripe::StripeObject class Authorization < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount associated with this issuing authorization. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The reference to the v1 issuing authorization ID. sig { returns(String) } def issuing_authorization_v1; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end class CardTransaction < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount associated with this issuing transaction. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The reference to the v1 issuing transaction ID. sig { returns(String) } def issuing_transaction_v1; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -78516,7 +79658,7 @@ module Stripe end end # Amount and currency of the ReceivedDebit. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The time at which the ReceivedDebit was created. # Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2022-09-18T13:22:18.123Z`. @@ -78526,7 +79668,7 @@ module Stripe sig { returns(T.nilable(String)) } def description; end # The amount and currency of the original/external debit request. - sig { returns(T.nilable(ExternalAmount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def external_amount; end # Financial Account on which funds for ReceivedDebit were debited. sig { returns(String) } @@ -78653,63 +79795,17 @@ module Stripe # TransactionEntries represent individual money movements across different states within a Transaction. class TransactionEntry < APIResource class BalanceImpact < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Impact to the available balance. - sig { returns(Available) } + sig { returns(::Stripe::V2::Amount) } def available; end # Impact to the inbound_pending balance. - sig { returns(InboundPending) } + sig { returns(::Stripe::V2::Amount) } def inbound_pending; end # Impact to the outbound_pending balance. - sig { returns(OutboundPending) } + sig { returns(::Stripe::V2::Amount) } def outbound_pending; end def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -78777,6 +79873,30 @@ module Stripe # If applicable, the ID of the Transfer Reversal that created this Transaction. sig { returns(T.nilable(String)) } def transfer_reversal; end + # If applicable, the ID of the Treasury CreditReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_credit_reversal; end + # If applicable, the ID of the Treasury DebitReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_debit_reversal; end + # If applicable, the ID of the Treasury InboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_inbound_transfer; end + # If applicable, the ID of the Treasury IssuingAuthorization that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_issuing_authorization; end + # If applicable, the ID of the Treasury OutboundPayment that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_payment; end + # If applicable, the ID of the Treasury OutboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_transfer; end + # If applicable, the ID of the Treasury ReceivedCredit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_credit; end + # If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_debit; end def self.inner_class_types @inner_class_types = {} end @@ -78821,6 +79941,9 @@ module Stripe # Details copied from the transaction that this TransactionEntry belongs to. sig { returns(TransactionDetails) } def transaction_details; end + # The v1 Treasury transaction entry associated with this transaction entry. + sig { returns(T.nilable(String)) } + def treasury_transaction_entry; 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 @@ -78834,78 +79957,29 @@ module Stripe module MoneyManagement # Use Transactions to view changes to your FinancialAccount balance over time. Every flow that moves money, such as OutboundPayments or ReceivedCredits, will have one or more Transactions that describes how the flow impacted your balance. Note that while the FinancialAccount balance will always be up to date, be aware that Transactions and TransactionEntries are created shortly after to reflect changes. class Transaction < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class BalanceImpact < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Impact to the available balance. - sig { returns(Available) } + sig { returns(::Stripe::V2::Amount) } def available; end # Impact to the inbound_pending balance. - sig { returns(InboundPending) } + sig { returns(::Stripe::V2::Amount) } def inbound_pending; end # Impact to the outbound_pending balance. - sig { returns(OutboundPending) } + sig { returns(::Stripe::V2::Amount) } def outbound_pending; end def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class Counterparty < ::Stripe::StripeObject + # Name of the counterparty. + sig { returns(T.nilable(String)) } + def name; end + def self.inner_class_types + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -78972,6 +80046,30 @@ module Stripe # If applicable, the ID of the Transfer Reversal that created this Transaction. sig { returns(T.nilable(String)) } def transfer_reversal; end + # If applicable, the ID of the Treasury CreditReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_credit_reversal; end + # If applicable, the ID of the Treasury DebitReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_debit_reversal; end + # If applicable, the ID of the Treasury InboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_inbound_transfer; end + # If applicable, the ID of the Treasury IssuingAuthorization that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_issuing_authorization; end + # If applicable, the ID of the Treasury OutboundPayment that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_payment; end + # If applicable, the ID of the Treasury OutboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_transfer; end + # If applicable, the ID of the Treasury ReceivedCredit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_credit; end + # If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_debit; end def self.inner_class_types @inner_class_types = {} end @@ -78994,7 +80092,7 @@ module Stripe end end # The amount of the Transaction. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to sum of its # TransactionEntries that have `effective_at`s in the past. @@ -79003,9 +80101,16 @@ module Stripe # Open Enum. A descriptive category used to classify the Transaction. sig { returns(String) } def category; end + # Counterparty to this Transaction. + sig { returns(T.nilable(Counterparty)) } + def counterparty; end # Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. sig { returns(String) } def created; end + # Description of this Transaction. When applicable, the description is copied from the Flow object at the time + # of transaction creation. + sig { returns(T.nilable(String)) } + def description; end # Indicates the FinancialAccount affected by this Transaction. sig { returns(String) } def financial_account; end @@ -79028,6 +80133,9 @@ module Stripe # Timestamps for when the Transaction transitioned to a particular status. sig { returns(StatusTransitions) } def status_transitions; end + # The v1 Treasury transaction associated with this transaction. + sig { returns(T.nilable(String)) } + def treasury_transaction; 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 @@ -79046,34 +80154,6 @@ module Stripe # OffSessionPayment will transition through its lifecycle asynchronously. # Related guide: [Off-Session Payments API](https://docs.stripe.com/payments/off-session-payments). class OffSessionPayment < APIResource - class AmountCapturable < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class AmountRequested < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class Capture < ::Stripe::StripeObject # The timestamp when this payment is no longer eligible to be captured. sig { returns(T.nilable(String)) } @@ -79138,10 +80218,10 @@ module Stripe end end # The amount available to be captured. - sig { returns(T.nilable(AmountCapturable)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount_capturable; end # The “presentment amount” to be collected from the customer. - sig { returns(AmountRequested) } + sig { returns(::Stripe::V2::Amount) } def amount_requested; end # The frequency of the underlying payment. sig { returns(String) } @@ -79229,20 +80309,6 @@ module Stripe module Payments # SettlementAllocationIntent resource. class SettlementAllocationIntent < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class StatusDetails < ::Stripe::StripeObject class Errored < ::Stripe::StripeObject # Stripe doc link to debug the issue. @@ -79272,7 +80338,7 @@ module Stripe end end # The amount and currency of the SettlementAllocationIntent. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Timestamp at which SettlementAllocationIntent was created . sig { returns(String) } @@ -79317,20 +80383,6 @@ module Stripe module Payments # SettlementAllocationIntentSplit resource. class SettlementAllocationIntentSplit < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class Flow < ::Stripe::StripeObject # Type of the flow linked to the transaction which settled the SettlementAllocationIntentSplit. The field matching this value will contain the ID of the flow. sig { returns(String) } @@ -79355,7 +80407,7 @@ module Stripe sig { returns(String) } def account; end # The amount and currency of the SettlementAllocationIntentSplit. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Timestamp at which SettlementAllocationIntentSplit was created. sig { returns(String) } @@ -79366,10 +80418,13 @@ module Stripe # Unique identifier for the SettlementAllocationIntentSplit. sig { returns(String) } def id; end + # Metadata associated with the SettlementAllocationIntentSplit. + sig { returns(T.nilable(T::Hash[String, String])) } + def metadata; end # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end - # The ID of the SettlementAllocationIntent that this split belongs too. + # The ID of the SettlementAllocationIntent that this split belongs to. sig { returns(String) } def settlement_allocation_intent; end # The status of the SettlementAllocationIntentSplit. @@ -79424,6 +80479,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {size: :int64_string} + end end # Contains metadata about the file produced by the `ReportRun`, including # its content type, size, and a URL to download its contents. @@ -79438,6 +80496,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {file: {kind: :object, fields: {size: :int64_string}}} + end end class ResultOptions < ::Stripe::StripeObject # If set, the generated report file will be compressed into a ZIP folder. @@ -79664,7 +80725,7 @@ module Stripe sig { returns(T.nilable(String)) } def jurisdiction; end # Percentage of the tax rate. Must be positive and maximum of 4 decimal points. - sig { returns(String) } + sig { returns(BigDecimal) } def percentage; end # State of the tax rate. sig { returns(T.nilable(String)) } @@ -79675,6 +80736,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percentage: :decimal_string} + end end # The tax rates to be applied. sig { returns(T::Array[Rate]) } @@ -79688,6 +80752,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + } + end end # The time at which the ManualRule object was created. sig { returns(String) } @@ -85500,7 +86572,6 @@ module Stripe attr_reader :custom_pricing_units attr_reader :intents attr_reader :license_fees - attr_reader :license_fee_subscriptions attr_reader :licensed_items attr_reader :meter_events attr_reader :meter_event_adjustments @@ -85849,20 +86920,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module Billing - class LicenseFeeSubscriptionService < StripeService - # Retrieve a License Fee Subscription object. - sig { - params(id: String, params: T.any(::Stripe::V2::Billing::LicenseFeeSubscriptionRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::LicenseFeeSubscription) - } - def retrieve(id, params = {}, opts = {}); end - end - end - end -end -# typed: true module Stripe module V2 module Billing @@ -86117,13 +87174,18 @@ module Stripe module V2 module Billing class PricingPlanSubscriptionService < StripeService - attr_reader :components # List all Pricing Plan Subscription objects. sig { params(params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptionListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } def list(params = {}, opts = {}); end + # Remove Discounts from a Pricing Plan Subscription. + sig { + params(id: String, params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptionRemoveDiscountsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::PricingPlanSubscription) + } + def remove_discounts(id, params = {}, opts = {}); end + # Retrieve a Pricing Plan Subscription object. sig { params(id: String, params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptionRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::PricingPlanSubscription) @@ -86140,22 +87202,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module Billing - module PricingPlanSubscriptions - class ComponentService < StripeService - # Retrieve a Pricing Plan Subscription's components. - sig { - params(id: String, params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptions::ComponentRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::PricingPlanSubscriptionComponents) - } - def retrieve(id, params = {}, opts = {}); end - end - end - end - end -end -# typed: true module Stripe module V2 module Billing @@ -86207,6 +87253,12 @@ module Stripe } def list(params = {}, opts = {}); end + # Creates, updates, and/or deletes multiple Rates on a Rate Card atomically. + sig { + params(id: String, params: T.any(::Stripe::V2::Billing::RateCardModifyRatesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::RateCardVersion) + } + def modify_rates(id, params = {}, opts = {}); end + # Retrieve the latest version of a Rate Card object. sig { params(id: String, params: T.any(::Stripe::V2::Billing::RateCardRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::RateCard) @@ -86275,7 +87327,7 @@ module Stripe } def delete(rate_card_id, id, params = {}, opts = {}); end - # List all Rates associated with a Rate Card for a specific version (defaults to latest). Rates remain active for all subsequent versions until a new rate is created for the same Metered Item. + # List all Rates associated with a Rate Card for a specific version. Defaults to latest. Rates remain active for all subsequent versions until a new rate is created for the same Metered Item. sig { params(rate_card_id: String, params: T.any(::Stripe::V2::Billing::RateCards::RateListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } @@ -86382,8 +87434,10 @@ module Stripe module V2 class CoreService < StripeService attr_reader :accounts + attr_reader :account_evaluations attr_reader :account_links attr_reader :account_tokens + attr_reader :batch_jobs attr_reader :claimable_sandboxes attr_reader :connection_sessions attr_reader :events @@ -86519,6 +87573,20 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + class AccountEvaluationService < StripeService + # Creates a new account evaluation to trigger signal evaluations on an account or account data. + sig { + params(params: T.any(::Stripe::V2::Core::AccountEvaluationCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountEvaluation) + } + def create(params = {}, opts = {}); end + end + end + end +end +# typed: true module Stripe module V2 module Core @@ -86559,6 +87627,32 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + class BatchJobService < StripeService + # Cancels an existing batch job. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::BatchJobCancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::BatchJob) + } + def cancel(id, params = {}, opts = {}); end + + # Creates a new batch job. + sig { + params(params: T.any(::Stripe::V2::Core::BatchJobCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::BatchJob) + } + def create(params = {}, opts = {}); end + + # Retrieves an existing batch job. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::BatchJobRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::BatchJob) + } + def retrieve(id, params = {}, opts = {}); end + end + end + end +end +# typed: true module Stripe module V2 module Core @@ -97496,12 +98590,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # A positive decimal string representing the amount of the custom pricing unit threshold. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::RequestParams # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. @@ -97544,6 +98641,11 @@ module Stripe params(balance_type: String, custom_pricing_unit: T.nilable(::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Lte::CustomPricingUnit), monetary: T.nilable(::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Lte::Monetary)).void } def initialize(balance_type: nil, custom_pricing_unit: nil, monetary: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time. sig { @@ -97565,6 +98667,14 @@ module Stripe params(filters: T.nilable(T::Array[::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Filter]), lte: ::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Lte).void } def initialize(filters: nil, lte: nil); end + def self.field_encodings + @field_encodings = { + lte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class SpendThreshold < ::Stripe::RequestParams class Filters < ::Stripe::RequestParams @@ -97622,12 +98732,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # A positive decimal string representing the amount of the custom pricing unit threshold. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The monetary amount. Required when type is `amount`. The threshold is the total_before_tax, the amount consumed after all credits and discounts are applied, but before tax is applied. sig { @@ -97656,6 +98769,11 @@ module Stripe params(amount: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::Amount), custom_pricing_unit: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::CustomPricingUnit), type: String).void } def initialize(amount: nil, custom_pricing_unit: nil, type: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # Defines the period over which spend is aggregated. sig { returns(String) } @@ -97685,6 +98803,14 @@ module Stripe params(aggregation_period: String, filters: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Filters), group_by: T.nilable(String), gte: ::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte).void } def initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil); end + def self.field_encodings + @field_encodings = { + gte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class UsageThreshold < ::Stripe::RequestParams class Filter < ::Stripe::RequestParams @@ -97777,6 +98903,28 @@ module Stripe title: nil, usage_threshold: nil ); end + def self.field_encodings + @field_encodings = { + credit_balance_threshold: { + kind: :object, + fields: { + lte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + spend_threshold: { + kind: :object, + fields: { + gte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + } + end end end end @@ -97936,12 +99084,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # A positive integer representing the amount of the credit grant. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::RequestParams # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. @@ -97982,6 +99133,11 @@ module Stripe params(custom_pricing_unit: T.nilable(::Stripe::Billing::CreditGrantCreateParams::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::Billing::CreditGrantCreateParams::Amount::Monetary), type: String).void } def initialize(custom_pricing_unit: nil, monetary: nil, type: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams class Scope < ::Stripe::RequestParams @@ -98120,6 +99276,14 @@ module Stripe name: nil, priority: nil ); end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end end end @@ -106666,12 +107830,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -106682,6 +107846,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. sig { @@ -106740,6 +107907,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class ManagedPayments < ::Stripe::RequestParams # Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. @@ -109870,6 +111042,17 @@ module Stripe approval_method: nil, checkout_items: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end end @@ -110236,12 +111419,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -110252,6 +111435,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. sig { @@ -110310,6 +111496,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class ShippingOption < ::Stripe::RequestParams class ShippingRateData < ::Stripe::RequestParams @@ -110628,6 +111819,17 @@ module Stripe shipping_options: nil, subscription_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end end @@ -110816,9 +112018,9 @@ module Stripe } def metadata=(_metadata); end # Requested number of tons for the order. Either this or `amount` must be specified. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def metric_tons; end - sig { params(_metric_tons: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_metric_tons: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def metric_tons=(_metric_tons); end # Unique identifier of the Climate product. sig { returns(String) } @@ -110826,7 +112028,7 @@ module Stripe sig { params(_product: String).returns(String) } def product=(_product); end sig { - params(amount: T.nilable(Integer), beneficiary: T.nilable(::Stripe::Climate::OrderCreateParams::Beneficiary), currency: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), metric_tons: T.nilable(String), product: String).void + params(amount: T.nilable(Integer), beneficiary: T.nilable(::Stripe::Climate::OrderCreateParams::Beneficiary), currency: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), metric_tons: T.nilable(BigDecimal), product: String).void } def initialize( amount: nil, @@ -110837,6 +112039,9 @@ module Stripe metric_tons: nil, product: nil ); end + def self.field_encodings + @field_encodings = {metric_tons: :decimal_string} + end end end end @@ -112630,12 +113835,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteCreateParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteCreateParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -112648,6 +113853,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -112797,6 +114005,14 @@ module Stripe refunds: nil, shipping_cost: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end # typed: true @@ -112895,12 +114111,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -112913,6 +114129,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -113062,6 +114281,14 @@ module Stripe refunds: nil, shipping_cost: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end # typed: true @@ -113134,12 +114361,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteListPreviewLineItemsParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteListPreviewLineItemsParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -113152,6 +114379,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -113321,6 +114551,14 @@ module Stripe shipping_cost: nil, starting_after: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end # typed: true @@ -118832,12 +120070,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -118846,6 +120084,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -118941,12 +120182,12 @@ module Stripe } def tax_rates=(_tax_rates); end # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemUpdateParams::Discount])), expand: T.nilable(T::Array[String]), margins: T.nilable(T.any(String, T::Array[String])), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemUpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemUpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemUpdateParams::Pricing), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemUpdateParams::Discount])), expand: T.nilable(T::Array[String]), margins: T.nilable(T.any(String, T::Array[String])), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemUpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemUpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemUpdateParams::Pricing), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -118965,6 +120206,12 @@ module Stripe tax_rates: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + } + end end end # typed: true @@ -119165,12 +120412,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -119179,6 +120426,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -119295,12 +120545,12 @@ module Stripe sig { params(_tax_rates: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def tax_rates=(_tax_rates); end # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), currency: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemCreateParams::Discount])), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), margins: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemCreateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemCreateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemCreateParams::Pricing), quantity: T.nilable(Integer), subscription: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), currency: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemCreateParams::Discount])), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), margins: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemCreateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemCreateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemCreateParams::Pricing), quantity: T.nilable(Integer), subscription: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -119324,6 +120574,12 @@ module Stripe tax_rates: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + } + end end end # typed: true @@ -121940,12 +123196,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceAddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceAddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -121955,6 +123211,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -122164,6 +123423,11 @@ module Stripe tax_amounts: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -122188,6 +123452,17 @@ module Stripe params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::InvoiceAddLinesParams::Line]).void } def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -122614,12 +123889,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceUpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceUpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -122629,6 +123904,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -122838,6 +124116,11 @@ module Stripe tax_amounts: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -122862,6 +124145,17 @@ module Stripe params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::InvoiceUpdateLinesParams::Line]).void } def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -123347,12 +124641,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -123361,6 +124655,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The integer amount in cents (or local equivalent) of previewed invoice item. sig { returns(T.nilable(Integer)) } @@ -123450,12 +124747,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Discount])), invoiceitem: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Discount])), invoiceitem: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -123475,6 +124772,12 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + } + end end class Issuer < ::Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -124919,12 +126222,14 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -124933,6 +126238,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -124997,6 +126305,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -125482,12 +126795,14 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -125497,6 +126812,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -125599,6 +126917,11 @@ module Stripe trial: nil, trial_offer: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -125858,6 +127181,28 @@ module Stripe trial_end: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams class BillUntil < ::Stripe::RequestParams @@ -126017,6 +127362,36 @@ module Stripe prebilling: nil, proration_behavior: nil ); end + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end end class SubscriptionDetails < ::Stripe::RequestParams class BillingMode < ::Stripe::RequestParams @@ -126360,12 +127735,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -126375,6 +127750,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. sig { @@ -126473,6 +127851,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class Prebilling < ::Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. @@ -126596,6 +127979,17 @@ module Stripe start_date: nil, trial_end: nil ); end + def self.field_encodings + @field_encodings = { + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end # Settings for automatic tax lookup for this invoice preview. sig { returns(T.nilable(::Stripe::InvoiceCreatePreviewParams::AutomaticTax)) } @@ -126714,6 +128108,65 @@ module Stripe subscription: nil, subscription_details: nil ); end + def self.field_encodings + @field_encodings = { + invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + }, + }, + }, + schedule_details: { + kind: :object, + fields: { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + }, + }, + subscription_details: { + kind: :object, + fields: { + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + } + end end end # typed: true @@ -126898,12 +128351,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceLineItemUpdateParams::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceLineItemUpdateParams::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -126913,6 +128366,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -127122,6 +128578,11 @@ module Stripe tax_amounts: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end # typed: true @@ -127347,37 +128808,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -127410,6 +128891,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -127448,6 +128942,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -127456,9 +128968,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -127471,12 +128983,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -127485,6 +128997,9 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string} + end end class MerchantData < ::Stripe::RequestParams # A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values. @@ -127845,6 +129360,33 @@ module Stripe verification_data: nil, wallet: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end @@ -127894,37 +129436,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -127957,6 +129519,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -127995,6 +129570,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -128087,9 +129680,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -128102,12 +129695,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -128116,6 +129709,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -128138,9 +129737,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -128153,9 +129752,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -128218,6 +129820,34 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: {kind: :array, element: {kind: :object, fields: {quantity: :decimal_string}}}, + } + end end # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } @@ -128250,6 +129880,42 @@ module Stripe expand: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end @@ -128312,37 +129978,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -128375,6 +130061,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -128413,6 +130112,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -128421,9 +130138,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -128436,12 +130153,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -128450,6 +130167,9 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string} + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -128479,6 +130199,33 @@ module Stripe params(expand: T.nilable(T::Array[String]), final_amount: Integer, fleet: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet), fuel: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fuel)).void } def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end @@ -132859,37 +134606,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -132922,6 +134689,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -132960,6 +134740,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -133052,9 +134850,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -133067,12 +134865,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -133081,6 +134879,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -133103,9 +134907,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -133118,9 +134922,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -133183,6 +134990,34 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: {kind: :array, element: {kind: :object, fields: {quantity: :decimal_string}}}, + } + end end # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -133233,6 +135068,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end @@ -133343,37 +135214,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -133406,6 +135297,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -133444,6 +135348,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -133536,9 +135458,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -133551,12 +135473,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -133565,6 +135487,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -133587,9 +135515,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -133602,9 +135530,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -133667,6 +135598,34 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: {kind: :array, element: {kind: :object, fields: {quantity: :decimal_string}}}, + } + end end # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -133717,6 +135676,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end @@ -133955,12 +135950,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -133969,6 +135964,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class ProductData < ::Stripe::RequestParams class PackageDimensions < ::Stripe::RequestParams @@ -134140,6 +136138,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class Payment < ::Stripe::RequestParams class Settings < ::Stripe::RequestParams @@ -136990,6 +138993,17 @@ module Stripe shipping_details: nil, tax_details: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -137135,12 +139149,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -137149,6 +139163,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class ProductData < ::Stripe::RequestParams class PackageDimensions < ::Stripe::RequestParams @@ -137326,6 +139343,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class Payment < ::Stripe::RequestParams class Settings < ::Stripe::RequestParams @@ -140180,6 +142202,17 @@ module Stripe shipping_details: nil, tax_details: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -148478,15 +150511,8 @@ module Stripe def verification_method; end sig { params(_verification_method: T.nilable(String)).returns(T.nilable(String)) } def verification_method=(_verification_method); end - # Preferred transaction settlement speed - sig { returns(T.nilable(T.any(String, String))) } - def preferred_settlement_speed; end - sig { - params(_preferred_settlement_speed: T.nilable(T.any(String, String))).returns(T.nilable(T.any(String, String))) - } - def preferred_settlement_speed=(_preferred_settlement_speed); end sig { - params(financial_connections: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String), preferred_settlement_speed: T.nilable(T.any(String, String))).void + params(financial_connections: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String)).void } def initialize( financial_connections: nil, @@ -148495,8 +150521,7 @@ module Stripe setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ); end end class WechatPay < ::Stripe::RequestParams @@ -157348,15 +159373,8 @@ module Stripe def verification_method; end sig { params(_verification_method: T.nilable(String)).returns(T.nilable(String)) } def verification_method=(_verification_method); end - # Preferred transaction settlement speed - sig { returns(T.nilable(T.any(String, String))) } - def preferred_settlement_speed; end - sig { - params(_preferred_settlement_speed: T.nilable(T.any(String, String))).returns(T.nilable(T.any(String, String))) - } - def preferred_settlement_speed=(_preferred_settlement_speed); end sig { - params(financial_connections: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String), preferred_settlement_speed: T.nilable(T.any(String, String))).void + params(financial_connections: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String)).void } def initialize( financial_connections: nil, @@ -157365,8 +159383,7 @@ module Stripe setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ); end end class WechatPay < ::Stripe::RequestParams @@ -169174,15 +171191,8 @@ module Stripe def verification_method; end sig { params(_verification_method: T.nilable(String)).returns(T.nilable(String)) } def verification_method=(_verification_method); end - # Preferred transaction settlement speed - sig { returns(T.nilable(T.any(String, String))) } - def preferred_settlement_speed; end - sig { - params(_preferred_settlement_speed: T.nilable(T.any(String, String))).returns(T.nilable(T.any(String, String))) - } - def preferred_settlement_speed=(_preferred_settlement_speed); end sig { - params(financial_connections: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String), preferred_settlement_speed: T.nilable(T.any(String, String))).void + params(financial_connections: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String)).void } def initialize( financial_connections: nil, @@ -169191,8 +171201,7 @@ module Stripe setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ); end end class WechatPay < ::Stripe::RequestParams @@ -171482,12 +173491,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -171498,6 +173507,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. sig { returns(T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::AdjustableQuantity)) } @@ -171527,6 +173539,11 @@ module Stripe params(adjustable_quantity: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::AdjustableQuantity), price: T.nilable(String), price_data: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData), quantity: Integer).void } def initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: nil); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class NameCollection < ::Stripe::RequestParams class Business < ::Stripe::RequestParams @@ -172095,6 +174112,17 @@ module Stripe tax_id_collection: nil, transfer_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -180036,9 +182064,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -180046,9 +182074,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -180056,7 +182084,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -180065,6 +182093,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformUsage < ::Stripe::RequestParams # Divide usage by this number. @@ -180091,9 +182125,9 @@ module Stripe sig { params(_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def amount=(_amount); end # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def amount_decimal; end - sig { params(_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def amount_decimal=(_amount_decimal); end # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. sig { returns(T.nilable(String)) } @@ -180179,7 +182213,7 @@ module Stripe sig { params(_usage_type: T.nilable(String)).returns(T.nilable(String)) } def usage_type=(_usage_type); end sig { - params(active: T.nilable(T::Boolean), amount: T.nilable(Integer), amount_decimal: T.nilable(String), billing_scheme: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), id: T.nilable(String), interval: String, interval_count: T.nilable(Integer), metadata: T.nilable(T.any(String, T::Hash[String, String])), meter: T.nilable(String), nickname: T.nilable(String), product: T.nilable(T.any(::Stripe::PlanCreateParams::Product, String)), tiers: T.nilable(T::Array[::Stripe::PlanCreateParams::Tier]), tiers_mode: T.nilable(String), transform_usage: T.nilable(::Stripe::PlanCreateParams::TransformUsage), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void + params(active: T.nilable(T::Boolean), amount: T.nilable(Integer), amount_decimal: T.nilable(BigDecimal), billing_scheme: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), id: T.nilable(String), interval: String, interval_count: T.nilable(Integer), metadata: T.nilable(T.any(String, T::Hash[String, String])), meter: T.nilable(String), nickname: T.nilable(String), product: T.nilable(T.any(::Stripe::PlanCreateParams::Product, String)), tiers: T.nilable(T::Array[::Stripe::PlanCreateParams::Tier]), tiers_mode: T.nilable(String), transform_usage: T.nilable(::Stripe::PlanCreateParams::TransformUsage), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void } def initialize( active: nil, @@ -180201,6 +182235,18 @@ module Stripe trial_period_days: nil, usage_type: nil ); end + def self.field_encodings + @field_encodings = { + amount_decimal: :decimal_string, + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + } + end end end # typed: true @@ -180367,9 +182413,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -180377,9 +182423,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -180387,7 +182433,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -180396,6 +182442,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(::Stripe::PriceCreateParams::CurrencyOptions::CustomUnitAmount)) } @@ -180422,12 +182474,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( custom_unit_amount: nil, @@ -180436,6 +182488,18 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::RequestParams # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. @@ -180582,9 +182646,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -180592,9 +182656,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -180602,7 +182666,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -180611,6 +182675,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -180731,12 +182801,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(active: T.nilable(T::Boolean), billing_scheme: T.nilable(String), currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::PriceCreateParams::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CustomUnitAmount), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(String), product: T.nilable(String), product_data: T.nilable(::Stripe::PriceCreateParams::ProductData), recurring: T.nilable(::Stripe::PriceCreateParams::Recurring), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::Tier]), tiers_mode: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean), transform_quantity: T.nilable(::Stripe::PriceCreateParams::TransformQuantity), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(active: T.nilable(T::Boolean), billing_scheme: T.nilable(String), currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::PriceCreateParams::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CustomUnitAmount), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(String), product: T.nilable(String), product_data: T.nilable(::Stripe::PriceCreateParams::ProductData), recurring: T.nilable(::Stripe::PriceCreateParams::Recurring), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::Tier]), tiers_mode: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean), transform_quantity: T.nilable(::Stripe::PriceCreateParams::TransformQuantity), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( active: nil, @@ -180759,6 +182829,18 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end end # typed: true @@ -180798,9 +182880,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -180808,9 +182890,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -180818,7 +182900,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -180827,6 +182909,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(::Stripe::PriceUpdateParams::CurrencyOptions::CustomUnitAmount)) } @@ -180853,12 +182941,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(custom_unit_amount: T.nilable(::Stripe::PriceUpdateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceUpdateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(custom_unit_amount: T.nilable(::Stripe::PriceUpdateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceUpdateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( custom_unit_amount: nil, @@ -180867,6 +182955,18 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class MigrateTo < ::Stripe::RequestParams # The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. @@ -181592,9 +183692,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -181602,9 +183702,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -181612,7 +183712,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -181621,6 +183721,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { @@ -181651,12 +183757,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( custom_unit_amount: nil, @@ -181665,6 +183771,21 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::RequestParams # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. @@ -181752,12 +183873,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CustomUnitAmount), metadata: T.nilable(T::Hash[String, String]), recurring: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CustomUnitAmount), metadata: T.nilable(T::Hash[String, String]), recurring: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -181769,6 +183890,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class MarketingFeature < ::Stripe::RequestParams # The marketing feature name. Up to 80 characters long. @@ -181937,6 +184061,11 @@ module Stripe unit_label: nil, url: nil ); end + def self.field_encodings + @field_encodings = { + default_price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end # typed: true @@ -183690,12 +185819,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -183705,6 +185834,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The discounts applied to this line item. sig { @@ -183749,6 +185881,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class SubscriptionData < ::Stripe::RequestParams class BillOnAcceptance < ::Stripe::RequestParams @@ -184749,6 +186886,17 @@ module Stripe test_clock: nil, transfer_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -186115,12 +188263,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -186130,6 +188278,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The discounts applied to this line item. sig { @@ -186180,6 +188331,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class SubscriptionData < ::Stripe::RequestParams class BillOnAcceptance < ::Stripe::RequestParams @@ -187131,6 +189287,17 @@ module Stripe subscription_data_overrides: nil, transfer_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -197264,12 +199431,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemUpdateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemUpdateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -197279,6 +199446,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. sig { @@ -197391,6 +199561,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end # typed: true @@ -197653,12 +199828,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemCreateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemCreateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -197668,6 +199843,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -197802,6 +199980,11 @@ module Stripe tax_rates: nil, trial: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end # typed: true @@ -198445,12 +200628,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -198459,6 +200642,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -198523,6 +200709,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -199008,12 +201199,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleCreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleCreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -199023,6 +201214,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -199123,6 +201317,11 @@ module Stripe trial: nil, trial_offer: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -199356,6 +201555,24 @@ module Stripe trial_end: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. @@ -199470,6 +201687,36 @@ module Stripe prebilling: nil, start_date: nil ); end + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end end end # typed: true @@ -199898,12 +202145,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -199912,6 +202159,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -199976,6 +202226,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -200461,12 +202716,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleUpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleUpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -200476,6 +202731,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -200576,6 +202834,11 @@ module Stripe trial: nil, trial_offer: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -200821,6 +203084,24 @@ module Stripe trial_end: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. @@ -200907,6 +203188,36 @@ module Stripe prebilling: nil, proration_behavior: nil ); end + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end end end # typed: true @@ -202480,12 +204791,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -202494,6 +204805,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -202554,6 +204868,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -203110,12 +205429,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionUpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionUpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -203125,6 +205444,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. sig { @@ -203219,6 +205541,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -204029,6 +206356,24 @@ module Stripe trial_from_plan: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -204379,12 +206724,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -204393,6 +206738,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -204453,6 +206801,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -205051,12 +207404,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionCreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionCreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -205066,6 +207419,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -205166,6 +207522,11 @@ module Stripe tax_rates: nil, trial: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PaymentSettings < ::Stripe::RequestParams class PaymentMethodOptions < ::Stripe::RequestParams @@ -205988,6 +208349,24 @@ module Stripe trial_period_days: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end # typed: true @@ -222298,12 +224677,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewLinesListParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewLinesListParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -222316,6 +224695,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -222485,6 +224867,14 @@ module Stripe shipping_cost: nil, starting_after: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end # typed: true @@ -226736,37 +229126,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -226799,6 +229209,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -226837,6 +229260,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -226845,9 +229286,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -226860,12 +229301,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -226874,6 +229315,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class MerchantData < ::Stripe::RequestParams # A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values. @@ -227248,6 +229695,33 @@ module Stripe verification_data: nil, wallet: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end @@ -227299,39 +229773,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end sig { - params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -227364,6 +229856,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -227402,6 +229907,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -227496,9 +230019,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -227511,12 +230034,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -227525,6 +230048,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -227547,9 +230076,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -227562,9 +230091,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -227627,6 +230159,37 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + } + end end # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } @@ -227661,6 +230224,42 @@ module Stripe expand: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end @@ -227727,37 +230326,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -227790,6 +230409,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -227828,6 +230460,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -227836,9 +230486,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -227851,12 +230501,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -227865,6 +230515,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -227898,6 +230554,33 @@ module Stripe params(expand: T.nilable(T::Array[String]), final_amount: Integer, fleet: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet), fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fuel)).void } def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end @@ -228262,39 +230945,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end sig { - params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -228327,6 +231028,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -228365,6 +231079,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -228459,9 +231191,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -228474,12 +231206,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -228488,6 +231220,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -228510,9 +231248,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -228525,9 +231263,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -228590,6 +231331,37 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + } + end end # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -228640,6 +231412,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end @@ -228752,39 +231560,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end sig { - params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -228817,6 +231643,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -228855,6 +231694,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -228949,9 +231806,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -228964,12 +231821,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -228978,6 +231835,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -229000,9 +231863,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -229015,9 +231878,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -229080,6 +231946,37 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + } + end end # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -229130,6 +232027,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end @@ -231661,6 +234594,9 @@ module Stripe params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void } def initialize(amount: nil, amount_type: nil, description: nil); end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { @@ -231688,6 +234624,9 @@ module Stripe params(mandate_options: T.nilable(::Stripe::V2::Billing::CollectionSettingCreateParams::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void } def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::RequestParams class BankTransfer < ::Stripe::RequestParams @@ -231869,6 +234808,14 @@ module Stripe sepa_debit: nil, us_bank_account: nil ); end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -231924,6 +234871,19 @@ module Stripe payment_method_configuration: nil, payment_method_options: nil ); end + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + } + end end end end @@ -232030,6 +234990,9 @@ module Stripe params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void } def initialize(amount: nil, amount_type: nil, description: nil); end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { @@ -232057,6 +235020,9 @@ module Stripe params(mandate_options: T.nilable(::Stripe::V2::Billing::CollectionSettingUpdateParams::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void } def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::RequestParams class BankTransfer < ::Stripe::RequestParams @@ -232238,6 +235204,14 @@ module Stripe sepa_debit: nil, us_bank_account: nil ); end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -232301,6 +235275,19 @@ module Stripe payment_method_configuration: nil, payment_method_options: nil ); end + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + } + end end end end @@ -232463,14 +235450,40 @@ module Stripe class IntentCreateParams < ::Stripe::RequestParams class Action < ::Stripe::RequestParams class Apply < ::Stripe::RequestParams + class Discount < ::Stripe::RequestParams + # The ID of the Coupon to apply. + sig { returns(T.nilable(String)) } + def coupon; end + sig { params(_coupon: T.nilable(String)).returns(T.nilable(String)) } + def coupon=(_coupon); end + # The ID of the PromotionCode to apply. + sig { returns(T.nilable(String)) } + def promotion_code; end + sig { params(_promotion_code: T.nilable(String)).returns(T.nilable(String)) } + def promotion_code=(_promotion_code); end + # Type of the discount. + sig { returns(String) } + def type; end + sig { params(_type: String).returns(String) } + def type=(_type); end + sig { + params(coupon: T.nilable(String), promotion_code: T.nilable(String), type: String).void + } + def initialize(coupon: nil, promotion_code: nil, type: nil); end + end class EffectiveAt < ::Stripe::RequestParams + # The timestamp at which the apply action will take effect. Only present if type is timestamp. Only allowed for discount actions. + sig { returns(T.nilable(String)) } + def timestamp; end + sig { params(_timestamp: T.nilable(String)).returns(T.nilable(String)) } + def timestamp=(_timestamp); end # When the apply action will take effect. sig { returns(String) } def type; end sig { params(_type: String).returns(String) } def type=(_type); end - sig { params(type: String).void } - def initialize(type: nil); end + sig { params(timestamp: T.nilable(String), type: String).void } + def initialize(timestamp: nil, type: nil); end end class InvoiceDiscountRule < ::Stripe::RequestParams class PercentOff < ::Stripe::RequestParams @@ -232493,14 +235506,17 @@ module Stripe } def maximum_applications=(_maximum_applications); end # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - sig { returns(String) } + sig { returns(BigDecimal) } def percent_off; end - sig { params(_percent_off: String).returns(String) } + sig { params(_percent_off: BigDecimal).returns(BigDecimal) } def percent_off=(_percent_off); end sig { - params(maximum_applications: ::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff::MaximumApplications, percent_off: String).void + params(maximum_applications: ::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff::MaximumApplications, percent_off: BigDecimal).void } def initialize(maximum_applications: nil, percent_off: nil); end + def self.field_encodings + @field_encodings = {percent_off: :decimal_string} + end end # The entity that the discount rule applies to, for example, the cadence. sig { returns(String) } @@ -232525,6 +235541,11 @@ module Stripe params(applies_to: String, type: String, percent_off: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff)).void } def initialize(applies_to: nil, type: nil, percent_off: nil); end + def self.field_encodings + @field_encodings = { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + } + end end class SpendModifierRule < ::Stripe::RequestParams class MaxBillingPeriodSpend < ::Stripe::RequestParams @@ -232575,7 +235596,7 @@ module Stripe params(_amount: ::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule::MaxBillingPeriodSpend::Amount).returns(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule::MaxBillingPeriodSpend::Amount) } def amount=(_amount); end - # The configration for the overage rate for the custom pricing unit. + # The configuration for the overage rate for the custom pricing unit. sig { returns(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule::MaxBillingPeriodSpend::CustomPricingUnitOverageRate) } @@ -232613,7 +235634,7 @@ module Stripe } def initialize(applies_to: nil, type: nil, max_billing_period_spend: nil); end end - # When the apply action will take effect. Defaults to on_reserve if not specified. + # When the apply action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::EffectiveAt)) } @@ -232627,6 +235648,15 @@ module Stripe def type; end sig { params(_type: String).returns(String) } def type=(_type); end + # Details for applying a discount. + sig { + returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount)) + } + def discount; end + sig { + params(_discount: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount)).returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount)) + } + def discount=(_discount); end # Details for applying a discount rule to future invoices. sig { returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule)) @@ -232646,14 +235676,23 @@ module Stripe } def spend_modifier_rule=(_spend_modifier_rule); end sig { - params(effective_at: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::EffectiveAt), type: String, invoice_discount_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule), spend_modifier_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule)).void + params(effective_at: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::EffectiveAt), type: String, discount: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount), invoice_discount_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule), spend_modifier_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule)).void } def initialize( effective_at: nil, type: nil, + discount: nil, invoice_discount_rule: nil, spend_modifier_rule: nil ); end + def self.field_encodings + @field_encodings = { + invoice_discount_rule: { + kind: :object, + fields: {percent_off: {kind: :object, fields: {percent_off: :decimal_string}}}, + }, + } + end end class Deactivate < ::Stripe::RequestParams class CancellationDetails < ::Stripe::RequestParams @@ -232983,7 +236022,7 @@ module Stripe sig { params(type: String).void } def initialize(type: nil); end end - # When the remove action will take effect. Defaults to on_reserve if not specified. + # When the remove action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Remove::EffectiveAt)) } @@ -233160,7 +236199,7 @@ module Stripe def price; end sig { params(_price: String).returns(String) } def price=(_price); end - # Quantity for this item. If not provided, will default to 1. + # Quantity for this item. If not provided, defaults to 1. sig { returns(T.nilable(Integer)) } def quantity; end sig { params(_quantity: T.nilable(Integer)).returns(T.nilable(Integer)) } @@ -233296,6 +236335,19 @@ module Stripe remove: nil, subscribe: nil ); end + def self.field_encodings + @field_encodings = { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: {percent_off: {kind: :object, fields: {percent_off: :decimal_string}}}, + }, + }, + }, + } + end end class CadenceData < ::Stripe::RequestParams class BillingCycle < ::Stripe::RequestParams @@ -233691,6 +236743,11 @@ module Stripe def currency; end sig { params(_currency: String).returns(String) } def currency=(_currency); end + # Select additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end # ID of an existing Cadence to use. sig { returns(T.nilable(String)) } def cadence; end @@ -233704,9 +236761,38 @@ module Stripe } def cadence_data=(_cadence_data); end sig { - params(actions: T::Array[::Stripe::V2::Billing::IntentCreateParams::Action], currency: String, cadence: T.nilable(String), cadence_data: T.nilable(::Stripe::V2::Billing::IntentCreateParams::CadenceData)).void + params(actions: T::Array[::Stripe::V2::Billing::IntentCreateParams::Action], currency: String, include: T.nilable(T::Array[String]), cadence: T.nilable(String), cadence_data: T.nilable(::Stripe::V2::Billing::IntentCreateParams::CadenceData)).void } - def initialize(actions: nil, currency: nil, cadence: nil, cadence_data: nil); end + def initialize( + actions: nil, + currency: nil, + include: nil, + cadence: nil, + cadence_data: nil + ); end + def self.field_encodings + @field_encodings = { + actions: { + kind: :array, + element: { + kind: :object, + fields: { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + }, + }, + }, + }, + }, + }, + }, + } + end end end end @@ -233755,7 +236841,15 @@ end module Stripe module V2 module Billing - class IntentReserveParams < ::Stripe::RequestParams; end + class IntentReserveParams < ::Stripe::RequestParams + # Select additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end end end end @@ -233835,9 +236929,9 @@ module Stripe def unit_amount=(_unit_amount); end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end - sig { params(_up_to_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def up_to_decimal=(_up_to_decimal); end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -233845,7 +236939,7 @@ module Stripe sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } def up_to_inf=(_up_to_inf); end sig { - params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(String), up_to_inf: T.nilable(String)).void + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void } def initialize( flat_amount: nil, @@ -233853,6 +236947,9 @@ module Stripe up_to_decimal: nil, up_to_inf: nil ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -233867,6 +236964,9 @@ module Stripe def round=(_round); end sig { params(divide_by: Integer, round: String).void } def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Three-letter ISO currency code, in lowercase. Must be a supported currency. sig { returns(String) } @@ -233960,6 +237060,15 @@ module Stripe transform_quantity: nil, unit_amount: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end end end end @@ -233991,9 +237100,9 @@ module Stripe def unit_amount=(_unit_amount); end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end - sig { params(_up_to_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def up_to_decimal=(_up_to_decimal); end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -234001,7 +237110,7 @@ module Stripe sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } def up_to_inf=(_up_to_inf); end sig { - params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(String), up_to_inf: T.nilable(String)).void + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void } def initialize( flat_amount: nil, @@ -234009,6 +237118,9 @@ module Stripe up_to_decimal: nil, up_to_inf: nil ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -234023,6 +237135,9 @@ module Stripe def round=(_round); end sig { params(divide_by: Integer, round: String).void } def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # A customer-facing name for the License Fee. # This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. @@ -234089,6 +237204,15 @@ module Stripe transform_quantity: nil, unit_amount: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end end end end @@ -234122,14 +237246,6 @@ module Stripe end end # typed: true -module Stripe - module V2 - module Billing - class LicenseFeeSubscriptionRetrieveParams < ::Stripe::RequestParams; end - end - end -end -# typed: true module Stripe module V2 module Billing @@ -234173,8 +237289,8 @@ module Stripe def display_name; end sig { params(_display_name: String).returns(String) } def display_name=(_display_name); end - # An internal key you can use to search for a particular billable item. - # Must be unique among billable items. + # An internal key you can use to search for a particular licensed item. + # Must be unique among licensed items. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end @@ -234243,7 +237359,7 @@ module Stripe def display_name; end sig { params(_display_name: T.nilable(String)).returns(T.nilable(String)) } def display_name=(_display_name); end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular licensed item. # Maximum length of 200 characters. # To remove the lookup_key from the object, set it to null in the request. sig { returns(T.nilable(String)) } @@ -234490,8 +237606,8 @@ module Stripe params(_invoice_presentation_dimensions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def invoice_presentation_dimensions=(_invoice_presentation_dimensions); end - # An internal key you can use to search for a particular billable item. - # Must be unique among billable items. + # An internal key you can use to search for a particular metered item. + # Must be unique among metered items. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end @@ -234578,7 +237694,7 @@ module Stripe def display_name; end sig { params(_display_name: T.nilable(String)).returns(T.nilable(String)) } def display_name=(_display_name); end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular metered item. # Maximum length of 200 characters. # To remove the lookup_key from the object, set it to null in the request. sig { returns(T.nilable(String)) } @@ -234667,7 +237783,7 @@ module Stripe sig { params(_display_name: String).returns(String) } def display_name=(_display_name); end # An internal key you can use to search for a particular one-time item. - # Must be unique among billable items. + # Must be unique among one-time items. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end @@ -234967,7 +238083,7 @@ module Stripe def id; end sig { params(_id: String).returns(String) } def id=(_id); end - # The version of the LicenseFee. Defaults to 'latest', if not specified. + # The ID of the License Fee Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end sig { params(_version: T.nilable(String)).returns(T.nilable(String)) } @@ -234981,7 +238097,7 @@ module Stripe def id; end sig { params(_id: String).returns(String) } def id=(_id); end - # The version of the RateCard. Defaults to 'latest', if not specified. + # The ID of the Rate Card Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end sig { params(_version: T.nilable(String)).returns(T.nilable(String)) } @@ -235157,6 +238273,11 @@ module Stripe def billing_cadence; end sig { params(_billing_cadence: T.nilable(String)).returns(T.nilable(String)) } def billing_cadence=(_billing_cadence); end + # Expand to include additional data such as discount_details, billing_cadence_details, or pricing_plan_component_details. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end # Optionally set the maximum number of results per page. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit; end @@ -235169,12 +238290,12 @@ module Stripe params(_payer: T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer)).returns(T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer)) } def payer=(_payer); end - # Filter by PricingPlan ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan_version`. + # Filter by PricingPlan ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan_version`. sig { returns(T.nilable(String)) } def pricing_plan; end sig { params(_pricing_plan: T.nilable(String)).returns(T.nilable(String)) } def pricing_plan=(_pricing_plan); end - # Filter by Pricing Plan Version ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan`. + # Filter by Pricing Plan Version ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan`. sig { returns(T.nilable(String)) } def pricing_plan_version; end sig { params(_pricing_plan_version: T.nilable(String)).returns(T.nilable(String)) } @@ -235185,10 +238306,11 @@ module Stripe sig { params(_servicing_status: T.nilable(String)).returns(T.nilable(String)) } def servicing_status=(_servicing_status); end sig { - params(billing_cadence: T.nilable(String), limit: T.nilable(Integer), payer: T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer), pricing_plan: T.nilable(String), pricing_plan_version: T.nilable(String), servicing_status: T.nilable(String)).void + params(billing_cadence: T.nilable(String), include: T.nilable(T::Array[String]), limit: T.nilable(Integer), payer: T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer), pricing_plan: T.nilable(String), pricing_plan_version: T.nilable(String), servicing_status: T.nilable(String)).void } def initialize( billing_cadence: nil, + include: nil, limit: nil, payer: nil, pricing_plan: nil, @@ -235203,7 +238325,15 @@ end module Stripe module V2 module Billing - class PricingPlanSubscriptionRetrieveParams < ::Stripe::RequestParams; end + class PricingPlanSubscriptionRetrieveParams < ::Stripe::RequestParams + # Expand to include additional data such as discount_details. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end end end end @@ -235236,8 +238366,14 @@ end module Stripe module V2 module Billing - module PricingPlanSubscriptions - class ComponentRetrieveParams < ::Stripe::RequestParams; end + class PricingPlanSubscriptionRemoveDiscountsParams < ::Stripe::RequestParams + # Expand to include additional data such as discount_details. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end end end end @@ -235544,6 +238680,248 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Billing + class RateCardModifyRatesParams < ::Stripe::RequestParams + class RatesToCreate < ::Stripe::RequestParams + class MeteredItemData < ::Stripe::RequestParams + class MeterSegmentCondition < ::Stripe::RequestParams + # A Meter dimension. + sig { returns(String) } + def dimension; end + sig { params(_dimension: String).returns(String) } + def dimension=(_dimension); end + # To count usage towards this metered item, the dimension must have this value. + sig { returns(String) } + def value; end + sig { params(_value: String).returns(String) } + def value=(_value); end + sig { params(dimension: String, value: String).void } + def initialize(dimension: nil, value: nil); end + end + # Description that customers will see in the invoice line item. + # Maximum length of 250 characters. + sig { returns(String) } + def display_name; end + sig { params(_display_name: String).returns(String) } + def display_name=(_display_name); end + # An internal key you can use to search for a particular metered item. + # Must be unique among metered items. + # Maximum length of 200 characters. + sig { returns(T.nilable(String)) } + def lookup_key; end + sig { params(_lookup_key: T.nilable(String)).returns(T.nilable(String)) } + def lookup_key=(_lookup_key); end + # ID of the Meter that measures usage for this Metered Item. + sig { returns(String) } + def meter; end + sig { params(_meter: String).returns(String) } + def meter=(_meter); end + # Optional array of Meter segments to filter event dimension keys for billing. + sig { + returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition]) + } + def meter_segment_conditions; end + sig { + params(_meter_segment_conditions: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition]).returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition]) + } + def meter_segment_conditions=(_meter_segment_conditions); end + # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + # to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 + # million events". + # Maximum length of 100 characters. + sig { returns(T.nilable(String)) } + def unit_label; end + sig { params(_unit_label: T.nilable(String)).returns(T.nilable(String)) } + def unit_label=(_unit_label); end + sig { + params(display_name: String, lookup_key: T.nilable(String), meter: String, meter_segment_conditions: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition], unit_label: T.nilable(String)).void + } + def initialize( + display_name: nil, + lookup_key: nil, + meter: nil, + meter_segment_conditions: nil, + unit_label: nil + ); end + end + class Tier < ::Stripe::RequestParams + # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + sig { returns(T.nilable(String)) } + def flat_amount; end + sig { params(_flat_amount: T.nilable(String)).returns(T.nilable(String)) } + def flat_amount=(_flat_amount); end + # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + # most 12 decimal places. + sig { returns(T.nilable(String)) } + def unit_amount; end + sig { params(_unit_amount: T.nilable(String)).returns(T.nilable(String)) } + def unit_amount=(_unit_amount); end + # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + # be set. + sig { returns(T.nilable(BigDecimal)) } + def up_to_decimal; end + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } + def up_to_decimal=(_up_to_decimal); end + # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + sig { returns(T.nilable(String)) } + def up_to_inf; end + sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } + def up_to_inf=(_up_to_inf); end + sig { + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void + } + def initialize( + flat_amount: nil, + unit_amount: nil, + up_to_decimal: nil, + up_to_inf: nil + ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end + end + class TransformQuantity < ::Stripe::RequestParams + # Divide usage by this number. + sig { returns(Integer) } + def divide_by; end + sig { params(_divide_by: Integer).returns(Integer) } + def divide_by=(_divide_by); end + # After division, round the result up or down. + sig { returns(String) } + def round; end + sig { params(_round: String).returns(String) } + def round=(_round); end + sig { params(divide_by: Integer, round: String).void } + def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end + end + # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + def metadata; end + sig { + params(_metadata: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) + } + def metadata=(_metadata); end + # The Metered Item that this rate binds to. Cannot be set if `metered_item_data` is provided, and must be set if it isn't. + sig { returns(T.nilable(String)) } + def metered_item; end + sig { params(_metered_item: T.nilable(String)).returns(T.nilable(String)) } + def metered_item=(_metered_item); end + # The data to create a metered item that binds to this rate. Cannot be set if `metered_item` is provided, and must be set if it isn't. + sig { + returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData)) + } + def metered_item_data; end + sig { + params(_metered_item_data: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData)).returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData)) + } + def metered_item_data=(_metered_item_data); end + # Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum + # quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity + # grows into new tiers. Can only be set if `tiers` is set. + sig { returns(T.nilable(String)) } + def tiering_mode; end + sig { params(_tiering_mode: T.nilable(String)).returns(T.nilable(String)) } + def tiering_mode=(_tiering_mode); end + # Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. + sig { + returns(T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier])) + } + def tiers; end + sig { + params(_tiers: T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier])).returns(T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier])) + } + def tiers=(_tiers); end + # Apply a transformation to the reported usage or set quantity before computing the amount billed. + sig { + returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity)) + } + def transform_quantity; end + sig { + params(_transform_quantity: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity)).returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity)) + } + def transform_quantity=(_transform_quantity); end + # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal + # places. Cannot be set if `tiers` is provided. + sig { returns(T.nilable(String)) } + def unit_amount; end + sig { params(_unit_amount: T.nilable(String)).returns(T.nilable(String)) } + def unit_amount=(_unit_amount); end + sig { + params(metadata: T.nilable(T::Hash[String, String]), metered_item: T.nilable(String), metered_item_data: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData), tiering_mode: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier]), transform_quantity: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity), unit_amount: T.nilable(String)).void + } + def initialize( + metadata: nil, + metered_item: nil, + metered_item_data: nil, + tiering_mode: nil, + tiers: nil, + transform_quantity: nil, + unit_amount: nil + ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end + end + class RatesToDelete < ::Stripe::RequestParams + # The ID of the RateCard rate to delete. + sig { returns(String) } + def id; end + sig { params(_id: String).returns(String) } + def id=(_id); end + sig { params(id: String).void } + def initialize(id: nil); end + end + # The list of RateCard rates to create or update. Maximum of 100 rates. + sig { returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate]) } + def rates_to_create; end + sig { + params(_rates_to_create: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate]).returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate]) + } + def rates_to_create=(_rates_to_create); end + # The list of RateCard rates to delete. Maximum of 100 rates. + sig { returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]) } + def rates_to_delete; end + sig { + params(_rates_to_delete: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]).returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]) + } + def rates_to_delete=(_rates_to_delete); end + sig { + params(rates_to_create: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate], rates_to_delete: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]).void + } + def initialize(rates_to_create: nil, rates_to_delete: nil); end + def self.field_encodings + @field_encodings = { + rates_to_create: { + kind: :array, + element: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + }, + }, + }, + } + end + end + end + end +end +# typed: true module Stripe module V2 module Billing @@ -235692,9 +239070,9 @@ module Stripe def unit_amount=(_unit_amount); end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end - sig { params(_up_to_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def up_to_decimal=(_up_to_decimal); end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -235702,7 +239080,7 @@ module Stripe sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } def up_to_inf=(_up_to_inf); end sig { - params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(String), up_to_inf: T.nilable(String)).void + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void } def initialize( flat_amount: nil, @@ -235710,6 +239088,9 @@ module Stripe up_to_decimal: nil, up_to_inf: nil ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -235724,6 +239105,9 @@ module Stripe def round=(_round); end sig { params(divide_by: Integer, round: String).void } def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # The custom pricing unit that this rate binds to. One of `unit_amount`, `tiers`, or `custom_pricing_unit_amount` is required. sig { @@ -235789,6 +239173,15 @@ module Stripe transform_quantity: nil, unit_amount: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end end end end @@ -235866,7 +239259,7 @@ module Stripe def billing_cadence; end sig { params(_billing_cadence: T.nilable(String)).returns(T.nilable(String)) } def billing_cadence=(_billing_cadence); end - # The page size limit, if not provided the default is 20. + # The page size limit. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit; end sig { params(_limit: T.nilable(Integer)).returns(T.nilable(Integer)) } @@ -235997,26 +239390,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end - end - class Monetary < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. sig { returns(String) } @@ -236033,18 +239415,21 @@ module Stripe } def custom_pricing_unit=(_custom_pricing_unit); end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { - returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end sig { - params(_monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)).returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)) + params(_monetary: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def monetary=(_monetary); end sig { - params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)).void + params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Amount)).void } def initialize(type: nil, custom_pricing_unit: nil, monetary: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams class Scope < ::Stripe::RequestParams @@ -236139,6 +239524,14 @@ module Stripe name: nil, priority: nil ); end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class CreditGrantPerTenant < ::Stripe::RequestParams class Amount < ::Stripe::RequestParams @@ -236149,26 +239542,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end - end - class Monetary < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. sig { returns(String) } @@ -236185,18 +239567,21 @@ module Stripe } def custom_pricing_unit=(_custom_pricing_unit); end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { - returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end sig { - params(_monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)).returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)) + params(_monetary: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def monetary=(_monetary); end sig { - params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)).void + params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Amount)).void } def initialize(type: nil, custom_pricing_unit: nil, monetary: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams class Scope < ::Stripe::RequestParams @@ -236372,6 +239757,14 @@ module Stripe name: nil, priority: nil ); end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # An internal key you can use to search for this service action. Maximum length of 200 characters. sig { returns(T.nilable(String)) } @@ -236420,6 +239813,28 @@ module Stripe credit_grant: nil, credit_grant_per_tenant: nil ); end + def self.field_encodings + @field_encodings = { + credit_grant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + credit_grant_per_tenant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + } + end end end end @@ -239211,10 +242626,21 @@ module Stripe params(_responsibilities: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities)).returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities)) } def responsibilities=(_responsibilities); end + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + sig { returns(T.nilable(String)) } + def timezone; end + sig { params(_timezone: T.nilable(String)).returns(T.nilable(String)) } + def timezone=(_timezone); end sig { - params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities)).void + params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities), timezone: T.nilable(String)).void } - def initialize(currency: nil, locales: nil, profile: nil, responsibilities: nil); end + def initialize( + currency: nil, + locales: nil, + profile: nil, + responsibilities: nil, + timezone: nil + ); end end class Identity < ::Stripe::RequestParams class Attestations < ::Stripe::RequestParams @@ -240833,27 +244259,11 @@ module Stripe ); end end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -240862,7 +244272,7 @@ module Stripe sig { params(_fiscal_year_end: T.nilable(String)).returns(T.nilable(String)) } def fiscal_year_end=(_fiscal_year_end); end sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount), fiscal_year_end: T.nilable(String)).void + params(amount: T.nilable(::Stripe::V2::Amount), fiscal_year_end: T.nilable(String)).void } def initialize(amount: nil, fiscal_year_end: nil); end end @@ -241155,32 +244565,14 @@ module Stripe def initialize(registrar: nil, type: nil, value: nil); end end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end - sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount)).void } def initialize(amount: nil); end end class RegistrationDate < ::Stripe::RequestParams @@ -241832,9 +245224,11 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percent owned by the person of the account's legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def percent_ownership=(_percent_ownership); end # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } @@ -241842,7 +245236,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), title: T.nilable(String)).void + params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), title: T.nilable(String)).void } def initialize( director: nil, @@ -241851,6 +245245,9 @@ module Stripe percent_ownership: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -242173,6 +245570,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { @@ -242219,6 +245621,16 @@ module Stripe entity_type: nil, individual: nil ); end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end # The account token generated by the account token api. sig { returns(T.nilable(String)) } @@ -242293,6 +245705,21 @@ module Stripe include: nil, metadata: nil ); end + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + }, + }, + } + end end end end @@ -245060,10 +248487,21 @@ module Stripe params(_responsibilities: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities)).returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities)) } def responsibilities=(_responsibilities); end + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + sig { returns(T.nilable(String)) } + def timezone; end + sig { params(_timezone: T.nilable(String)).returns(T.nilable(String)) } + def timezone=(_timezone); end sig { - params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities)).void + params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities), timezone: T.nilable(String)).void } - def initialize(currency: nil, locales: nil, profile: nil, responsibilities: nil); end + def initialize( + currency: nil, + locales: nil, + profile: nil, + responsibilities: nil, + timezone: nil + ); end end class Identity < ::Stripe::RequestParams class Attestations < ::Stripe::RequestParams @@ -246754,27 +250192,11 @@ module Stripe ); end end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -246783,7 +250205,7 @@ module Stripe sig { params(_fiscal_year_end: T.nilable(String)).returns(T.nilable(String)) } def fiscal_year_end=(_fiscal_year_end); end sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount), fiscal_year_end: T.nilable(String)).void + params(amount: T.nilable(::Stripe::V2::Amount), fiscal_year_end: T.nilable(String)).void } def initialize(amount: nil, fiscal_year_end: nil); end end @@ -247076,32 +250498,14 @@ module Stripe def initialize(registrar: nil, type: nil, value: nil); end end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end - sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount)).void } def initialize(amount: nil); end end class RegistrationDate < ::Stripe::RequestParams @@ -247753,9 +251157,11 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percent owned by the person of the account's legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def percent_ownership=(_percent_ownership); end # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } @@ -247763,7 +251169,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), title: T.nilable(String)).void + params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), title: T.nilable(String)).void } def initialize( director: nil, @@ -247772,6 +251178,9 @@ module Stripe percent_ownership: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -248094,6 +251503,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { @@ -248140,6 +251554,16 @@ module Stripe entity_type: nil, individual: nil ); end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end # The account token generated by the account token api. sig { returns(T.nilable(String)) } @@ -248214,6 +251638,21 @@ module Stripe include: nil, metadata: nil ); end + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + }, + }, + } + end end end end @@ -248651,9 +252090,9 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percentage of ownership the person has in the associated legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def percent_ownership=(_percent_ownership); end # Indicates whether the person is a representative of the associated legal entity. sig { returns(T.nilable(T::Boolean)) } @@ -248666,7 +252105,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), representative: T.nilable(T::Boolean), title: T.nilable(String)).void + params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), representative: T.nilable(T::Boolean), title: T.nilable(String)).void } def initialize( authorizer: nil, @@ -248678,6 +252117,9 @@ module Stripe representative: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -249006,6 +252448,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end end end @@ -249430,9 +252877,9 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percentage of ownership the person has in the associated legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def percent_ownership=(_percent_ownership); end # Indicates whether the person is a representative of the associated legal entity. sig { returns(T.nilable(T::Boolean)) } @@ -249445,7 +252892,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), representative: T.nilable(T::Boolean), title: T.nilable(String)).void + params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), representative: T.nilable(T::Boolean), title: T.nilable(String)).void } def initialize( authorizer: nil, @@ -249457,6 +252904,9 @@ module Stripe representative: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -249785,6 +253235,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end end end @@ -250179,9 +253634,9 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percentage of ownership the person has in the associated legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def percent_ownership=(_percent_ownership); end # Indicates whether the person is a representative of the associated legal entity. sig { returns(T.nilable(T::Boolean)) } @@ -250194,7 +253649,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), representative: T.nilable(T::Boolean), title: T.nilable(String)).void + params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), representative: T.nilable(T::Boolean), title: T.nilable(String)).void } def initialize( authorizer: nil, @@ -250206,6 +253661,9 @@ module Stripe representative: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -250536,6 +253994,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end end end @@ -250552,6 +254015,124 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + class AccountEvaluationCreateParams < ::Stripe::RequestParams + class AccountData < ::Stripe::RequestParams + class Defaults < ::Stripe::RequestParams + class Profile < ::Stripe::RequestParams + # The business URL. + sig { returns(String) } + def business_url; end + sig { params(_business_url: String).returns(String) } + def business_url=(_business_url); end + # Doing business as (DBA) name. + sig { returns(T.nilable(String)) } + def doing_business_as; end + sig { params(_doing_business_as: T.nilable(String)).returns(T.nilable(String)) } + def doing_business_as=(_doing_business_as); end + # Description of the account's product or service. + sig { returns(T.nilable(String)) } + def product_description; end + sig { params(_product_description: T.nilable(String)).returns(T.nilable(String)) } + def product_description=(_product_description); end + sig { + params(business_url: String, doing_business_as: T.nilable(String), product_description: T.nilable(String)).void + } + def initialize( + business_url: nil, + doing_business_as: nil, + product_description: nil + ); end + end + # Account profile data. + sig { + returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile) + } + def profile; end + sig { + params(_profile: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile).returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile) + } + def profile=(_profile); end + sig { + params(profile: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile).void + } + def initialize(profile: nil); end + end + class Identity < ::Stripe::RequestParams + class BusinessDetails < ::Stripe::RequestParams + # Registered business name. + sig { returns(T.nilable(String)) } + def registered_name; end + sig { params(_registered_name: T.nilable(String)).returns(T.nilable(String)) } + def registered_name=(_registered_name); end + sig { params(registered_name: T.nilable(String)).void } + def initialize(registered_name: nil); end + end + # Business details for identity data. + sig { + returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails) + } + def business_details; end + sig { + params(_business_details: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails).returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails) + } + def business_details=(_business_details); end + sig { + params(business_details: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails).void + } + def initialize(business_details: nil); end + end + # Default account settings. + sig { + returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults)) + } + def defaults; end + sig { + params(_defaults: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults)).returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults)) + } + def defaults=(_defaults); end + # Identity data. + sig { + returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)) + } + def identity; end + sig { + params(_identity: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)).returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)) + } + def identity=(_identity); end + sig { + params(defaults: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults), identity: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)).void + } + def initialize(defaults: nil, identity: nil); end + end + # The account ID to evaluate. Exactly one of account or account_data must be provided. + sig { returns(T.nilable(String)) } + def account; end + sig { params(_account: T.nilable(String)).returns(T.nilable(String)) } + def account=(_account); end + # Account data for entity-less evaluation. Exactly one of account or account_data must be provided. + sig { returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData)) } + def account_data; end + sig { + params(_account_data: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData)).returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData)) + } + def account_data=(_account_data); end + # List of signals to evaluate. + sig { returns(T::Array[String]) } + def signals; end + sig { params(_signals: T::Array[String]).returns(T::Array[String]) } + def signals=(_signals); end + sig { + params(account: T.nilable(String), account_data: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData), signals: T::Array[String]).void + } + def initialize(account: nil, account_data: nil, signals: nil); end + end + end + end +end +# typed: true module Stripe module V2 module Core @@ -251453,27 +255034,11 @@ module Stripe ); end end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -251482,7 +255047,7 @@ module Stripe sig { params(_fiscal_year_end: T.nilable(String)).returns(T.nilable(String)) } def fiscal_year_end=(_fiscal_year_end); end sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount), fiscal_year_end: T.nilable(String)).void + params(amount: T.nilable(::Stripe::V2::Amount), fiscal_year_end: T.nilable(String)).void } def initialize(amount: nil, fiscal_year_end: nil); end end @@ -251775,32 +255340,14 @@ module Stripe def initialize(registrar: nil, type: nil, value: nil); end end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end - sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount)).void } def initialize(amount: nil); end end class RegistrationDate < ::Stripe::RequestParams @@ -252452,9 +255999,11 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percent owned by the person of the account's legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def percent_ownership=(_percent_ownership); end # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } @@ -252462,7 +256011,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), title: T.nilable(String)).void + params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), title: T.nilable(String)).void } def initialize( director: nil, @@ -252471,6 +256020,9 @@ module Stripe percent_ownership: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -252793,6 +256345,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { @@ -252835,6 +256392,16 @@ module Stripe entity_type: nil, individual: nil ); end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end # The default contact email address for the Account. Required when configuring the account as a merchant or recipient. sig { returns(T.nilable(String)) } @@ -252867,6 +256434,21 @@ module Stripe display_name: nil, identity: nil ); end + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + }, + }, + } + end end end end @@ -252880,6 +256462,98 @@ module Stripe end end # typed: true +module Stripe + module V2 + module Core + class BatchJobCreateParams < ::Stripe::RequestParams + class Endpoint < ::Stripe::RequestParams + # The HTTP method to use when calling the endpoint. + sig { returns(String) } + def http_method; end + sig { params(_http_method: String).returns(String) } + def http_method=(_http_method); end + # The path of the endpoint to run this batch job against. + # In the form used in the documentation. For instance, for + # subscription migration this would be `/v1/subscriptions/:id/migrate`. + sig { returns(String) } + def path; end + sig { params(_path: String).returns(String) } + def path=(_path); end + sig { params(http_method: String, path: String).void } + def initialize(http_method: nil, path: nil); end + end + class NotificationSuppression < ::Stripe::RequestParams + # The scope of notification suppression. + sig { returns(String) } + def scope; end + sig { params(_scope: String).returns(String) } + def scope=(_scope); end + sig { params(scope: String).void } + def initialize(scope: nil); end + end + # The endpoint configuration for the batch job. + sig { returns(::Stripe::V2::Core::BatchJobCreateParams::Endpoint) } + def endpoint; end + sig { + params(_endpoint: ::Stripe::V2::Core::BatchJobCreateParams::Endpoint).returns(::Stripe::V2::Core::BatchJobCreateParams::Endpoint) + } + def endpoint=(_endpoint); end + # Optional field that allows the user to control how fast they want this batch job to run. + # Gives them a control over the number of webhooks they receive. + sig { returns(T.nilable(Integer)) } + def maximum_rps; end + sig { params(_maximum_rps: T.nilable(Integer)).returns(T.nilable(Integer)) } + def maximum_rps=(_maximum_rps); end + # The metadata of the `BatchJob` object. + sig { returns(T::Hash[String, String]) } + def metadata; end + sig { params(_metadata: T::Hash[String, String]).returns(T::Hash[String, String]) } + def metadata=(_metadata); end + # Notification suppression settings for the batch job. + sig { + returns(T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression)) + } + def notification_suppression; end + sig { + params(_notification_suppression: T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression)).returns(T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression)) + } + def notification_suppression=(_notification_suppression); end + # Allows the user to skip validation. + sig { returns(T::Boolean) } + def skip_validation; end + sig { params(_skip_validation: T::Boolean).returns(T::Boolean) } + def skip_validation=(_skip_validation); end + sig { + params(endpoint: ::Stripe::V2::Core::BatchJobCreateParams::Endpoint, maximum_rps: T.nilable(Integer), metadata: T::Hash[String, String], notification_suppression: T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression), skip_validation: T::Boolean).void + } + def initialize( + endpoint: nil, + maximum_rps: nil, + metadata: nil, + notification_suppression: nil, + skip_validation: nil + ); end + end + end + end +end +# typed: true +module Stripe + module V2 + module Core + class BatchJobRetrieveParams < ::Stripe::RequestParams; end + end + end +end +# typed: true +module Stripe + module V2 + module Core + class BatchJobCancelParams < ::Stripe::RequestParams; end + end + end +end +# typed: true module Stripe module V2 module Core @@ -253097,6 +256771,31 @@ module Stripe sig { params(aws_account_id: String, aws_region: String).void } def initialize(aws_account_id: nil, aws_region: nil); end end + class AzureEventGrid < ::Stripe::RequestParams + # The Azure region. + sig { returns(String) } + def azure_region; end + sig { params(_azure_region: String).returns(String) } + def azure_region=(_azure_region); end + # The name of the Azure resource group. + sig { returns(String) } + def azure_resource_group_name; end + sig { params(_azure_resource_group_name: String).returns(String) } + def azure_resource_group_name=(_azure_resource_group_name); end + # The Azure subscription ID. + sig { returns(String) } + def azure_subscription_id; end + sig { params(_azure_subscription_id: String).returns(String) } + def azure_subscription_id=(_azure_subscription_id); end + sig { + params(azure_region: String, azure_resource_group_name: String, azure_subscription_id: String).void + } + def initialize( + azure_region: nil, + azure_resource_group_name: nil, + azure_subscription_id: nil + ); end + end class WebhookEndpoint < ::Stripe::RequestParams # The URL of the webhook endpoint. sig { returns(String) } @@ -253121,7 +256820,11 @@ module Stripe def event_payload; end sig { params(_event_payload: String).returns(String) } def event_payload=(_event_payload); end - # Where events should be routed from. + # Specifies which accounts' events route to this destination. + # `@self`: Receive events from the account that owns the event destination. + # `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + # `@organization_members`: Receive events from accounts directly linked to the organization. + # `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. sig { returns(T.nilable(T::Array[String])) } def events_from; end sig { @@ -253164,6 +256867,13 @@ module Stripe params(_amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge)).returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge)) } def amazon_eventbridge=(_amazon_eventbridge); end + # Azure Event Grid configuration. + sig { returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid)) } + def azure_event_grid; end + sig { + params(_azure_event_grid: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid)).returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid)) + } + def azure_event_grid=(_azure_event_grid); end # Webhook endpoint configuration. sig { returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::WebhookEndpoint)) @@ -253174,7 +256884,7 @@ module Stripe } def webhook_endpoint=(_webhook_endpoint); end sig { - params(description: T.nilable(String), enabled_events: T::Array[String], event_payload: String, events_from: T.nilable(T::Array[String]), include: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, snapshot_api_version: T.nilable(String), type: String, amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge), webhook_endpoint: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::WebhookEndpoint)).void + params(description: T.nilable(String), enabled_events: T::Array[String], event_payload: String, events_from: T.nilable(T::Array[String]), include: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, snapshot_api_version: T.nilable(String), type: String, amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge), azure_event_grid: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid), webhook_endpoint: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::WebhookEndpoint)).void } def initialize( description: nil, @@ -253187,6 +256897,7 @@ module Stripe snapshot_api_version: nil, type: nil, amazon_eventbridge: nil, + azure_event_grid: nil, webhook_endpoint: nil ); end end @@ -253355,9 +257066,9 @@ module Stripe def initialize(business_type: nil, initiate: nil, name: nil); end end # The Account Number of the bank account. - sig { returns(String) } + sig { returns(T.nilable(String)) } def account_number; end - sig { params(_account_number: String).returns(String) } + sig { params(_account_number: T.nilable(String)).returns(T.nilable(String)) } def account_number=(_account_number); end # Closed Enum. The type of the bank account (checking or savings). sig { returns(T.nilable(String)) } @@ -253375,18 +257086,30 @@ module Stripe params(_confirmation_of_payee: T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee)).returns(T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee)) } def confirmation_of_payee=(_confirmation_of_payee); end - # The Sort Code of the bank account. + # The currency of the bank account. sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end + # The IBAN of the bank account. + sig { returns(T.nilable(String)) } + def iban; end + sig { params(_iban: T.nilable(String)).returns(T.nilable(String)) } + def iban=(_iban); end + # The Sort Code of the bank account. + sig { returns(T.nilable(String)) } def sort_code; end - sig { params(_sort_code: String).returns(String) } + sig { params(_sort_code: T.nilable(String)).returns(T.nilable(String)) } def sort_code=(_sort_code); end sig { - params(account_number: String, bank_account_type: T.nilable(String), confirmation_of_payee: T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee), sort_code: String).void + params(account_number: T.nilable(String), bank_account_type: T.nilable(String), confirmation_of_payee: T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee), currency: String, iban: T.nilable(String), sort_code: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, confirmation_of_payee: nil, + currency: nil, + iban: nil, sort_code: nil ); end end @@ -253486,6 +257209,11 @@ module Stripe def bank_account_type; end sig { params(_bank_account_type: T.nilable(String)).returns(T.nilable(String)) } def bank_account_type=(_bank_account_type); end + # The currency of the bank account. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end # The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number. sig { returns(T.nilable(String)) } def fedwire_routing_number; end @@ -253497,11 +257225,12 @@ module Stripe sig { params(_routing_number: T.nilable(String)).returns(T.nilable(String)) } def routing_number=(_routing_number); end sig { - params(account_number: String, bank_account_type: T.nilable(String), fedwire_routing_number: T.nilable(String), routing_number: T.nilable(String)).void + params(account_number: String, bank_account_type: T.nilable(String), currency: String, fedwire_routing_number: T.nilable(String), routing_number: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, + currency: nil, fedwire_routing_number: nil, routing_number: nil ); end @@ -253879,27 +257608,11 @@ module Stripe module MoneyManagement class CurrencyConversionCreateParams < ::Stripe::RequestParams class From < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # Amount object. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount)).returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # A lowercase alpha3 currency code like "usd". @@ -253907,33 +257620,15 @@ module Stripe def currency; end sig { params(_currency: T.nilable(String)).returns(T.nilable(String)) } def currency=(_currency); end - sig { - params(amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount), currency: T.nilable(String)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount), currency: T.nilable(String)).void } def initialize(amount: nil, currency: nil); end end class To < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # Amount object. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount)).returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # A lowercase alpha3 currency code like "usd". @@ -253941,9 +257636,7 @@ module Stripe def currency; end sig { params(_currency: T.nilable(String)).returns(T.nilable(String)) } def currency=(_currency); end - sig { - params(amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount), currency: T.nilable(String)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount), currency: T.nilable(String)).void } def initialize(amount: nil, currency: nil); end end # The FinancialAccount id to create the CurrencyConversion on. @@ -253986,6 +257679,11 @@ module Stripe module V2 module MoneyManagement class FinancialAccountListParams < ::Stripe::RequestParams + # Additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end # The page limit. sig { returns(T.nilable(Integer)) } def limit; end @@ -254002,9 +257700,9 @@ module Stripe sig { params(_types: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def types=(_types); end sig { - params(limit: T.nilable(Integer), status: T.nilable(String), types: T.nilable(T::Array[String])).void + params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer), status: T.nilable(String), types: T.nilable(T::Array[String])).void } - def initialize(limit: nil, status: nil, types: nil); end + def initialize(include: nil, limit: nil, status: nil, types: nil); end end end end @@ -254068,7 +257766,15 @@ end module Stripe module V2 module MoneyManagement - class FinancialAccountRetrieveParams < ::Stripe::RequestParams; end + class FinancialAccountRetrieveParams < ::Stripe::RequestParams + # Additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end end end end @@ -254278,20 +257984,6 @@ module Stripe module V2 module MoneyManagement class InboundTransferCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class From < ::Stripe::RequestParams # An optional currency field used to specify which currency is debited from the Payment Method. # Since many Payment Methods support only one currency, this field is optional. @@ -254322,11 +258014,9 @@ module Stripe def initialize(currency: nil, financial_account: nil); end end # The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. - sig { returns(::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # An optional, freeform description field intended to store metadata. sig { returns(T.nilable(String)) } @@ -254348,7 +258038,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount, description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::From, to: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::To).void + params(amount: ::Stripe::V2::Amount, description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::From, to: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::To).void } def initialize(amount: nil, description: nil, from: nil, to: nil); end end @@ -254435,20 +258125,6 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class DeliveryOptions < ::Stripe::RequestParams class PaperCheck < ::Stripe::RequestParams # Memo printed on the memo field of the check. @@ -254547,11 +258223,9 @@ module Stripe def initialize(currency: nil, payout_method: nil, recipient: nil); end end # The "presentment amount" to be sent to the recipient. - sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Delivery options to be used to send the OutboundPayment. sig { @@ -254605,6 +258279,11 @@ module Stripe def recipient_verification; end sig { params(_recipient_verification: T.nilable(String)).returns(T.nilable(String)) } def recipient_verification=(_recipient_verification); end + # The description that appears on the receiving end for an OutboundPayment (for example, on a bank statement). Must be between 3 and 22 characters long, and not contain profanity. + sig { returns(T.nilable(String)) } + def statement_descriptor; end + sig { params(_statement_descriptor: T.nilable(String)).returns(T.nilable(String)) } + def statement_descriptor=(_statement_descriptor); end # To which payout method to send the OutboundPayment. sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::To) } def to; end @@ -254613,7 +258292,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::From, metadata: T.nilable(T::Hash[String, String]), outbound_payment_quote: T.nilable(String), purpose: T.nilable(String), recipient_notification: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::RecipientNotification), recipient_verification: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::To).void + params(amount: ::Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::From, metadata: T.nilable(T::Hash[String, String]), outbound_payment_quote: T.nilable(String), purpose: T.nilable(String), recipient_notification: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::RecipientNotification), recipient_verification: T.nilable(String), statement_descriptor: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::To).void } def initialize( amount: nil, @@ -254625,6 +258304,7 @@ module Stripe purpose: nil, recipient_notification: nil, recipient_verification: nil, + statement_descriptor: nil, to: nil ); end end @@ -254652,20 +258332,6 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentQuoteCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class DeliveryOptions < ::Stripe::RequestParams # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } @@ -254722,11 +258388,9 @@ module Stripe def initialize(currency: nil, payout_method: nil, recipient: nil); end end # The "presentment amount" to be sent to the recipient. - sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Method to be used to send the OutboundPayment. sig { @@ -254752,7 +258416,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::DeliveryOptions), from: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::From, to: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::To).void + params(amount: ::Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::DeliveryOptions), from: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::From, to: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::To).void } def initialize(amount: nil, delivery_options: nil, from: nil, to: nil); end end @@ -254810,168 +258474,186 @@ module Stripe def country; end sig { params(_country: String).returns(String) } def country=(_country); end - # The routing number of the bank account, if present. - sig { returns(T.nilable(String)) } - def routing_number; end - sig { params(_routing_number: T.nilable(String)).returns(T.nilable(String)) } - def routing_number=(_routing_number); end - # The swift code of the bank account, if present. - sig { returns(T.nilable(String)) } - def swift_code; end - sig { params(_swift_code: T.nilable(String)).returns(T.nilable(String)) } - def swift_code=(_swift_code); end - sig { - params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void - } - def initialize( - account_number: nil, - bank_account_type: nil, - branch_number: nil, - country: nil, - routing_number: nil, - swift_code: nil - ); end - end - class Card < ::Stripe::RequestParams - # The expiration month of the card. - sig { returns(String) } - def exp_month; end - sig { params(_exp_month: String).returns(String) } - def exp_month=(_exp_month); end - # The expiration year of the card. - sig { returns(String) } - def exp_year; end - sig { params(_exp_year: String).returns(String) } - def exp_year=(_exp_year); end - # The card number. - sig { returns(String) } - def number; end - sig { params(_number: String).returns(String) } - def number=(_number); end - sig { params(exp_month: String, exp_year: String, number: String).void } - def initialize(exp_month: nil, exp_year: nil, number: nil); end - end - class CryptoWallet < ::Stripe::RequestParams - # Crypto wallet address. - sig { returns(String) } - def address; end - sig { params(_address: String).returns(String) } - def address=(_address); end - # Optional field, required if network supports memos (only "stellar" currently). - sig { returns(T.nilable(String)) } - def memo; end - sig { params(_memo: T.nilable(String)).returns(T.nilable(String)) } - def memo=(_memo); end - # Which rail we should use to make an Outbound money movement to this wallet. - sig { returns(String) } - def network; end - sig { params(_network: String).returns(String) } - def network=(_network); end - sig { params(address: String, memo: T.nilable(String), network: String).void } - def initialize(address: nil, memo: nil, network: nil); end - end - # Closed Enum. The type of payout method to be created. - sig { returns(String) } - def type; end - sig { params(_type: String).returns(String) } - def type=(_type); end - # The type specific details of the bank account payout method. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount)) - } - def bank_account; end - sig { - params(_bank_account: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount)) - } - def bank_account=(_bank_account); end - # The type specific details of the card payout method. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card)) - } - def card; end - sig { - params(_card: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card)) - } - def card=(_card); end - # The type specific details of the crypto wallet payout method. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)) - } - def crypto_wallet; end - sig { - params(_crypto_wallet: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)) - } - def crypto_wallet=(_crypto_wallet); end - sig { - params(type: String, bank_account: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount), card: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card), crypto_wallet: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)).void - } - def initialize(type: nil, bank_account: nil, card: nil, crypto_wallet: nil); end - end - # If provided, the existing payout method resource to link to this setup intent. - # Any payout_method_data provided is used to update information on this linked payout method resource. - sig { returns(T.nilable(String)) } - def payout_method; end - sig { params(_payout_method: T.nilable(String)).returns(T.nilable(String)) } - def payout_method=(_payout_method); end - # If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. - # If a payout_method provided, used to update data on the credential linked to this setup intent. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData)) - } - def payout_method_data; end - sig { - params(_payout_method_data: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData)) - } - def payout_method_data=(_payout_method_data); end - # Specify which type of outbound money movement this credential should be set up for (payment | transfer). - # If not provided, defaults to payment. - sig { returns(T.nilable(String)) } - def usage_intent; end - sig { params(_usage_intent: T.nilable(String)).returns(T.nilable(String)) } - def usage_intent=(_usage_intent); end - sig { - params(payout_method: T.nilable(String), payout_method_data: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData), usage_intent: T.nilable(String)).void - } - def initialize(payout_method: nil, payout_method_data: nil, usage_intent: nil); end - end - end - end -end -# typed: true -module Stripe - module V2 - module MoneyManagement - class OutboundSetupIntentRetrieveParams < ::Stripe::RequestParams; end - end - end -end -# typed: true -module Stripe - module V2 - module MoneyManagement - class OutboundSetupIntentUpdateParams < ::Stripe::RequestParams - class PayoutMethodData < ::Stripe::RequestParams - class BankAccount < ::Stripe::RequestParams - # The account number or IBAN of the bank account. + # The currency of the bank account. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end + # The routing number of the bank account, if present. + sig { returns(T.nilable(String)) } + def routing_number; end + sig { params(_routing_number: T.nilable(String)).returns(T.nilable(String)) } + def routing_number=(_routing_number); end + # The swift code of the bank account, if present. + sig { returns(T.nilable(String)) } + def swift_code; end + sig { params(_swift_code: T.nilable(String)).returns(T.nilable(String)) } + def swift_code=(_swift_code); end + sig { + params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, currency: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void + } + def initialize( + account_number: nil, + bank_account_type: nil, + branch_number: nil, + country: nil, + currency: nil, + routing_number: nil, + swift_code: nil + ); end + end + class Card < ::Stripe::RequestParams + # The currency of the card. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end + # The expiration month of the card. + sig { returns(String) } + def exp_month; end + sig { params(_exp_month: String).returns(String) } + def exp_month=(_exp_month); end + # The expiration year of the card. + sig { returns(String) } + def exp_year; end + sig { params(_exp_year: String).returns(String) } + def exp_year=(_exp_year); end + # The card number. + sig { returns(String) } + def number; end + sig { params(_number: String).returns(String) } + def number=(_number); end + sig { + params(currency: String, exp_month: String, exp_year: String, number: String).void + } + def initialize(currency: nil, exp_month: nil, exp_year: nil, number: nil); end + end + class CryptoWallet < ::Stripe::RequestParams + # Crypto wallet address. + sig { returns(String) } + def address; end + sig { params(_address: String).returns(String) } + def address=(_address); end + # Optional field, required if network supports memos (only "stellar" currently). + sig { returns(T.nilable(String)) } + def memo; end + sig { params(_memo: T.nilable(String)).returns(T.nilable(String)) } + def memo=(_memo); end + # Which rail we should use to make an Outbound money movement to this wallet. + sig { returns(String) } + def network; end + sig { params(_network: String).returns(String) } + def network=(_network); end + sig { params(address: String, memo: T.nilable(String), network: String).void } + def initialize(address: nil, memo: nil, network: nil); end + end + # Closed Enum. The type of payout method to be created. + sig { returns(String) } + def type; end + sig { params(_type: String).returns(String) } + def type=(_type); end + # The type specific details of the bank account payout method. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount)) + } + def bank_account; end + sig { + params(_bank_account: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount)) + } + def bank_account=(_bank_account); end + # The type specific details of the card payout method. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card)) + } + def card; end + sig { + params(_card: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card)) + } + def card=(_card); end + # The type specific details of the crypto wallet payout method. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)) + } + def crypto_wallet; end + sig { + params(_crypto_wallet: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)) + } + def crypto_wallet=(_crypto_wallet); end + sig { + params(type: String, bank_account: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::BankAccount), card: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::Card), crypto_wallet: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData::CryptoWallet)).void + } + def initialize(type: nil, bank_account: nil, card: nil, crypto_wallet: nil); end + end + # If provided, the existing payout method resource to link to this setup intent. + # Any payout_method_data provided is used to update information on this linked payout method resource. + sig { returns(T.nilable(String)) } + def payout_method; end + sig { params(_payout_method: T.nilable(String)).returns(T.nilable(String)) } + def payout_method=(_payout_method); end + # If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. + # If a payout_method provided, used to update data on the credential linked to this setup intent. + sig { + returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData)) + } + def payout_method_data; end + sig { + params(_payout_method_data: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData)).returns(T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData)) + } + def payout_method_data=(_payout_method_data); end + # Specify which type of outbound money movement this credential should be set up for (payment | transfer). + # If not provided, defaults to payment. + sig { returns(T.nilable(String)) } + def usage_intent; end + sig { params(_usage_intent: T.nilable(String)).returns(T.nilable(String)) } + def usage_intent=(_usage_intent); end + sig { + params(payout_method: T.nilable(String), payout_method_data: T.nilable(::Stripe::V2::MoneyManagement::OutboundSetupIntentCreateParams::PayoutMethodData), usage_intent: T.nilable(String)).void + } + def initialize(payout_method: nil, payout_method_data: nil, usage_intent: nil); end + end + end + end +end +# typed: true +module Stripe + module V2 + module MoneyManagement + class OutboundSetupIntentRetrieveParams < ::Stripe::RequestParams; end + end + end +end +# typed: true +module Stripe + module V2 + module MoneyManagement + class OutboundSetupIntentUpdateParams < ::Stripe::RequestParams + class PayoutMethodData < ::Stripe::RequestParams + class BankAccount < ::Stripe::RequestParams + # The account number or IBAN of the bank account. + sig { returns(String) } + def account_number; end + sig { params(_account_number: String).returns(String) } + def account_number=(_account_number); end + # Closed Enum. The type of the bank account (checking or savings). + sig { returns(T.nilable(String)) } + def bank_account_type; end + sig { params(_bank_account_type: T.nilable(String)).returns(T.nilable(String)) } + def bank_account_type=(_bank_account_type); end + # The branch number of the bank account, if present. + sig { returns(T.nilable(String)) } + def branch_number; end + sig { params(_branch_number: T.nilable(String)).returns(T.nilable(String)) } + def branch_number=(_branch_number); end + # The country code of the bank account. + sig { returns(String) } + def country; end + sig { params(_country: String).returns(String) } + def country=(_country); end + # The currency of the bank account. sig { returns(String) } - def account_number; end - sig { params(_account_number: String).returns(String) } - def account_number=(_account_number); end - # Closed Enum. The type of the bank account (checking or savings). - sig { returns(T.nilable(String)) } - def bank_account_type; end - sig { params(_bank_account_type: T.nilable(String)).returns(T.nilable(String)) } - def bank_account_type=(_bank_account_type); end - # The branch number of the bank account, if present. - sig { returns(T.nilable(String)) } - def branch_number; end - sig { params(_branch_number: T.nilable(String)).returns(T.nilable(String)) } - def branch_number=(_branch_number); end - # The country code of the bank account. - sig { returns(String) } - def country; end - sig { params(_country: String).returns(String) } - def country=(_country); end + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end # The routing number of the bank account, if present. sig { returns(T.nilable(String)) } def routing_number; end @@ -254983,18 +258665,24 @@ module Stripe sig { params(_swift_code: T.nilable(String)).returns(T.nilable(String)) } def swift_code=(_swift_code); end sig { - params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void + params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, currency: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, branch_number: nil, country: nil, + currency: nil, routing_number: nil, swift_code: nil ); end end class Card < ::Stripe::RequestParams + # The currency of the card. + sig { returns(T.nilable(String)) } + def currency; end + sig { params(_currency: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_currency); end # The expiration month of the card. sig { returns(T.nilable(String)) } def exp_month; end @@ -255011,9 +258699,9 @@ module Stripe sig { params(_number: T.nilable(String)).returns(T.nilable(String)) } def number=(_number); end sig { - params(exp_month: T.nilable(String), exp_year: T.nilable(String), number: T.nilable(String)).void + params(currency: T.nilable(String), exp_month: T.nilable(String), exp_year: T.nilable(String), number: T.nilable(String)).void } - def initialize(exp_month: nil, exp_year: nil, number: nil); end + def initialize(currency: nil, exp_month: nil, exp_year: nil, number: nil); end end # Closed Enum. The type of payout method to be created/updated. sig { returns(String) } @@ -255140,20 +258828,6 @@ module Stripe module V2 module MoneyManagement class OutboundTransferCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class DeliveryOptions < ::Stripe::RequestParams # Open Enum. Method for bank account. sig { returns(T.nilable(String)) } @@ -255198,11 +258872,9 @@ module Stripe def initialize(currency: nil, payout_method: nil); end end # The "presentment amount" for the OutboundPayment. - sig { returns(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Delivery options to be used to send the OutboundTransfer. sig { @@ -255237,6 +258909,11 @@ module Stripe def recipient_verification; end sig { params(_recipient_verification: T.nilable(String)).returns(T.nilable(String)) } def recipient_verification=(_recipient_verification); end + # The description that appears on the receiving end for an OutboundTransfer (for example, on a bank statement). Must be between 3 and 22 characters long, and not contain profanity. + sig { returns(T.nilable(String)) } + def statement_descriptor; end + sig { params(_statement_descriptor: T.nilable(String)).returns(T.nilable(String)) } + def statement_descriptor=(_statement_descriptor); end # To which payout method to send the OutboundTransfer. sig { returns(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::To) } def to; end @@ -255245,7 +258922,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::From, metadata: T.nilable(T::Hash[String, String]), recipient_verification: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::To).void + params(amount: ::Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::From, metadata: T.nilable(T::Hash[String, String]), recipient_verification: T.nilable(String), statement_descriptor: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::To).void } def initialize( amount: nil, @@ -255254,6 +258931,7 @@ module Stripe from: nil, metadata: nil, recipient_verification: nil, + statement_descriptor: nil, to: nil ); end end @@ -255642,20 +259320,6 @@ module Stripe module V2 module Payments class OffSessionPaymentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class Capture < ::Stripe::RequestParams # The method to use to capture the payment. sig { returns(String) } @@ -255867,11 +259531,9 @@ module Stripe def initialize(amount: nil, destination: nil); end end # The “presentment amount” to be collected from the customer. - sig { returns(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount).returns(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # The frequency of the underlying payment. sig { returns(String) } @@ -255974,7 +259636,7 @@ module Stripe } def transfer_data=(_transfer_data); end sig { - params(amount: ::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount, cadence: String, capture: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Capture), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::TransferData)).void + params(amount: ::Stripe::V2::Amount, cadence: String, capture: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Capture), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::TransferData)).void } def initialize( amount: nil, @@ -256149,26 +259811,10 @@ module Stripe module V2 module Payments class SettlementAllocationIntentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # The amount and currency of the SettlementAllocationIntent. Allowed Currencies are `gbp` | `eur`. - sig { returns(::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount).returns(::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Date when we expect to receive the funds. Must be in future . sig { returns(String) } @@ -256193,7 +259839,7 @@ module Stripe sig { params(_reference: String).returns(String) } def reference=(_reference); end sig { - params(amount: ::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount, expected_settlement_date: String, financial_account: String, metadata: T.nilable(T::Hash[String, String]), reference: String).void + params(amount: ::Stripe::V2::Amount, expected_settlement_date: String, financial_account: String, metadata: T.nilable(T::Hash[String, String]), reference: String).void } def initialize( amount: nil, @@ -256219,27 +259865,11 @@ module Stripe module V2 module Payments class SettlementAllocationIntentUpdateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # The new amount for the SettlementAllocationIntent. Only amount.value can be updated and currency must remain same. - sig { - returns(T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount)).returns(T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The new reference for the SettlementAllocationIntent. @@ -256247,9 +259877,7 @@ module Stripe def reference; end sig { params(_reference: T.nilable(String)).returns(T.nilable(String)) } def reference=(_reference); end - sig { - params(amount: T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount), reference: T.nilable(String)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount), reference: T.nilable(String)).void } def initialize(amount: nil, reference: nil); end end end @@ -256300,33 +259928,15 @@ module Stripe module Payments module SettlementAllocationIntents class SplitCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # The target account for settling the SettlementAllocationIntentSplit. sig { returns(String) } def account; end sig { params(_account: String).returns(String) } def account=(_account); end # The amount and currency of the SettlementAllocationIntentSplit. - sig { - returns(::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount) - } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount).returns(::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Metadata associated with the SettlementAllocationIntentSplit. sig { returns(T.nilable(T::Hash[String, String])) } @@ -256341,7 +259951,7 @@ module Stripe sig { params(_type: String).returns(String) } def type=(_type); end sig { - params(account: String, amount: ::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount, metadata: T.nilable(T::Hash[String, String]), type: String).void + params(account: String, amount: ::Stripe::V2::Amount, metadata: T.nilable(T::Hash[String, String]), type: String).void } def initialize(account: nil, amount: nil, metadata: nil, type: nil); end end @@ -256512,9 +260122,9 @@ module Stripe sig { params(_jurisdiction: T.nilable(String)).returns(T.nilable(String)) } def jurisdiction=(_jurisdiction); end # Percentage of the tax rate. Must be positive and maximum of 4 decimal points. - sig { returns(String) } + sig { returns(BigDecimal) } def percentage; end - sig { params(_percentage: String).returns(String) } + sig { params(_percentage: BigDecimal).returns(BigDecimal) } def percentage=(_percentage); end # State of the tax rate. sig { returns(T.nilable(String)) } @@ -256522,7 +260132,7 @@ module Stripe sig { params(_state: T.nilable(String)).returns(T.nilable(String)) } def state=(_state); end sig { - params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: String, state: T.nilable(String)).void + params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: BigDecimal, state: T.nilable(String)).void } def initialize( country: nil, @@ -256532,6 +260142,9 @@ module Stripe percentage: nil, state: nil ); end + def self.field_encodings + @field_encodings = {percentage: :decimal_string} + end end # The tax rates to be applied. sig { @@ -256551,6 +260164,14 @@ module Stripe params(rates: T::Array[::Stripe::V2::Tax::ManualRuleCreateParams::ScheduledTaxRate::Rate], starts_at: T.nilable(String)).void } def initialize(rates: nil, starts_at: nil); end + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + } + end end # Location where the rule applies. sig { returns(T.nilable(::Stripe::V2::Tax::ManualRuleCreateParams::Location)) } @@ -256577,6 +260198,22 @@ module Stripe params(location: T.nilable(::Stripe::V2::Tax::ManualRuleCreateParams::Location), products: T.nilable(T::Array[::Stripe::V2::Tax::ManualRuleCreateParams::Product]), scheduled_tax_rates: T::Array[::Stripe::V2::Tax::ManualRuleCreateParams::ScheduledTaxRate]).void } def initialize(location: nil, products: nil, scheduled_tax_rates: nil); end + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + }, + }, + }, + } + end end end end @@ -256657,9 +260294,9 @@ module Stripe sig { params(_jurisdiction: T.nilable(String)).returns(T.nilable(String)) } def jurisdiction=(_jurisdiction); end # Percentage of the tax rate. Must be positive and maximum of 4 decimal points. - sig { returns(String) } + sig { returns(BigDecimal) } def percentage; end - sig { params(_percentage: String).returns(String) } + sig { params(_percentage: BigDecimal).returns(BigDecimal) } def percentage=(_percentage); end # State of the tax rate. sig { returns(T.nilable(String)) } @@ -256667,7 +260304,7 @@ module Stripe sig { params(_state: T.nilable(String)).returns(T.nilable(String)) } def state=(_state); end sig { - params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: String, state: T.nilable(String)).void + params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: BigDecimal, state: T.nilable(String)).void } def initialize( country: nil, @@ -256677,6 +260314,9 @@ module Stripe percentage: nil, state: nil ); end + def self.field_encodings + @field_encodings = {percentage: :decimal_string} + end end # The tax rates to be applied. sig { @@ -256696,6 +260336,14 @@ module Stripe params(rates: T::Array[::Stripe::V2::Tax::ManualRuleUpdateParams::ScheduledTaxRate::Rate], starts_at: T.nilable(String)).void } def initialize(rates: nil, starts_at: nil); end + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + } + end end # Location where the rule applies. sig { returns(T.nilable(::Stripe::V2::Tax::ManualRuleUpdateParams::Location)) } @@ -256722,6 +260370,22 @@ module Stripe params(location: T.nilable(::Stripe::V2::Tax::ManualRuleUpdateParams::Location), products: T.nilable(T::Array[::Stripe::V2::Tax::ManualRuleUpdateParams::Product]), scheduled_tax_rates: T::Array[::Stripe::V2::Tax::ManualRuleUpdateParams::ScheduledTaxRate]).void } def initialize(location: nil, products: nil, scheduled_tax_rates: nil); end + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + }, + }, + }, + } + end end end end @@ -256739,26 +260403,10 @@ module Stripe module V2 module TestHelpers class FinancialAddressCreditParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # Object containing the amount value and currency to credit. - sig { returns(::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount).returns(::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. sig { returns(String) } @@ -256771,7 +260419,7 @@ module Stripe sig { params(_statement_descriptor: T.nilable(String)).returns(T.nilable(String)) } def statement_descriptor=(_statement_descriptor); end sig { - params(amount: ::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount, network: String, statement_descriptor: T.nilable(String)).void + params(amount: ::Stripe::V2::Amount, network: String, statement_descriptor: T.nilable(String)).void } def initialize(amount: nil, network: nil, statement_descriptor: nil); end end diff --git a/rbi/stripe/params/billing/alert_create_params.rbi b/rbi/stripe/params/billing/alert_create_params.rbi index 17cea0428..03757ce4b 100644 --- a/rbi/stripe/params/billing/alert_create_params.rbi +++ b/rbi/stripe/params/billing/alert_create_params.rbi @@ -116,12 +116,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # A positive decimal string representing the amount of the custom pricing unit threshold. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::RequestParams # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. @@ -164,6 +167,11 @@ module Stripe params(balance_type: String, custom_pricing_unit: T.nilable(::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Lte::CustomPricingUnit), monetary: T.nilable(::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Lte::Monetary)).void } def initialize(balance_type: nil, custom_pricing_unit: nil, monetary: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time. sig { @@ -185,6 +193,14 @@ module Stripe params(filters: T.nilable(T::Array[::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Filter]), lte: ::Stripe::Billing::AlertCreateParams::CreditBalanceThreshold::Lte).void } def initialize(filters: nil, lte: nil); end + def self.field_encodings + @field_encodings = { + lte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class SpendThreshold < ::Stripe::RequestParams class Filters < ::Stripe::RequestParams @@ -242,12 +258,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # A positive decimal string representing the amount of the custom pricing unit threshold. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The monetary amount. Required when type is `amount`. The threshold is the total_before_tax, the amount consumed after all credits and discounts are applied, but before tax is applied. sig { @@ -276,6 +295,11 @@ module Stripe params(amount: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::Amount), custom_pricing_unit: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte::CustomPricingUnit), type: String).void } def initialize(amount: nil, custom_pricing_unit: nil, type: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # Defines the period over which spend is aggregated. sig { returns(String) } @@ -305,6 +329,14 @@ module Stripe params(aggregation_period: String, filters: T.nilable(::Stripe::Billing::AlertCreateParams::SpendThreshold::Filters), group_by: T.nilable(String), gte: ::Stripe::Billing::AlertCreateParams::SpendThreshold::Gte).void } def initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil); end + def self.field_encodings + @field_encodings = { + gte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class UsageThreshold < ::Stripe::RequestParams class Filter < ::Stripe::RequestParams @@ -397,6 +429,28 @@ module Stripe title: nil, usage_threshold: nil ); end + def self.field_encodings + @field_encodings = { + credit_balance_threshold: { + kind: :object, + fields: { + lte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + spend_threshold: { + kind: :object, + fields: { + gte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/billing/credit_grant_create_params.rbi b/rbi/stripe/params/billing/credit_grant_create_params.rbi index bac8e4703..c32f06eeb 100644 --- a/rbi/stripe/params/billing/credit_grant_create_params.rbi +++ b/rbi/stripe/params/billing/credit_grant_create_params.rbi @@ -13,12 +13,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # A positive integer representing the amount of the credit grant. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::RequestParams # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. @@ -59,6 +62,11 @@ module Stripe params(custom_pricing_unit: T.nilable(::Stripe::Billing::CreditGrantCreateParams::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::Billing::CreditGrantCreateParams::Amount::Monetary), type: String).void } def initialize(custom_pricing_unit: nil, monetary: nil, type: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams class Scope < ::Stripe::RequestParams @@ -197,6 +205,14 @@ module Stripe name: nil, priority: nil ); end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/checkout/session_create_params.rbi b/rbi/stripe/params/checkout/session_create_params.rbi index 5a87e20c2..2b78dc166 100644 --- a/rbi/stripe/params/checkout/session_create_params.rbi +++ b/rbi/stripe/params/checkout/session_create_params.rbi @@ -939,12 +939,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -955,6 +955,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. sig { @@ -1013,6 +1016,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class ManagedPayments < ::Stripe::RequestParams # Set to `true` to enable [Managed Payments](https://docs.stripe.com/payments/managed-payments), Stripe's merchant of record solution, for this session. @@ -4143,6 +4151,17 @@ module Stripe approval_method: nil, checkout_items: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/checkout/session_update_params.rbi b/rbi/stripe/params/checkout/session_update_params.rbi index 3e5980584..a43c861f0 100644 --- a/rbi/stripe/params/checkout/session_update_params.rbi +++ b/rbi/stripe/params/checkout/session_update_params.rbi @@ -364,12 +364,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::Checkout::SessionUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -380,6 +380,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. sig { @@ -438,6 +441,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class ShippingOption < ::Stripe::RequestParams class ShippingRateData < ::Stripe::RequestParams @@ -756,6 +764,17 @@ module Stripe shipping_options: nil, subscription_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/climate/order_create_params.rbi b/rbi/stripe/params/climate/order_create_params.rbi index f50b17fb1..d0ba70a47 100644 --- a/rbi/stripe/params/climate/order_create_params.rbi +++ b/rbi/stripe/params/climate/order_create_params.rbi @@ -44,9 +44,9 @@ module Stripe } def metadata=(_metadata); end # Requested number of tons for the order. Either this or `amount` must be specified. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def metric_tons; end - sig { params(_metric_tons: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_metric_tons: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def metric_tons=(_metric_tons); end # Unique identifier of the Climate product. sig { returns(String) } @@ -54,7 +54,7 @@ module Stripe sig { params(_product: String).returns(String) } def product=(_product); end sig { - params(amount: T.nilable(Integer), beneficiary: T.nilable(::Stripe::Climate::OrderCreateParams::Beneficiary), currency: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), metric_tons: T.nilable(String), product: String).void + params(amount: T.nilable(Integer), beneficiary: T.nilable(::Stripe::Climate::OrderCreateParams::Beneficiary), currency: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), metric_tons: T.nilable(BigDecimal), product: String).void } def initialize( amount: nil, @@ -65,6 +65,9 @@ module Stripe metric_tons: nil, product: nil ); end + def self.field_encodings + @field_encodings = {metric_tons: :decimal_string} + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/credit_note_create_params.rbi b/rbi/stripe/params/credit_note_create_params.rbi index a5990218c..4b613fcf8 100644 --- a/rbi/stripe/params/credit_note_create_params.rbi +++ b/rbi/stripe/params/credit_note_create_params.rbi @@ -71,12 +71,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteCreateParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteCreateParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -89,6 +89,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -238,5 +241,13 @@ module Stripe refunds: nil, shipping_cost: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/credit_note_list_preview_line_items_params.rbi b/rbi/stripe/params/credit_note_list_preview_line_items_params.rbi index 5eb70586b..950152076 100644 --- a/rbi/stripe/params/credit_note_list_preview_line_items_params.rbi +++ b/rbi/stripe/params/credit_note_list_preview_line_items_params.rbi @@ -71,12 +71,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteListPreviewLineItemsParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNoteListPreviewLineItemsParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -89,6 +89,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -258,5 +261,13 @@ module Stripe shipping_cost: nil, starting_after: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/credit_note_preview_lines_list_params.rbi b/rbi/stripe/params/credit_note_preview_lines_list_params.rbi index fba5d41ab..d96d7b081 100644 --- a/rbi/stripe/params/credit_note_preview_lines_list_params.rbi +++ b/rbi/stripe/params/credit_note_preview_lines_list_params.rbi @@ -71,12 +71,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewLinesListParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewLinesListParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -89,6 +89,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -258,5 +261,13 @@ module Stripe shipping_cost: nil, starting_after: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/credit_note_preview_params.rbi b/rbi/stripe/params/credit_note_preview_params.rbi index c2b9906e8..82b075fcf 100644 --- a/rbi/stripe/params/credit_note_preview_params.rbi +++ b/rbi/stripe/params/credit_note_preview_params.rbi @@ -71,12 +71,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), invoice_line_item: T.nilable(String), quantity: T.nilable(Integer), tax_amounts: T.nilable(T.any(String, T::Array[::Stripe::CreditNotePreviewParams::Line::TaxAmount])), tax_rates: T.nilable(T.any(String, T::Array[String])), type: String, unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -89,6 +89,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Refund < ::Stripe::RequestParams class PaymentRecordRefund < ::Stripe::RequestParams @@ -238,5 +241,13 @@ module Stripe refunds: nil, shipping_cost: nil ); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/invoice_add_lines_params.rbi b/rbi/stripe/params/invoice_add_lines_params.rbi index 259df631a..304c26bd2 100644 --- a/rbi/stripe/params/invoice_add_lines_params.rbi +++ b/rbi/stripe/params/invoice_add_lines_params.rbi @@ -184,12 +184,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceAddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceAddLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -199,6 +199,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -408,6 +411,11 @@ module Stripe tax_amounts: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -432,5 +440,16 @@ module Stripe params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::InvoiceAddLinesParams::Line]).void } def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/invoice_create_preview_params.rbi b/rbi/stripe/params/invoice_create_preview_params.rbi index d7751bac4..a7bf33446 100644 --- a/rbi/stripe/params/invoice_create_preview_params.rbi +++ b/rbi/stripe/params/invoice_create_preview_params.rbi @@ -472,12 +472,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -486,6 +486,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The integer amount in cents (or local equivalent) of previewed invoice item. sig { returns(T.nilable(Integer)) } @@ -575,12 +578,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Discount])), invoiceitem: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), currency: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Discount])), invoiceitem: T.nilable(String), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::Period), price: T.nilable(String), price_data: T.nilable(::Stripe::InvoiceCreatePreviewParams::InvoiceItem::PriceData), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -600,6 +603,12 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + } + end end class Issuer < ::Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -2044,12 +2053,14 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -2058,6 +2069,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -2122,6 +2136,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -2607,12 +2626,14 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -2622,6 +2643,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -2724,6 +2748,11 @@ module Stripe trial: nil, trial_offer: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -2983,6 +3012,28 @@ module Stripe trial_end: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams class BillUntil < ::Stripe::RequestParams @@ -3142,6 +3193,36 @@ module Stripe prebilling: nil, proration_behavior: nil ); end + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end end class SubscriptionDetails < ::Stripe::RequestParams class BillingMode < ::Stripe::RequestParams @@ -3485,12 +3566,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::InvoiceCreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -3500,6 +3581,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. sig { @@ -3598,6 +3682,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class Prebilling < ::Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. @@ -3721,6 +3810,17 @@ module Stripe start_date: nil, trial_end: nil ); end + def self.field_encodings + @field_encodings = { + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end # Settings for automatic tax lookup for this invoice preview. sig { returns(T.nilable(::Stripe::InvoiceCreatePreviewParams::AutomaticTax)) } @@ -3839,5 +3939,64 @@ module Stripe subscription: nil, subscription_details: nil ); end + def self.field_encodings + @field_encodings = { + invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + }, + }, + }, + schedule_details: { + kind: :object, + fields: { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + }, + }, + subscription_details: { + kind: :object, + fields: { + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/invoice_item_create_params.rbi b/rbi/stripe/params/invoice_item_create_params.rbi index 8ea5414cb..cbe2d9848 100644 --- a/rbi/stripe/params/invoice_item_create_params.rbi +++ b/rbi/stripe/params/invoice_item_create_params.rbi @@ -107,12 +107,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -121,6 +121,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -237,12 +240,12 @@ module Stripe sig { params(_tax_rates: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def tax_rates=(_tax_rates); end # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), currency: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemCreateParams::Discount])), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), margins: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemCreateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemCreateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemCreateParams::Pricing), quantity: T.nilable(Integer), subscription: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), currency: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(String), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemCreateParams::Discount])), expand: T.nilable(T::Array[String]), invoice: T.nilable(String), margins: T.nilable(T::Array[String]), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemCreateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemCreateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemCreateParams::Pricing), quantity: T.nilable(Integer), subscription: T.nilable(String), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -266,5 +269,11 @@ module Stripe tax_rates: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/invoice_item_update_params.rbi b/rbi/stripe/params/invoice_item_update_params.rbi index 20d328e6e..a7ee8cd7d 100644 --- a/rbi/stripe/params/invoice_item_update_params.rbi +++ b/rbi/stripe/params/invoice_item_update_params.rbi @@ -107,12 +107,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -121,6 +121,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -216,12 +219,12 @@ module Stripe } def tax_rates=(_tax_rates); end # The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemUpdateParams::Discount])), expand: T.nilable(T::Array[String]), margins: T.nilable(T.any(String, T::Array[String])), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemUpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemUpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemUpdateParams::Pricing), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount_decimal: T.nilable(String)).void + params(amount: T.nilable(Integer), description: T.nilable(String), discountable: T.nilable(T::Boolean), discounts: T.nilable(T.any(String, T::Array[::Stripe::InvoiceItemUpdateParams::Discount])), expand: T.nilable(T::Array[String]), margins: T.nilable(T.any(String, T::Array[String])), metadata: T.nilable(T.any(String, T::Hash[String, String])), period: T.nilable(::Stripe::InvoiceItemUpdateParams::Period), price_data: T.nilable(::Stripe::InvoiceItemUpdateParams::PriceData), pricing: T.nilable(::Stripe::InvoiceItemUpdateParams::Pricing), quantity: T.nilable(Integer), tax_behavior: T.nilable(String), tax_code: T.nilable(String), tax_rates: T.nilable(T.any(String, T::Array[String])), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( amount: nil, @@ -240,5 +243,11 @@ module Stripe tax_rates: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + unit_amount_decimal: :decimal_string, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/invoice_line_item_update_params.rbi b/rbi/stripe/params/invoice_line_item_update_params.rbi index b4472b16a..1b100e7aa 100644 --- a/rbi/stripe/params/invoice_line_item_update_params.rbi +++ b/rbi/stripe/params/invoice_line_item_update_params.rbi @@ -183,12 +183,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceLineItemUpdateParams::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceLineItemUpdateParams::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -198,6 +198,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -407,5 +410,10 @@ module Stripe tax_amounts: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/invoice_update_lines_params.rbi b/rbi/stripe/params/invoice_update_lines_params.rbi index 9a00eeca8..58e11e2aa 100644 --- a/rbi/stripe/params/invoice_update_lines_params.rbi +++ b/rbi/stripe/params/invoice_update_lines_params.rbi @@ -184,12 +184,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceUpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::InvoiceUpdateLinesParams::Line::PriceData::ProductData), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -199,6 +199,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Pricing < ::Stripe::RequestParams # The ID of the price object. @@ -408,6 +411,11 @@ module Stripe tax_amounts: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -432,5 +440,16 @@ module Stripe params(expand: T.nilable(T::Array[String]), invoice_metadata: T.nilable(T.any(String, T::Hash[String, String])), lines: T::Array[::Stripe::InvoiceUpdateLinesParams::Line]).void } def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + def self.field_encodings + @field_encodings = { + lines: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/issuing/authorization_capture_params.rbi b/rbi/stripe/params/issuing/authorization_capture_params.rbi index 4dded335b..bbe576bc9 100644 --- a/rbi/stripe/params/issuing/authorization_capture_params.rbi +++ b/rbi/stripe/params/issuing/authorization_capture_params.rbi @@ -47,37 +47,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -110,6 +130,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -148,6 +181,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -240,9 +291,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -255,12 +306,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -269,6 +320,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -291,9 +348,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -306,9 +363,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -371,6 +431,34 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: {kind: :array, element: {kind: :object, fields: {quantity: :decimal_string}}}, + } + end end # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } @@ -403,6 +491,42 @@ module Stripe expand: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/issuing/authorization_create_params.rbi b/rbi/stripe/params/issuing/authorization_create_params.rbi index 2d52f94d1..4cab69d8b 100644 --- a/rbi/stripe/params/issuing/authorization_create_params.rbi +++ b/rbi/stripe/params/issuing/authorization_create_params.rbi @@ -60,37 +60,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -123,6 +143,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -161,6 +194,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -169,9 +220,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -184,12 +235,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -198,6 +249,9 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string} + end end class MerchantData < ::Stripe::RequestParams # A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values. @@ -558,6 +612,33 @@ module Stripe verification_data: nil, wallet: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/issuing/authorization_finalize_amount_params.rbi b/rbi/stripe/params/issuing/authorization_finalize_amount_params.rbi index 7f6fcf293..af83bb4f2 100644 --- a/rbi/stripe/params/issuing/authorization_finalize_amount_params.rbi +++ b/rbi/stripe/params/issuing/authorization_finalize_amount_params.rbi @@ -46,37 +46,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -109,6 +129,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -147,6 +180,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -155,9 +206,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -170,12 +221,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -184,6 +235,9 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string} + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -213,6 +267,33 @@ module Stripe params(expand: T.nilable(T::Array[String]), final_amount: Integer, fleet: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fleet), fuel: T.nilable(::Stripe::Issuing::AuthorizationFinalizeAmountParams::Fuel)).void } def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/issuing/transaction_create_force_capture_params.rbi b/rbi/stripe/params/issuing/transaction_create_force_capture_params.rbi index 0efde47a6..99a71115e 100644 --- a/rbi/stripe/params/issuing/transaction_create_force_capture_params.rbi +++ b/rbi/stripe/params/issuing/transaction_create_force_capture_params.rbi @@ -108,37 +108,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -171,6 +191,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -209,6 +242,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -301,9 +352,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -316,12 +367,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -330,6 +381,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -352,9 +409,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -367,9 +424,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -432,6 +492,34 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: {kind: :array, element: {kind: :object, fields: {quantity: :decimal_string}}}, + } + end end # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -482,6 +570,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/issuing/transaction_create_unlinked_refund_params.rbi b/rbi/stripe/params/issuing/transaction_create_unlinked_refund_params.rbi index dfb272e0b..8ecbb9c2f 100644 --- a/rbi/stripe/params/issuing/transaction_create_unlinked_refund_params.rbi +++ b/rbi/stripe/params/issuing/transaction_create_unlinked_refund_params.rbi @@ -108,37 +108,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -171,6 +191,19 @@ module Stripe params(fuel: T.nilable(::Stripe::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -209,6 +242,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -301,9 +352,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -316,12 +367,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -330,6 +381,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -352,9 +409,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -367,9 +424,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -432,6 +492,34 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: {kind: :array, element: {kind: :object, fields: {quantity: :decimal_string}}}, + } + end end # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -482,6 +570,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/order_create_params.rbi b/rbi/stripe/params/order_create_params.rbi index ab577d8a2..74c512c8c 100644 --- a/rbi/stripe/params/order_create_params.rbi +++ b/rbi/stripe/params/order_create_params.rbi @@ -144,12 +144,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -158,6 +158,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class ProductData < ::Stripe::RequestParams class PackageDimensions < ::Stripe::RequestParams @@ -329,6 +332,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class Payment < ::Stripe::RequestParams class Settings < ::Stripe::RequestParams @@ -3179,5 +3187,16 @@ module Stripe shipping_details: nil, tax_details: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/order_update_params.rbi b/rbi/stripe/params/order_update_params.rbi index 147147b5b..a72df897c 100644 --- a/rbi/stripe/params/order_update_params.rbi +++ b/rbi/stripe/params/order_update_params.rbi @@ -144,12 +144,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: T.nilable(String), product: T.nilable(String), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -158,6 +158,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class ProductData < ::Stripe::RequestParams class PackageDimensions < ::Stripe::RequestParams @@ -335,6 +338,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class Payment < ::Stripe::RequestParams class Settings < ::Stripe::RequestParams @@ -3189,5 +3197,16 @@ module Stripe shipping_details: nil, tax_details: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/payment_intent_confirm_params.rbi b/rbi/stripe/params/payment_intent_confirm_params.rbi index 90a5298c2..c6f6e68cb 100644 --- a/rbi/stripe/params/payment_intent_confirm_params.rbi +++ b/rbi/stripe/params/payment_intent_confirm_params.rbi @@ -7804,15 +7804,8 @@ module Stripe def verification_method; end sig { params(_verification_method: T.nilable(String)).returns(T.nilable(String)) } def verification_method=(_verification_method); end - # Preferred transaction settlement speed - sig { returns(T.nilable(T.any(String, String))) } - def preferred_settlement_speed; end - sig { - params(_preferred_settlement_speed: T.nilable(T.any(String, String))).returns(T.nilable(T.any(String, String))) - } - def preferred_settlement_speed=(_preferred_settlement_speed); end sig { - params(financial_connections: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String), preferred_settlement_speed: T.nilable(T.any(String, String))).void + params(financial_connections: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentConfirmParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String)).void } def initialize( financial_connections: nil, @@ -7821,8 +7814,7 @@ module Stripe setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ); end end class WechatPay < ::Stripe::RequestParams diff --git a/rbi/stripe/params/payment_intent_create_params.rbi b/rbi/stripe/params/payment_intent_create_params.rbi index 07a0c157b..e5479f817 100644 --- a/rbi/stripe/params/payment_intent_create_params.rbi +++ b/rbi/stripe/params/payment_intent_create_params.rbi @@ -7806,15 +7806,8 @@ module Stripe def verification_method; end sig { params(_verification_method: T.nilable(String)).returns(T.nilable(String)) } def verification_method=(_verification_method); end - # Preferred transaction settlement speed - sig { returns(T.nilable(T.any(String, String))) } - def preferred_settlement_speed; end - sig { - params(_preferred_settlement_speed: T.nilable(T.any(String, String))).returns(T.nilable(T.any(String, String))) - } - def preferred_settlement_speed=(_preferred_settlement_speed); end sig { - params(financial_connections: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String), preferred_settlement_speed: T.nilable(T.any(String, String))).void + params(financial_connections: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentCreateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String)).void } def initialize( financial_connections: nil, @@ -7823,8 +7816,7 @@ module Stripe setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ); end end class WechatPay < ::Stripe::RequestParams diff --git a/rbi/stripe/params/payment_intent_update_params.rbi b/rbi/stripe/params/payment_intent_update_params.rbi index ef52f62bb..a8ba6d819 100644 --- a/rbi/stripe/params/payment_intent_update_params.rbi +++ b/rbi/stripe/params/payment_intent_update_params.rbi @@ -7775,15 +7775,8 @@ module Stripe def verification_method; end sig { params(_verification_method: T.nilable(String)).returns(T.nilable(String)) } def verification_method=(_verification_method); end - # Preferred transaction settlement speed - sig { returns(T.nilable(T.any(String, String))) } - def preferred_settlement_speed; end - sig { - params(_preferred_settlement_speed: T.nilable(T.any(String, String))).returns(T.nilable(T.any(String, String))) - } - def preferred_settlement_speed=(_preferred_settlement_speed); end sig { - params(financial_connections: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String), preferred_settlement_speed: T.nilable(T.any(String, String))).void + params(financial_connections: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections), mandate_options: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions), networks: T.nilable(::Stripe::PaymentIntentUpdateParams::PaymentMethodOptions::UsBankAccount::Networks), setup_future_usage: T.nilable(T.any(String, String)), target_date: T.nilable(String), transaction_purpose: T.nilable(T.any(String, String)), verification_method: T.nilable(String)).void } def initialize( financial_connections: nil, @@ -7792,8 +7785,7 @@ module Stripe setup_future_usage: nil, target_date: nil, transaction_purpose: nil, - verification_method: nil, - preferred_settlement_speed: nil + verification_method: nil ); end end class WechatPay < ::Stripe::RequestParams diff --git a/rbi/stripe/params/payment_link_create_params.rbi b/rbi/stripe/params/payment_link_create_params.rbi index 73c562f74..5961ea31f 100644 --- a/rbi/stripe/params/payment_link_create_params.rbi +++ b/rbi/stripe/params/payment_link_create_params.rbi @@ -627,12 +627,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: T.nilable(String), product_data: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::ProductData), recurring: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -643,6 +643,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. sig { returns(T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::AdjustableQuantity)) } @@ -672,6 +675,11 @@ module Stripe params(adjustable_quantity: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::AdjustableQuantity), price: T.nilable(String), price_data: T.nilable(::Stripe::PaymentLinkCreateParams::LineItem::PriceData), quantity: Integer).void } def initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: nil); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class NameCollection < ::Stripe::RequestParams class Business < ::Stripe::RequestParams @@ -1240,5 +1248,16 @@ module Stripe tax_id_collection: nil, transfer_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/plan_create_params.rbi b/rbi/stripe/params/plan_create_params.rbi index 8419c2e5e..49c1eaa02 100644 --- a/rbi/stripe/params/plan_create_params.rbi +++ b/rbi/stripe/params/plan_create_params.rbi @@ -86,9 +86,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -96,9 +96,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -106,7 +106,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -115,6 +115,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformUsage < ::Stripe::RequestParams # Divide usage by this number. @@ -141,9 +147,9 @@ module Stripe sig { params(_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def amount=(_amount); end # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def amount_decimal; end - sig { params(_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def amount_decimal=(_amount_decimal); end # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. sig { returns(T.nilable(String)) } @@ -229,7 +235,7 @@ module Stripe sig { params(_usage_type: T.nilable(String)).returns(T.nilable(String)) } def usage_type=(_usage_type); end sig { - params(active: T.nilable(T::Boolean), amount: T.nilable(Integer), amount_decimal: T.nilable(String), billing_scheme: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), id: T.nilable(String), interval: String, interval_count: T.nilable(Integer), metadata: T.nilable(T.any(String, T::Hash[String, String])), meter: T.nilable(String), nickname: T.nilable(String), product: T.nilable(T.any(::Stripe::PlanCreateParams::Product, String)), tiers: T.nilable(T::Array[::Stripe::PlanCreateParams::Tier]), tiers_mode: T.nilable(String), transform_usage: T.nilable(::Stripe::PlanCreateParams::TransformUsage), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void + params(active: T.nilable(T::Boolean), amount: T.nilable(Integer), amount_decimal: T.nilable(BigDecimal), billing_scheme: T.nilable(String), currency: String, expand: T.nilable(T::Array[String]), id: T.nilable(String), interval: String, interval_count: T.nilable(Integer), metadata: T.nilable(T.any(String, T::Hash[String, String])), meter: T.nilable(String), nickname: T.nilable(String), product: T.nilable(T.any(::Stripe::PlanCreateParams::Product, String)), tiers: T.nilable(T::Array[::Stripe::PlanCreateParams::Tier]), tiers_mode: T.nilable(String), transform_usage: T.nilable(::Stripe::PlanCreateParams::TransformUsage), trial_period_days: T.nilable(Integer), usage_type: T.nilable(String)).void } def initialize( active: nil, @@ -251,5 +257,17 @@ module Stripe trial_period_days: nil, usage_type: nil ); end + def self.field_encodings + @field_encodings = { + amount_decimal: :decimal_string, + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/price_create_params.rbi b/rbi/stripe/params/price_create_params.rbi index 39030fbb5..a1a9bf5b1 100644 --- a/rbi/stripe/params/price_create_params.rbi +++ b/rbi/stripe/params/price_create_params.rbi @@ -38,9 +38,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -48,9 +48,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -58,7 +58,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -67,6 +67,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(::Stripe::PriceCreateParams::CurrencyOptions::CustomUnitAmount)) } @@ -93,12 +99,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( custom_unit_amount: nil, @@ -107,6 +113,18 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::RequestParams # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. @@ -253,9 +271,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -263,9 +281,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -273,7 +291,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -282,6 +300,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -402,12 +426,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(active: T.nilable(T::Boolean), billing_scheme: T.nilable(String), currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::PriceCreateParams::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CustomUnitAmount), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(String), product: T.nilable(String), product_data: T.nilable(::Stripe::PriceCreateParams::ProductData), recurring: T.nilable(::Stripe::PriceCreateParams::Recurring), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::Tier]), tiers_mode: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean), transform_quantity: T.nilable(::Stripe::PriceCreateParams::TransformQuantity), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(active: T.nilable(T::Boolean), billing_scheme: T.nilable(String), currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::PriceCreateParams::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::PriceCreateParams::CustomUnitAmount), expand: T.nilable(T::Array[String]), lookup_key: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), nickname: T.nilable(String), product: T.nilable(String), product_data: T.nilable(::Stripe::PriceCreateParams::ProductData), recurring: T.nilable(::Stripe::PriceCreateParams::Recurring), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceCreateParams::Tier]), tiers_mode: T.nilable(String), transfer_lookup_key: T.nilable(T::Boolean), transform_quantity: T.nilable(::Stripe::PriceCreateParams::TransformQuantity), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( active: nil, @@ -430,5 +454,17 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/price_update_params.rbi b/rbi/stripe/params/price_update_params.rbi index 1450c3325..21a03e80b 100644 --- a/rbi/stripe/params/price_update_params.rbi +++ b/rbi/stripe/params/price_update_params.rbi @@ -38,9 +38,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -48,9 +48,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -58,7 +58,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -67,6 +67,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(::Stripe::PriceUpdateParams::CurrencyOptions::CustomUnitAmount)) } @@ -93,12 +99,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(custom_unit_amount: T.nilable(::Stripe::PriceUpdateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceUpdateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(custom_unit_amount: T.nilable(::Stripe::PriceUpdateParams::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::PriceUpdateParams::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( custom_unit_amount: nil, @@ -107,6 +113,18 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class MigrateTo < ::Stripe::RequestParams # The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. diff --git a/rbi/stripe/params/product_create_params.rbi b/rbi/stripe/params/product_create_params.rbi index da1b542f2..d330c0cda 100644 --- a/rbi/stripe/params/product_create_params.rbi +++ b/rbi/stripe/params/product_create_params.rbi @@ -39,9 +39,9 @@ module Stripe sig { params(_flat_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def flat_amount=(_flat_amount); end # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end - sig { params(_flat_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_flat_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def flat_amount_decimal=(_flat_amount_decimal); end # The per unit billing amount for each individual unit for which this tier applies. sig { returns(T.nilable(Integer)) } @@ -49,9 +49,9 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. sig { returns(T.any(String, Integer)) } @@ -59,7 +59,7 @@ module Stripe sig { params(_up_to: T.any(String, Integer)).returns(T.any(String, Integer)) } def up_to=(_up_to); end sig { - params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String), up_to: T.any(String, Integer)).void + params(flat_amount: T.nilable(Integer), flat_amount_decimal: T.nilable(BigDecimal), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal), up_to: T.any(String, Integer)).void } def initialize( flat_amount: nil, @@ -68,6 +68,12 @@ module Stripe unit_amount_decimal: nil, up_to: nil ); end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { @@ -98,12 +104,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount), tax_behavior: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions::Tier]), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( custom_unit_amount: nil, @@ -112,6 +118,21 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + }, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::RequestParams # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. @@ -199,12 +220,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CustomUnitAmount), metadata: T.nilable(T::Hash[String, String]), recurring: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, currency_options: T.nilable(T::Hash[String, ::Stripe::ProductCreateParams::DefaultPriceData::CurrencyOptions]), custom_unit_amount: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::CustomUnitAmount), metadata: T.nilable(T::Hash[String, String]), recurring: T.nilable(::Stripe::ProductCreateParams::DefaultPriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -216,6 +237,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class MarketingFeature < ::Stripe::RequestParams # The marketing feature name. Up to 80 characters long. @@ -384,5 +408,10 @@ module Stripe unit_label: nil, url: nil ); end + def self.field_encodings + @field_encodings = { + default_price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/quote_create_params.rbi b/rbi/stripe/params/quote_create_params.rbi index 4e4fc9b5c..bfb75939d 100644 --- a/rbi/stripe/params/quote_create_params.rbi +++ b/rbi/stripe/params/quote_create_params.rbi @@ -1368,12 +1368,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteCreateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -1383,6 +1383,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The discounts applied to this line item. sig { @@ -1427,6 +1430,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class SubscriptionData < ::Stripe::RequestParams class BillOnAcceptance < ::Stripe::RequestParams @@ -2427,5 +2435,16 @@ module Stripe test_clock: nil, transfer_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/quote_update_params.rbi b/rbi/stripe/params/quote_update_params.rbi index 7f61be54d..457f5c904 100644 --- a/rbi/stripe/params/quote_update_params.rbi +++ b/rbi/stripe/params/quote_update_params.rbi @@ -1365,12 +1365,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: T.nilable(::Stripe::QuoteUpdateParams::LineItem::PriceData::Recurring), tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -1380,6 +1380,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The discounts applied to this line item. sig { @@ -1430,6 +1433,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class SubscriptionData < ::Stripe::RequestParams class BillOnAcceptance < ::Stripe::RequestParams @@ -2381,5 +2389,16 @@ module Stripe subscription_data_overrides: nil, transfer_data: nil ); end + def self.field_encodings + @field_encodings = { + line_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/subscription_create_params.rbi b/rbi/stripe/params/subscription_create_params.rbi index aec04db50..8f42a39b6 100644 --- a/rbi/stripe/params/subscription_create_params.rbi +++ b/rbi/stripe/params/subscription_create_params.rbi @@ -144,12 +144,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -158,6 +158,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -218,6 +221,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -816,12 +824,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionCreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionCreateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -831,6 +839,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -931,6 +942,11 @@ module Stripe tax_rates: nil, trial: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PaymentSettings < ::Stripe::RequestParams class PaymentMethodOptions < ::Stripe::RequestParams @@ -1753,5 +1769,23 @@ module Stripe trial_period_days: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/subscription_item_create_params.rbi b/rbi/stripe/params/subscription_item_create_params.rbi index 1e77ef2bf..9a0a5250d 100644 --- a/rbi/stripe/params/subscription_item_create_params.rbi +++ b/rbi/stripe/params/subscription_item_create_params.rbi @@ -221,12 +221,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemCreateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemCreateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -236,6 +236,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -370,5 +373,10 @@ module Stripe tax_rates: nil, trial: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/subscription_item_update_params.rbi b/rbi/stripe/params/subscription_item_update_params.rbi index 8d9ef877e..2d81a6a57 100644 --- a/rbi/stripe/params/subscription_item_update_params.rbi +++ b/rbi/stripe/params/subscription_item_update_params.rbi @@ -221,12 +221,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemUpdateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemUpdateParams::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -236,6 +236,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. sig { @@ -348,5 +351,10 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/subscription_schedule_create_params.rbi b/rbi/stripe/params/subscription_schedule_create_params.rbi index f5cc77cd2..fb36b3d30 100644 --- a/rbi/stripe/params/subscription_schedule_create_params.rbi +++ b/rbi/stripe/params/subscription_schedule_create_params.rbi @@ -452,12 +452,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -466,6 +466,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -530,6 +533,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -1015,12 +1023,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleCreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleCreateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -1030,6 +1038,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -1130,6 +1141,11 @@ module Stripe trial: nil, trial_offer: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -1363,6 +1379,24 @@ module Stripe trial_end: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. @@ -1477,5 +1511,35 @@ module Stripe prebilling: nil, start_date: nil ); end + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/subscription_schedule_update_params.rbi b/rbi/stripe/params/subscription_schedule_update_params.rbi index 3886abce4..0caccbe1e 100644 --- a/rbi/stripe/params/subscription_schedule_update_params.rbi +++ b/rbi/stripe/params/subscription_schedule_update_params.rbi @@ -427,12 +427,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -441,6 +441,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -505,6 +508,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -990,12 +998,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleUpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleUpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -1005,6 +1013,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class Trial < ::Stripe::RequestParams # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. @@ -1105,6 +1116,11 @@ module Stripe trial: nil, trial_offer: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -1350,6 +1366,24 @@ module Stripe trial_end: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end class Prebilling < ::Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. @@ -1436,5 +1470,35 @@ module Stripe prebilling: nil, proration_behavior: nil ); end + def self.field_encodings + @field_encodings = { + phases: { + kind: :array, + element: { + kind: :object, + fields: { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/subscription_update_params.rbi b/rbi/stripe/params/subscription_update_params.rbi index ab28252eb..9b7fd7189 100644 --- a/rbi/stripe/params/subscription_update_params.rbi +++ b/rbi/stripe/params/subscription_update_params.rbi @@ -144,12 +144,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -158,6 +158,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # The coupons to redeem into discounts for the item. sig { @@ -218,6 +221,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class AutomaticTax < ::Stripe::RequestParams class Liability < ::Stripe::RequestParams @@ -774,12 +782,12 @@ module Stripe sig { params(_unit_amount: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_amount=(_unit_amount); end # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end - sig { params(_unit_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_amount_decimal=(_unit_amount_decimal); end sig { - params(currency: String, product: String, recurring: ::Stripe::SubscriptionUpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(String)).void + params(currency: String, product: String, recurring: ::Stripe::SubscriptionUpdateParams::Item::PriceData::Recurring, tax_behavior: T.nilable(String), unit_amount: T.nilable(Integer), unit_amount_decimal: T.nilable(BigDecimal)).void } def initialize( currency: nil, @@ -789,6 +797,9 @@ module Stripe unit_amount: nil, unit_amount_decimal: nil ); end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. sig { @@ -883,6 +894,11 @@ module Stripe quantity: nil, tax_rates: nil ); end + def self.field_encodings + @field_encodings = { + price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}, + } + end end class PauseCollection < ::Stripe::RequestParams # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. @@ -1693,5 +1709,23 @@ module Stripe trial_from_plan: nil, trial_settings: nil ); end + def self.field_encodings + @field_encodings = { + add_invoice_items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + items: { + kind: :array, + element: { + kind: :object, + fields: {price_data: {kind: :object, fields: {unit_amount_decimal: :decimal_string}}}, + }, + }, + } + end end end \ No newline at end of file diff --git a/rbi/stripe/params/test_helpers/issuing/authorization_capture_params.rbi b/rbi/stripe/params/test_helpers/issuing/authorization_capture_params.rbi index 0102f1bda..d39b7f55b 100644 --- a/rbi/stripe/params/test_helpers/issuing/authorization_capture_params.rbi +++ b/rbi/stripe/params/test_helpers/issuing/authorization_capture_params.rbi @@ -48,39 +48,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end sig { - params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -113,6 +131,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -151,6 +182,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -245,9 +294,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -260,12 +309,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -274,6 +323,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -296,9 +351,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -311,9 +366,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -376,6 +434,37 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + } + end end # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } @@ -410,6 +499,42 @@ module Stripe expand: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/test_helpers/issuing/authorization_create_params.rbi b/rbi/stripe/params/test_helpers/issuing/authorization_create_params.rbi index 634049ee4..0a29445b6 100644 --- a/rbi/stripe/params/test_helpers/issuing/authorization_create_params.rbi +++ b/rbi/stripe/params/test_helpers/issuing/authorization_create_params.rbi @@ -61,37 +61,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -124,6 +144,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationCreateParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -162,6 +195,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -170,9 +221,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -185,12 +236,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -199,6 +250,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class MerchantData < ::Stripe::RequestParams # A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values. @@ -573,6 +630,33 @@ module Stripe verification_data: nil, wallet: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end diff --git a/rbi/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rbi b/rbi/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rbi index 907776e86..06d5288c8 100644 --- a/rbi/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rbi +++ b/rbi/stripe/params/test_helpers/issuing/authorization_finalize_amount_params.rbi @@ -47,37 +47,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end - sig { params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -110,6 +130,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -148,6 +181,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Fuel < ::Stripe::RequestParams # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. @@ -156,9 +207,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -171,12 +222,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -185,6 +236,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } @@ -218,6 +275,33 @@ module Stripe params(expand: T.nilable(T::Array[String]), final_amount: Integer, fleet: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fleet), fuel: T.nilable(::Stripe::TestHelpers::Issuing::AuthorizationFinalizeAmountParams::Fuel)).void } def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end end end diff --git a/rbi/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rbi b/rbi/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rbi index 7d26a1e41..6bdc3b06c 100644 --- a/rbi/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rbi +++ b/rbi/stripe/params/test_helpers/issuing/transaction_create_force_capture_params.rbi @@ -109,39 +109,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end sig { - params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -174,6 +192,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -212,6 +243,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -306,9 +355,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -321,12 +370,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -335,6 +384,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -357,9 +412,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -372,9 +427,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -437,6 +495,37 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + } + end end # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -487,6 +576,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rbi b/rbi/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rbi index 3cc8a9c82..bf2421645 100644 --- a/rbi/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rbi +++ b/rbi/stripe/params/test_helpers/issuing/transaction_create_unlinked_refund_params.rbi @@ -109,39 +109,57 @@ module Stripe class ReportedBreakdown < ::Stripe::RequestParams class Fuel < ::Stripe::RequestParams # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::RequestParams # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end - sig { params(_gross_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_gross_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def gross_amount_decimal=(_gross_amount_decimal); end - sig { params(gross_amount_decimal: T.nilable(String)).void } + sig { params(gross_amount_decimal: T.nilable(BigDecimal)).void } def initialize(gross_amount_decimal: nil); end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::RequestParams # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end - sig { params(_local_amount_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_local_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def local_amount_decimal=(_local_amount_decimal); end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end sig { - params(_national_amount_decimal: T.nilable(String)).returns(T.nilable(String)) + params(_national_amount_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def national_amount_decimal=(_national_amount_decimal); end sig { - params(local_amount_decimal: T.nilable(String), national_amount_decimal: T.nilable(String)).void + params(local_amount_decimal: T.nilable(BigDecimal), national_amount_decimal: T.nilable(BigDecimal)).void } def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { @@ -174,6 +192,19 @@ module Stripe params(fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel), non_fuel: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel), tax: T.nilable(::Stripe::TestHelpers::Issuing::TransactionCreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax)).void } def initialize(fuel: nil, non_fuel: nil, tax: nil); end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { @@ -212,6 +243,24 @@ module Stripe reported_breakdown: nil, service_type: nil ); end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::RequestParams class Segment < ::Stripe::RequestParams @@ -306,9 +355,9 @@ module Stripe sig { params(_industry_product_code: T.nilable(String)).returns(T.nilable(String)) } def industry_product_code=(_industry_product_code); end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end - sig { params(_quantity_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity_decimal=(_quantity_decimal); end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(T.nilable(String)) } @@ -321,12 +370,12 @@ module Stripe sig { params(_unit: T.nilable(String)).returns(T.nilable(String)) } def unit=(_unit); end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end - sig { params(_unit_cost_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_unit_cost_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def unit_cost_decimal=(_unit_cost_decimal); end sig { - params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(String), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(String)).void + params(industry_product_code: T.nilable(String), quantity_decimal: T.nilable(BigDecimal), type: T.nilable(String), unit: T.nilable(String), unit_cost_decimal: T.nilable(BigDecimal)).void } def initialize( industry_product_code: nil, @@ -335,6 +384,12 @@ module Stripe unit: nil, unit_cost_decimal: nil ); end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::RequestParams # The time of checking into the lodging. @@ -357,9 +412,9 @@ module Stripe sig { params(_description: T.nilable(String)).returns(T.nilable(String)) } def description=(_description); end # Attribute for param field quantity - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity; end - sig { params(_quantity: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_quantity: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def quantity=(_quantity); end # Attribute for param field total sig { returns(T.nilable(Integer)) } @@ -372,9 +427,12 @@ module Stripe sig { params(_unit_cost: T.nilable(Integer)).returns(T.nilable(Integer)) } def unit_cost=(_unit_cost); end sig { - params(description: T.nilable(String), quantity: T.nilable(String), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void + params(description: T.nilable(String), quantity: T.nilable(BigDecimal), total: T.nilable(Integer), unit_cost: T.nilable(Integer)).void } def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + def self.field_encodings + @field_encodings = {quantity: :decimal_string} + end end # Fleet-specific information for transactions using Fleet cards. sig { @@ -437,6 +495,37 @@ module Stripe receipt: nil, reference: nil ); end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + } + end end # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). sig { returns(Integer) } @@ -487,6 +576,42 @@ module Stripe merchant_data: nil, purchase_details: nil ); end + def self.field_encodings + @field_encodings = { + purchase_details: { + kind: :object, + fields: { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + receipt: { + kind: :array, + element: {kind: :object, fields: {quantity: :decimal_string}}, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/collection_setting_create_params.rbi b/rbi/stripe/params/v2/billing/collection_setting_create_params.rbi index 822f86d2f..a141fede2 100644 --- a/rbi/stripe/params/v2/billing/collection_setting_create_params.rbi +++ b/rbi/stripe/params/v2/billing/collection_setting_create_params.rbi @@ -95,6 +95,9 @@ module Stripe params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void } def initialize(amount: nil, amount_type: nil, description: nil); end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { @@ -122,6 +125,9 @@ module Stripe params(mandate_options: T.nilable(::Stripe::V2::Billing::CollectionSettingCreateParams::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void } def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::RequestParams class BankTransfer < ::Stripe::RequestParams @@ -303,6 +309,14 @@ module Stripe sepa_debit: nil, us_bank_account: nil ); end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -358,6 +372,19 @@ module Stripe payment_method_configuration: nil, payment_method_options: nil ); end + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/collection_setting_update_params.rbi b/rbi/stripe/params/v2/billing/collection_setting_update_params.rbi index 8bd15b8fa..594b196ef 100644 --- a/rbi/stripe/params/v2/billing/collection_setting_update_params.rbi +++ b/rbi/stripe/params/v2/billing/collection_setting_update_params.rbi @@ -95,6 +95,9 @@ module Stripe params(amount: T.nilable(Integer), amount_type: T.nilable(String), description: T.nilable(String)).void } def initialize(amount: nil, amount_type: nil, description: nil); end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { @@ -122,6 +125,9 @@ module Stripe params(mandate_options: T.nilable(::Stripe::V2::Billing::CollectionSettingUpdateParams::PaymentMethodOptions::Card::MandateOptions), network: T.nilable(String), request_three_d_secure: T.nilable(String)).void } def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::RequestParams class BankTransfer < ::Stripe::RequestParams @@ -303,6 +309,14 @@ module Stripe sepa_debit: nil, us_bank_account: nil ); end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -366,6 +380,19 @@ module Stripe payment_method_configuration: nil, payment_method_options: nil ); end + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/intent_create_params.rbi b/rbi/stripe/params/v2/billing/intent_create_params.rbi index 3dee3c847..bc0354ccf 100644 --- a/rbi/stripe/params/v2/billing/intent_create_params.rbi +++ b/rbi/stripe/params/v2/billing/intent_create_params.rbi @@ -8,14 +8,40 @@ module Stripe class IntentCreateParams < ::Stripe::RequestParams class Action < ::Stripe::RequestParams class Apply < ::Stripe::RequestParams + class Discount < ::Stripe::RequestParams + # The ID of the Coupon to apply. + sig { returns(T.nilable(String)) } + def coupon; end + sig { params(_coupon: T.nilable(String)).returns(T.nilable(String)) } + def coupon=(_coupon); end + # The ID of the PromotionCode to apply. + sig { returns(T.nilable(String)) } + def promotion_code; end + sig { params(_promotion_code: T.nilable(String)).returns(T.nilable(String)) } + def promotion_code=(_promotion_code); end + # Type of the discount. + sig { returns(String) } + def type; end + sig { params(_type: String).returns(String) } + def type=(_type); end + sig { + params(coupon: T.nilable(String), promotion_code: T.nilable(String), type: String).void + } + def initialize(coupon: nil, promotion_code: nil, type: nil); end + end class EffectiveAt < ::Stripe::RequestParams + # The timestamp at which the apply action will take effect. Only present if type is timestamp. Only allowed for discount actions. + sig { returns(T.nilable(String)) } + def timestamp; end + sig { params(_timestamp: T.nilable(String)).returns(T.nilable(String)) } + def timestamp=(_timestamp); end # When the apply action will take effect. sig { returns(String) } def type; end sig { params(_type: String).returns(String) } def type=(_type); end - sig { params(type: String).void } - def initialize(type: nil); end + sig { params(timestamp: T.nilable(String), type: String).void } + def initialize(timestamp: nil, type: nil); end end class InvoiceDiscountRule < ::Stripe::RequestParams class PercentOff < ::Stripe::RequestParams @@ -38,14 +64,17 @@ module Stripe } def maximum_applications=(_maximum_applications); end # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - sig { returns(String) } + sig { returns(BigDecimal) } def percent_off; end - sig { params(_percent_off: String).returns(String) } + sig { params(_percent_off: BigDecimal).returns(BigDecimal) } def percent_off=(_percent_off); end sig { - params(maximum_applications: ::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff::MaximumApplications, percent_off: String).void + params(maximum_applications: ::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff::MaximumApplications, percent_off: BigDecimal).void } def initialize(maximum_applications: nil, percent_off: nil); end + def self.field_encodings + @field_encodings = {percent_off: :decimal_string} + end end # The entity that the discount rule applies to, for example, the cadence. sig { returns(String) } @@ -70,6 +99,11 @@ module Stripe params(applies_to: String, type: String, percent_off: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule::PercentOff)).void } def initialize(applies_to: nil, type: nil, percent_off: nil); end + def self.field_encodings + @field_encodings = { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + } + end end class SpendModifierRule < ::Stripe::RequestParams class MaxBillingPeriodSpend < ::Stripe::RequestParams @@ -120,7 +154,7 @@ module Stripe params(_amount: ::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule::MaxBillingPeriodSpend::Amount).returns(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule::MaxBillingPeriodSpend::Amount) } def amount=(_amount); end - # The configration for the overage rate for the custom pricing unit. + # The configuration for the overage rate for the custom pricing unit. sig { returns(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule::MaxBillingPeriodSpend::CustomPricingUnitOverageRate) } @@ -158,7 +192,7 @@ module Stripe } def initialize(applies_to: nil, type: nil, max_billing_period_spend: nil); end end - # When the apply action will take effect. Defaults to on_reserve if not specified. + # When the apply action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::EffectiveAt)) } @@ -172,6 +206,15 @@ module Stripe def type; end sig { params(_type: String).returns(String) } def type=(_type); end + # Details for applying a discount. + sig { + returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount)) + } + def discount; end + sig { + params(_discount: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount)).returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount)) + } + def discount=(_discount); end # Details for applying a discount rule to future invoices. sig { returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule)) @@ -191,14 +234,23 @@ module Stripe } def spend_modifier_rule=(_spend_modifier_rule); end sig { - params(effective_at: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::EffectiveAt), type: String, invoice_discount_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule), spend_modifier_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule)).void + params(effective_at: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::EffectiveAt), type: String, discount: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::Discount), invoice_discount_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::InvoiceDiscountRule), spend_modifier_rule: T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Apply::SpendModifierRule)).void } def initialize( effective_at: nil, type: nil, + discount: nil, invoice_discount_rule: nil, spend_modifier_rule: nil ); end + def self.field_encodings + @field_encodings = { + invoice_discount_rule: { + kind: :object, + fields: {percent_off: {kind: :object, fields: {percent_off: :decimal_string}}}, + }, + } + end end class Deactivate < ::Stripe::RequestParams class CancellationDetails < ::Stripe::RequestParams @@ -528,7 +580,7 @@ module Stripe sig { params(type: String).void } def initialize(type: nil); end end - # When the remove action will take effect. Defaults to on_reserve if not specified. + # When the remove action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(::Stripe::V2::Billing::IntentCreateParams::Action::Remove::EffectiveAt)) } @@ -705,7 +757,7 @@ module Stripe def price; end sig { params(_price: String).returns(String) } def price=(_price); end - # Quantity for this item. If not provided, will default to 1. + # Quantity for this item. If not provided, defaults to 1. sig { returns(T.nilable(Integer)) } def quantity; end sig { params(_quantity: T.nilable(Integer)).returns(T.nilable(Integer)) } @@ -841,6 +893,19 @@ module Stripe remove: nil, subscribe: nil ); end + def self.field_encodings + @field_encodings = { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: {percent_off: {kind: :object, fields: {percent_off: :decimal_string}}}, + }, + }, + }, + } + end end class CadenceData < ::Stripe::RequestParams class BillingCycle < ::Stripe::RequestParams @@ -1236,6 +1301,11 @@ module Stripe def currency; end sig { params(_currency: String).returns(String) } def currency=(_currency); end + # Select additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end # ID of an existing Cadence to use. sig { returns(T.nilable(String)) } def cadence; end @@ -1249,9 +1319,38 @@ module Stripe } def cadence_data=(_cadence_data); end sig { - params(actions: T::Array[::Stripe::V2::Billing::IntentCreateParams::Action], currency: String, cadence: T.nilable(String), cadence_data: T.nilable(::Stripe::V2::Billing::IntentCreateParams::CadenceData)).void + params(actions: T::Array[::Stripe::V2::Billing::IntentCreateParams::Action], currency: String, include: T.nilable(T::Array[String]), cadence: T.nilable(String), cadence_data: T.nilable(::Stripe::V2::Billing::IntentCreateParams::CadenceData)).void } - def initialize(actions: nil, currency: nil, cadence: nil, cadence_data: nil); end + def initialize( + actions: nil, + currency: nil, + include: nil, + cadence: nil, + cadence_data: nil + ); end + def self.field_encodings + @field_encodings = { + actions: { + kind: :array, + element: { + kind: :object, + fields: { + apply: { + kind: :object, + fields: { + invoice_discount_rule: { + kind: :object, + fields: { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + }, + }, + }, + }, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/intent_reserve_params.rbi b/rbi/stripe/params/v2/billing/intent_reserve_params.rbi index 60095588f..fb09b3ce6 100644 --- a/rbi/stripe/params/v2/billing/intent_reserve_params.rbi +++ b/rbi/stripe/params/v2/billing/intent_reserve_params.rbi @@ -5,7 +5,15 @@ module Stripe module V2 module Billing - class IntentReserveParams < ::Stripe::RequestParams; end + class IntentReserveParams < ::Stripe::RequestParams + # Select additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/v2/billing/license_fee_create_params.rbi b/rbi/stripe/params/v2/billing/license_fee_create_params.rbi index 3f93e268b..ee24dcd51 100644 --- a/rbi/stripe/params/v2/billing/license_fee_create_params.rbi +++ b/rbi/stripe/params/v2/billing/license_fee_create_params.rbi @@ -20,9 +20,9 @@ module Stripe def unit_amount=(_unit_amount); end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end - sig { params(_up_to_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def up_to_decimal=(_up_to_decimal); end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -30,7 +30,7 @@ module Stripe sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } def up_to_inf=(_up_to_inf); end sig { - params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(String), up_to_inf: T.nilable(String)).void + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void } def initialize( flat_amount: nil, @@ -38,6 +38,9 @@ module Stripe up_to_decimal: nil, up_to_inf: nil ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -52,6 +55,9 @@ module Stripe def round=(_round); end sig { params(divide_by: Integer, round: String).void } def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Three-letter ISO currency code, in lowercase. Must be a supported currency. sig { returns(String) } @@ -145,6 +151,15 @@ module Stripe transform_quantity: nil, unit_amount: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/license_fee_update_params.rbi b/rbi/stripe/params/v2/billing/license_fee_update_params.rbi index fc533d869..dfd7350c2 100644 --- a/rbi/stripe/params/v2/billing/license_fee_update_params.rbi +++ b/rbi/stripe/params/v2/billing/license_fee_update_params.rbi @@ -20,9 +20,9 @@ module Stripe def unit_amount=(_unit_amount); end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end - sig { params(_up_to_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def up_to_decimal=(_up_to_decimal); end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -30,7 +30,7 @@ module Stripe sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } def up_to_inf=(_up_to_inf); end sig { - params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(String), up_to_inf: T.nilable(String)).void + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void } def initialize( flat_amount: nil, @@ -38,6 +38,9 @@ module Stripe up_to_decimal: nil, up_to_inf: nil ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -52,6 +55,9 @@ module Stripe def round=(_round); end sig { params(divide_by: Integer, round: String).void } def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # A customer-facing name for the License Fee. # This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. @@ -118,6 +124,15 @@ module Stripe transform_quantity: nil, unit_amount: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/licensed_item_create_params.rbi b/rbi/stripe/params/v2/billing/licensed_item_create_params.rbi index 658768f63..b7229e4a0 100644 --- a/rbi/stripe/params/v2/billing/licensed_item_create_params.rbi +++ b/rbi/stripe/params/v2/billing/licensed_item_create_params.rbi @@ -21,8 +21,8 @@ module Stripe def display_name; end sig { params(_display_name: String).returns(String) } def display_name=(_display_name); end - # An internal key you can use to search for a particular billable item. - # Must be unique among billable items. + # An internal key you can use to search for a particular licensed item. + # Must be unique among licensed items. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end diff --git a/rbi/stripe/params/v2/billing/licensed_item_update_params.rbi b/rbi/stripe/params/v2/billing/licensed_item_update_params.rbi index ccdaeb6ae..57947955d 100644 --- a/rbi/stripe/params/v2/billing/licensed_item_update_params.rbi +++ b/rbi/stripe/params/v2/billing/licensed_item_update_params.rbi @@ -21,7 +21,7 @@ module Stripe def display_name; end sig { params(_display_name: T.nilable(String)).returns(T.nilable(String)) } def display_name=(_display_name); end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular licensed item. # Maximum length of 200 characters. # To remove the lookup_key from the object, set it to null in the request. sig { returns(T.nilable(String)) } diff --git a/rbi/stripe/params/v2/billing/metered_item_create_params.rbi b/rbi/stripe/params/v2/billing/metered_item_create_params.rbi index 359facda7..24c66ef32 100644 --- a/rbi/stripe/params/v2/billing/metered_item_create_params.rbi +++ b/rbi/stripe/params/v2/billing/metered_item_create_params.rbi @@ -42,8 +42,8 @@ module Stripe params(_invoice_presentation_dimensions: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def invoice_presentation_dimensions=(_invoice_presentation_dimensions); end - # An internal key you can use to search for a particular billable item. - # Must be unique among billable items. + # An internal key you can use to search for a particular metered item. + # Must be unique among metered items. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end diff --git a/rbi/stripe/params/v2/billing/metered_item_update_params.rbi b/rbi/stripe/params/v2/billing/metered_item_update_params.rbi index 5d17cc123..509c2a6d6 100644 --- a/rbi/stripe/params/v2/billing/metered_item_update_params.rbi +++ b/rbi/stripe/params/v2/billing/metered_item_update_params.rbi @@ -21,7 +21,7 @@ module Stripe def display_name; end sig { params(_display_name: T.nilable(String)).returns(T.nilable(String)) } def display_name=(_display_name); end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular metered item. # Maximum length of 200 characters. # To remove the lookup_key from the object, set it to null in the request. sig { returns(T.nilable(String)) } diff --git a/rbi/stripe/params/v2/billing/one_time_item_create_params.rbi b/rbi/stripe/params/v2/billing/one_time_item_create_params.rbi index 88c062ad2..7febd13f9 100644 --- a/rbi/stripe/params/v2/billing/one_time_item_create_params.rbi +++ b/rbi/stripe/params/v2/billing/one_time_item_create_params.rbi @@ -22,7 +22,7 @@ module Stripe sig { params(_display_name: String).returns(String) } def display_name=(_display_name); end # An internal key you can use to search for a particular one-time item. - # Must be unique among billable items. + # Must be unique among one-time items. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end diff --git a/rbi/stripe/params/v2/billing/pricing_plan_subscription_list_params.rbi b/rbi/stripe/params/v2/billing/pricing_plan_subscription_list_params.rbi index 6d9c1be02..c36dde6d9 100644 --- a/rbi/stripe/params/v2/billing/pricing_plan_subscription_list_params.rbi +++ b/rbi/stripe/params/v2/billing/pricing_plan_subscription_list_params.rbi @@ -25,6 +25,11 @@ module Stripe def billing_cadence; end sig { params(_billing_cadence: T.nilable(String)).returns(T.nilable(String)) } def billing_cadence=(_billing_cadence); end + # Expand to include additional data such as discount_details, billing_cadence_details, or pricing_plan_component_details. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end # Optionally set the maximum number of results per page. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit; end @@ -37,12 +42,12 @@ module Stripe params(_payer: T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer)).returns(T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer)) } def payer=(_payer); end - # Filter by PricingPlan ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan_version`. + # Filter by PricingPlan ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan_version`. sig { returns(T.nilable(String)) } def pricing_plan; end sig { params(_pricing_plan: T.nilable(String)).returns(T.nilable(String)) } def pricing_plan=(_pricing_plan); end - # Filter by Pricing Plan Version ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan`. + # Filter by Pricing Plan Version ID. Mutually exclusive with `billing_cadence`, `payer`, and `pricing_plan`. sig { returns(T.nilable(String)) } def pricing_plan_version; end sig { params(_pricing_plan_version: T.nilable(String)).returns(T.nilable(String)) } @@ -53,10 +58,11 @@ module Stripe sig { params(_servicing_status: T.nilable(String)).returns(T.nilable(String)) } def servicing_status=(_servicing_status); end sig { - params(billing_cadence: T.nilable(String), limit: T.nilable(Integer), payer: T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer), pricing_plan: T.nilable(String), pricing_plan_version: T.nilable(String), servicing_status: T.nilable(String)).void + params(billing_cadence: T.nilable(String), include: T.nilable(T::Array[String]), limit: T.nilable(Integer), payer: T.nilable(::Stripe::V2::Billing::PricingPlanSubscriptionListParams::Payer), pricing_plan: T.nilable(String), pricing_plan_version: T.nilable(String), servicing_status: T.nilable(String)).void } def initialize( billing_cadence: nil, + include: nil, limit: nil, payer: nil, pricing_plan: nil, diff --git a/rbi/stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params.rbi b/rbi/stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params.rbi new file mode 100644 index 000000000..ba89000c0 --- /dev/null +++ b/rbi/stripe/params/v2/billing/pricing_plan_subscription_remove_discounts_params.rbi @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Billing + class PricingPlanSubscriptionRemoveDiscountsParams < ::Stripe::RequestParams + # Expand to include additional data such as discount_details. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rbi b/rbi/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rbi index cabf60d6a..14cf6ac2a 100644 --- a/rbi/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rbi +++ b/rbi/stripe/params/v2/billing/pricing_plan_subscription_retrieve_params.rbi @@ -5,7 +5,15 @@ module Stripe module V2 module Billing - class PricingPlanSubscriptionRetrieveParams < ::Stripe::RequestParams; end + class PricingPlanSubscriptionRetrieveParams < ::Stripe::RequestParams + # Expand to include additional data such as discount_details. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rbi b/rbi/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rbi deleted file mode 100644 index ca9a3827e..000000000 --- a/rbi/stripe/params/v2/billing/pricing_plan_subscriptions/component_retrieve_params.rbi +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -# typed: true -module Stripe - module V2 - module Billing - module PricingPlanSubscriptions - class ComponentRetrieveParams < ::Stripe::RequestParams; end - end - end - end -end \ No newline at end of file diff --git a/rbi/stripe/params/v2/billing/pricing_plans/component_create_params.rbi b/rbi/stripe/params/v2/billing/pricing_plans/component_create_params.rbi index 5459f0996..706971082 100644 --- a/rbi/stripe/params/v2/billing/pricing_plans/component_create_params.rbi +++ b/rbi/stripe/params/v2/billing/pricing_plans/component_create_params.rbi @@ -13,7 +13,7 @@ module Stripe def id; end sig { params(_id: String).returns(String) } def id=(_id); end - # The version of the LicenseFee. Defaults to 'latest', if not specified. + # The ID of the License Fee Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end sig { params(_version: T.nilable(String)).returns(T.nilable(String)) } @@ -27,7 +27,7 @@ module Stripe def id; end sig { params(_id: String).returns(String) } def id=(_id); end - # The version of the RateCard. Defaults to 'latest', if not specified. + # The ID of the Rate Card Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end sig { params(_version: T.nilable(String)).returns(T.nilable(String)) } diff --git a/rbi/stripe/params/v2/billing/rate_card_modify_rates_params.rbi b/rbi/stripe/params/v2/billing/rate_card_modify_rates_params.rbi new file mode 100644 index 000000000..8fc31aacc --- /dev/null +++ b/rbi/stripe/params/v2/billing/rate_card_modify_rates_params.rbi @@ -0,0 +1,245 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Billing + class RateCardModifyRatesParams < ::Stripe::RequestParams + class RatesToCreate < ::Stripe::RequestParams + class MeteredItemData < ::Stripe::RequestParams + class MeterSegmentCondition < ::Stripe::RequestParams + # A Meter dimension. + sig { returns(String) } + def dimension; end + sig { params(_dimension: String).returns(String) } + def dimension=(_dimension); end + # To count usage towards this metered item, the dimension must have this value. + sig { returns(String) } + def value; end + sig { params(_value: String).returns(String) } + def value=(_value); end + sig { params(dimension: String, value: String).void } + def initialize(dimension: nil, value: nil); end + end + # Description that customers will see in the invoice line item. + # Maximum length of 250 characters. + sig { returns(String) } + def display_name; end + sig { params(_display_name: String).returns(String) } + def display_name=(_display_name); end + # An internal key you can use to search for a particular metered item. + # Must be unique among metered items. + # Maximum length of 200 characters. + sig { returns(T.nilable(String)) } + def lookup_key; end + sig { params(_lookup_key: T.nilable(String)).returns(T.nilable(String)) } + def lookup_key=(_lookup_key); end + # ID of the Meter that measures usage for this Metered Item. + sig { returns(String) } + def meter; end + sig { params(_meter: String).returns(String) } + def meter=(_meter); end + # Optional array of Meter segments to filter event dimension keys for billing. + sig { + returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition]) + } + def meter_segment_conditions; end + sig { + params(_meter_segment_conditions: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition]).returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition]) + } + def meter_segment_conditions=(_meter_segment_conditions); end + # The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + # to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 + # million events". + # Maximum length of 100 characters. + sig { returns(T.nilable(String)) } + def unit_label; end + sig { params(_unit_label: T.nilable(String)).returns(T.nilable(String)) } + def unit_label=(_unit_label); end + sig { + params(display_name: String, lookup_key: T.nilable(String), meter: String, meter_segment_conditions: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData::MeterSegmentCondition], unit_label: T.nilable(String)).void + } + def initialize( + display_name: nil, + lookup_key: nil, + meter: nil, + meter_segment_conditions: nil, + unit_label: nil + ); end + end + class Tier < ::Stripe::RequestParams + # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + sig { returns(T.nilable(String)) } + def flat_amount; end + sig { params(_flat_amount: T.nilable(String)).returns(T.nilable(String)) } + def flat_amount=(_flat_amount); end + # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + # most 12 decimal places. + sig { returns(T.nilable(String)) } + def unit_amount; end + sig { params(_unit_amount: T.nilable(String)).returns(T.nilable(String)) } + def unit_amount=(_unit_amount); end + # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + # be set. + sig { returns(T.nilable(BigDecimal)) } + def up_to_decimal; end + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } + def up_to_decimal=(_up_to_decimal); end + # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + sig { returns(T.nilable(String)) } + def up_to_inf; end + sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } + def up_to_inf=(_up_to_inf); end + sig { + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void + } + def initialize( + flat_amount: nil, + unit_amount: nil, + up_to_decimal: nil, + up_to_inf: nil + ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end + end + class TransformQuantity < ::Stripe::RequestParams + # Divide usage by this number. + sig { returns(Integer) } + def divide_by; end + sig { params(_divide_by: Integer).returns(Integer) } + def divide_by=(_divide_by); end + # After division, round the result up or down. + sig { returns(String) } + def round; end + sig { params(_round: String).returns(String) } + def round=(_round); end + sig { params(divide_by: Integer, round: String).void } + def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end + end + # Set of [key-value pairs](/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + def metadata; end + sig { + params(_metadata: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) + } + def metadata=(_metadata); end + # The Metered Item that this rate binds to. Cannot be set if `metered_item_data` is provided, and must be set if it isn't. + sig { returns(T.nilable(String)) } + def metered_item; end + sig { params(_metered_item: T.nilable(String)).returns(T.nilable(String)) } + def metered_item=(_metered_item); end + # The data to create a metered item that binds to this rate. Cannot be set if `metered_item` is provided, and must be set if it isn't. + sig { + returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData)) + } + def metered_item_data; end + sig { + params(_metered_item_data: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData)).returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData)) + } + def metered_item_data=(_metered_item_data); end + # Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum + # quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity + # grows into new tiers. Can only be set if `tiers` is set. + sig { returns(T.nilable(String)) } + def tiering_mode; end + sig { params(_tiering_mode: T.nilable(String)).returns(T.nilable(String)) } + def tiering_mode=(_tiering_mode); end + # Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. + sig { + returns(T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier])) + } + def tiers; end + sig { + params(_tiers: T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier])).returns(T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier])) + } + def tiers=(_tiers); end + # Apply a transformation to the reported usage or set quantity before computing the amount billed. + sig { + returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity)) + } + def transform_quantity; end + sig { + params(_transform_quantity: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity)).returns(T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity)) + } + def transform_quantity=(_transform_quantity); end + # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal + # places. Cannot be set if `tiers` is provided. + sig { returns(T.nilable(String)) } + def unit_amount; end + sig { params(_unit_amount: T.nilable(String)).returns(T.nilable(String)) } + def unit_amount=(_unit_amount); end + sig { + params(metadata: T.nilable(T::Hash[String, String]), metered_item: T.nilable(String), metered_item_data: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::MeteredItemData), tiering_mode: T.nilable(String), tiers: T.nilable(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::Tier]), transform_quantity: T.nilable(::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate::TransformQuantity), unit_amount: T.nilable(String)).void + } + def initialize( + metadata: nil, + metered_item: nil, + metered_item_data: nil, + tiering_mode: nil, + tiers: nil, + transform_quantity: nil, + unit_amount: nil + ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end + end + class RatesToDelete < ::Stripe::RequestParams + # The ID of the RateCard rate to delete. + sig { returns(String) } + def id; end + sig { params(_id: String).returns(String) } + def id=(_id); end + sig { params(id: String).void } + def initialize(id: nil); end + end + # The list of RateCard rates to create or update. Maximum of 100 rates. + sig { returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate]) } + def rates_to_create; end + sig { + params(_rates_to_create: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate]).returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate]) + } + def rates_to_create=(_rates_to_create); end + # The list of RateCard rates to delete. Maximum of 100 rates. + sig { returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]) } + def rates_to_delete; end + sig { + params(_rates_to_delete: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]).returns(T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]) + } + def rates_to_delete=(_rates_to_delete); end + sig { + params(rates_to_create: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToCreate], rates_to_delete: T::Array[::Stripe::V2::Billing::RateCardModifyRatesParams::RatesToDelete]).void + } + def initialize(rates_to_create: nil, rates_to_delete: nil); end + def self.field_encodings + @field_encodings = { + rates_to_create: { + kind: :array, + element: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + }, + }, + }, + } + end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/params/v2/billing/rate_card_subscription_list_params.rbi b/rbi/stripe/params/v2/billing/rate_card_subscription_list_params.rbi index 6016a9305..954a90abe 100644 --- a/rbi/stripe/params/v2/billing/rate_card_subscription_list_params.rbi +++ b/rbi/stripe/params/v2/billing/rate_card_subscription_list_params.rbi @@ -25,7 +25,7 @@ module Stripe def billing_cadence; end sig { params(_billing_cadence: T.nilable(String)).returns(T.nilable(String)) } def billing_cadence=(_billing_cadence); end - # The page size limit, if not provided the default is 20. + # The page size limit. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit; end sig { params(_limit: T.nilable(Integer)).returns(T.nilable(Integer)) } diff --git a/rbi/stripe/params/v2/billing/rate_cards/rate_create_params.rbi b/rbi/stripe/params/v2/billing/rate_cards/rate_create_params.rbi index bb1517b0d..8ade5c3a5 100644 --- a/rbi/stripe/params/v2/billing/rate_cards/rate_create_params.rbi +++ b/rbi/stripe/params/v2/billing/rate_cards/rate_create_params.rbi @@ -35,9 +35,9 @@ module Stripe def unit_amount=(_unit_amount); end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end - sig { params(_up_to_decimal: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_up_to_decimal: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def up_to_decimal=(_up_to_decimal); end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -45,7 +45,7 @@ module Stripe sig { params(_up_to_inf: T.nilable(String)).returns(T.nilable(String)) } def up_to_inf=(_up_to_inf); end sig { - params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(String), up_to_inf: T.nilable(String)).void + params(flat_amount: T.nilable(String), unit_amount: T.nilable(String), up_to_decimal: T.nilable(BigDecimal), up_to_inf: T.nilable(String)).void } def initialize( flat_amount: nil, @@ -53,6 +53,9 @@ module Stripe up_to_decimal: nil, up_to_inf: nil ); end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::RequestParams # Divide usage by this number. @@ -67,6 +70,9 @@ module Stripe def round=(_round); end sig { params(divide_by: Integer, round: String).void } def initialize(divide_by: nil, round: nil); end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # The custom pricing unit that this rate binds to. One of `unit_amount`, `tiers`, or `custom_pricing_unit_amount` is required. sig { @@ -132,6 +138,15 @@ module Stripe transform_quantity: nil, unit_amount: nil ); end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/service_action_create_params.rbi b/rbi/stripe/params/v2/billing/service_action_create_params.rbi index 6a81420b0..f12271c50 100644 --- a/rbi/stripe/params/v2/billing/service_action_create_params.rbi +++ b/rbi/stripe/params/v2/billing/service_action_create_params.rbi @@ -15,26 +15,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end - end - class Monetary < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. sig { returns(String) } @@ -51,18 +40,21 @@ module Stripe } def custom_pricing_unit=(_custom_pricing_unit); end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { - returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end sig { - params(_monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)).returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)) + params(_monetary: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def monetary=(_monetary); end sig { - params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::Monetary)).void + params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Amount)).void } def initialize(type: nil, custom_pricing_unit: nil, monetary: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams class Scope < ::Stripe::RequestParams @@ -157,6 +149,14 @@ module Stripe name: nil, priority: nil ); end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class CreditGrantPerTenant < ::Stripe::RequestParams class Amount < ::Stripe::RequestParams @@ -167,26 +167,15 @@ module Stripe sig { params(_id: String).returns(String) } def id=(_id); end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end - sig { params(_value: String).returns(String) } + sig { params(_value: BigDecimal).returns(BigDecimal) } def value=(_value); end - sig { params(id: String, value: String).void } + sig { params(id: String, value: BigDecimal).void } def initialize(id: nil, value: nil); end - end - class Monetary < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. sig { returns(String) } @@ -203,18 +192,21 @@ module Stripe } def custom_pricing_unit=(_custom_pricing_unit); end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { - returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end sig { - params(_monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)).returns(T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)) + params(_monetary: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def monetary=(_monetary); end sig { - params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::Monetary)).void + params(type: String, custom_pricing_unit: T.nilable(::Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant::Amount::CustomPricingUnit), monetary: T.nilable(::Stripe::V2::Amount)).void } def initialize(type: nil, custom_pricing_unit: nil, monetary: nil); end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::RequestParams class Scope < ::Stripe::RequestParams @@ -390,6 +382,14 @@ module Stripe name: nil, priority: nil ); end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # An internal key you can use to search for this service action. Maximum length of 200 characters. sig { returns(T.nilable(String)) } @@ -438,6 +438,28 @@ module Stripe credit_grant: nil, credit_grant_per_tenant: nil ); end + def self.field_encodings + @field_encodings = { + credit_grant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + credit_grant_per_tenant: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/core/account_create_params.rbi b/rbi/stripe/params/v2/core/account_create_params.rbi index 6d5658c48..e9e27a9ec 100644 --- a/rbi/stripe/params/v2/core/account_create_params.rbi +++ b/rbi/stripe/params/v2/core/account_create_params.rbi @@ -2698,10 +2698,21 @@ module Stripe params(_responsibilities: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities)).returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities)) } def responsibilities=(_responsibilities); end + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + sig { returns(T.nilable(String)) } + def timezone; end + sig { params(_timezone: T.nilable(String)).returns(T.nilable(String)) } + def timezone=(_timezone); end sig { - params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities)).void + params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountCreateParams::Defaults::Responsibilities), timezone: T.nilable(String)).void } - def initialize(currency: nil, locales: nil, profile: nil, responsibilities: nil); end + def initialize( + currency: nil, + locales: nil, + profile: nil, + responsibilities: nil, + timezone: nil + ); end end class Identity < ::Stripe::RequestParams class Attestations < ::Stripe::RequestParams @@ -4320,27 +4331,11 @@ module Stripe ); end end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -4349,7 +4344,7 @@ module Stripe sig { params(_fiscal_year_end: T.nilable(String)).returns(T.nilable(String)) } def fiscal_year_end=(_fiscal_year_end); end sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount), fiscal_year_end: T.nilable(String)).void + params(amount: T.nilable(::Stripe::V2::Amount), fiscal_year_end: T.nilable(String)).void } def initialize(amount: nil, fiscal_year_end: nil); end end @@ -4642,32 +4637,14 @@ module Stripe def initialize(registrar: nil, type: nil, value: nil); end end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end - sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount)).void } def initialize(amount: nil); end end class RegistrationDate < ::Stripe::RequestParams @@ -5319,9 +5296,11 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percent owned by the person of the account's legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def percent_ownership=(_percent_ownership); end # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } @@ -5329,7 +5308,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), title: T.nilable(String)).void + params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), title: T.nilable(String)).void } def initialize( director: nil, @@ -5338,6 +5317,9 @@ module Stripe percent_ownership: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -5660,6 +5642,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { @@ -5706,6 +5693,16 @@ module Stripe entity_type: nil, individual: nil ); end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end # The account token generated by the account token api. sig { returns(T.nilable(String)) } @@ -5780,6 +5777,21 @@ module Stripe include: nil, metadata: nil ); end + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/core/account_evaluation_create_params.rbi b/rbi/stripe/params/v2/core/account_evaluation_create_params.rbi new file mode 100644 index 000000000..0ea1da13c --- /dev/null +++ b/rbi/stripe/params/v2/core/account_evaluation_create_params.rbi @@ -0,0 +1,121 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class AccountEvaluationCreateParams < ::Stripe::RequestParams + class AccountData < ::Stripe::RequestParams + class Defaults < ::Stripe::RequestParams + class Profile < ::Stripe::RequestParams + # The business URL. + sig { returns(String) } + def business_url; end + sig { params(_business_url: String).returns(String) } + def business_url=(_business_url); end + # Doing business as (DBA) name. + sig { returns(T.nilable(String)) } + def doing_business_as; end + sig { params(_doing_business_as: T.nilable(String)).returns(T.nilable(String)) } + def doing_business_as=(_doing_business_as); end + # Description of the account's product or service. + sig { returns(T.nilable(String)) } + def product_description; end + sig { params(_product_description: T.nilable(String)).returns(T.nilable(String)) } + def product_description=(_product_description); end + sig { + params(business_url: String, doing_business_as: T.nilable(String), product_description: T.nilable(String)).void + } + def initialize( + business_url: nil, + doing_business_as: nil, + product_description: nil + ); end + end + # Account profile data. + sig { + returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile) + } + def profile; end + sig { + params(_profile: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile).returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile) + } + def profile=(_profile); end + sig { + params(profile: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults::Profile).void + } + def initialize(profile: nil); end + end + class Identity < ::Stripe::RequestParams + class BusinessDetails < ::Stripe::RequestParams + # Registered business name. + sig { returns(T.nilable(String)) } + def registered_name; end + sig { params(_registered_name: T.nilable(String)).returns(T.nilable(String)) } + def registered_name=(_registered_name); end + sig { params(registered_name: T.nilable(String)).void } + def initialize(registered_name: nil); end + end + # Business details for identity data. + sig { + returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails) + } + def business_details; end + sig { + params(_business_details: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails).returns(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails) + } + def business_details=(_business_details); end + sig { + params(business_details: ::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity::BusinessDetails).void + } + def initialize(business_details: nil); end + end + # Default account settings. + sig { + returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults)) + } + def defaults; end + sig { + params(_defaults: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults)).returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults)) + } + def defaults=(_defaults); end + # Identity data. + sig { + returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)) + } + def identity; end + sig { + params(_identity: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)).returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)) + } + def identity=(_identity); end + sig { + params(defaults: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Defaults), identity: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData::Identity)).void + } + def initialize(defaults: nil, identity: nil); end + end + # The account ID to evaluate. Exactly one of account or account_data must be provided. + sig { returns(T.nilable(String)) } + def account; end + sig { params(_account: T.nilable(String)).returns(T.nilable(String)) } + def account=(_account); end + # Account data for entity-less evaluation. Exactly one of account or account_data must be provided. + sig { returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData)) } + def account_data; end + sig { + params(_account_data: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData)).returns(T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData)) + } + def account_data=(_account_data); end + # List of signals to evaluate. + sig { returns(T::Array[String]) } + def signals; end + sig { params(_signals: T::Array[String]).returns(T::Array[String]) } + def signals=(_signals); end + sig { + params(account: T.nilable(String), account_data: T.nilable(::Stripe::V2::Core::AccountEvaluationCreateParams::AccountData), signals: T::Array[String]).void + } + def initialize(account: nil, account_data: nil, signals: nil); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/params/v2/core/account_token_create_params.rbi b/rbi/stripe/params/v2/core/account_token_create_params.rbi index 29518c7b3..e10e6ab40 100644 --- a/rbi/stripe/params/v2/core/account_token_create_params.rbi +++ b/rbi/stripe/params/v2/core/account_token_create_params.rbi @@ -629,27 +629,11 @@ module Stripe ); end end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -658,7 +642,7 @@ module Stripe sig { params(_fiscal_year_end: T.nilable(String)).returns(T.nilable(String)) } def fiscal_year_end=(_fiscal_year_end); end sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::AnnualRevenue::Amount), fiscal_year_end: T.nilable(String)).void + params(amount: T.nilable(::Stripe::V2::Amount), fiscal_year_end: T.nilable(String)).void } def initialize(amount: nil, fiscal_year_end: nil); end end @@ -951,32 +935,14 @@ module Stripe def initialize(registrar: nil, type: nil, value: nil); end end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end - sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountTokenCreateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount)).void } def initialize(amount: nil); end end class RegistrationDate < ::Stripe::RequestParams @@ -1628,9 +1594,11 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percent owned by the person of the account's legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def percent_ownership=(_percent_ownership); end # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } @@ -1638,7 +1606,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), title: T.nilable(String)).void + params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), title: T.nilable(String)).void } def initialize( director: nil, @@ -1647,6 +1615,9 @@ module Stripe percent_ownership: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -1969,6 +1940,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { @@ -2011,6 +1987,16 @@ module Stripe entity_type: nil, individual: nil ); end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end # The default contact email address for the Account. Required when configuring the account as a merchant or recipient. sig { returns(T.nilable(String)) } @@ -2043,6 +2029,21 @@ module Stripe display_name: nil, identity: nil ); end + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/core/account_update_params.rbi b/rbi/stripe/params/v2/core/account_update_params.rbi index 65d1d244e..a8339c76e 100644 --- a/rbi/stripe/params/v2/core/account_update_params.rbi +++ b/rbi/stripe/params/v2/core/account_update_params.rbi @@ -2748,10 +2748,21 @@ module Stripe params(_responsibilities: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities)).returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities)) } def responsibilities=(_responsibilities); end + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + sig { returns(T.nilable(String)) } + def timezone; end + sig { params(_timezone: T.nilable(String)).returns(T.nilable(String)) } + def timezone=(_timezone); end sig { - params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities)).void + params(currency: T.nilable(String), locales: T.nilable(T::Array[String]), profile: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Profile), responsibilities: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Defaults::Responsibilities), timezone: T.nilable(String)).void } - def initialize(currency: nil, locales: nil, profile: nil, responsibilities: nil); end + def initialize( + currency: nil, + locales: nil, + profile: nil, + responsibilities: nil, + timezone: nil + ); end end class Identity < ::Stripe::RequestParams class Attestations < ::Stripe::RequestParams @@ -4442,27 +4453,11 @@ module Stripe ); end end class AnnualRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. @@ -4471,7 +4466,7 @@ module Stripe sig { params(_fiscal_year_end: T.nilable(String)).returns(T.nilable(String)) } def fiscal_year_end=(_fiscal_year_end); end sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::AnnualRevenue::Amount), fiscal_year_end: T.nilable(String)).void + params(amount: T.nilable(::Stripe::V2::Amount), fiscal_year_end: T.nilable(String)).void } def initialize(amount: nil, fiscal_year_end: nil); end end @@ -4764,32 +4759,14 @@ module Stripe def initialize(registrar: nil, type: nil, value: nil); end end class MonthlyEstimatedRevenue < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # A non-negative integer representing the amount in the smallest currency unit. - sig { - returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).returns(T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end - sig { - params(amount: T.nilable(::Stripe::V2::Core::AccountUpdateParams::Identity::BusinessDetails::MonthlyEstimatedRevenue::Amount)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount)).void } def initialize(amount: nil); end end class RegistrationDate < ::Stripe::RequestParams @@ -5441,9 +5418,11 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percent owned by the person of the account's legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { + params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) + } def percent_ownership=(_percent_ownership); end # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } @@ -5451,7 +5430,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), title: T.nilable(String)).void + params(director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), title: T.nilable(String)).void } def initialize( director: nil, @@ -5460,6 +5439,9 @@ module Stripe percent_ownership: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -5782,6 +5764,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { @@ -5828,6 +5815,16 @@ module Stripe entity_type: nil, individual: nil ); end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end # The account token generated by the account token api. sig { returns(T.nilable(String)) } @@ -5902,6 +5899,21 @@ module Stripe include: nil, metadata: nil ); end + def self.field_encodings + @field_encodings = { + identity: { + kind: :object, + fields: { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/core/accounts/person_create_params.rbi b/rbi/stripe/params/v2/core/accounts/person_create_params.rbi index 8c431c710..2feb03027 100644 --- a/rbi/stripe/params/v2/core/accounts/person_create_params.rbi +++ b/rbi/stripe/params/v2/core/accounts/person_create_params.rbi @@ -398,9 +398,9 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percentage of ownership the person has in the associated legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def percent_ownership=(_percent_ownership); end # Indicates whether the person is a representative of the associated legal entity. sig { returns(T.nilable(T::Boolean)) } @@ -413,7 +413,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), representative: T.nilable(T::Boolean), title: T.nilable(String)).void + params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), representative: T.nilable(T::Boolean), title: T.nilable(String)).void } def initialize( authorizer: nil, @@ -425,6 +425,9 @@ module Stripe representative: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -753,6 +756,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end end end diff --git a/rbi/stripe/params/v2/core/accounts/person_token_create_params.rbi b/rbi/stripe/params/v2/core/accounts/person_token_create_params.rbi index b5c6453ea..8c26a9b4b 100644 --- a/rbi/stripe/params/v2/core/accounts/person_token_create_params.rbi +++ b/rbi/stripe/params/v2/core/accounts/person_token_create_params.rbi @@ -390,9 +390,9 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percentage of ownership the person has in the associated legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def percent_ownership=(_percent_ownership); end # Indicates whether the person is a representative of the associated legal entity. sig { returns(T.nilable(T::Boolean)) } @@ -405,7 +405,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), representative: T.nilable(T::Boolean), title: T.nilable(String)).void + params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), representative: T.nilable(T::Boolean), title: T.nilable(String)).void } def initialize( authorizer: nil, @@ -417,6 +417,9 @@ module Stripe representative: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -747,6 +750,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end end end diff --git a/rbi/stripe/params/v2/core/accounts/person_update_params.rbi b/rbi/stripe/params/v2/core/accounts/person_update_params.rbi index cd4849707..81bf3544e 100644 --- a/rbi/stripe/params/v2/core/accounts/person_update_params.rbi +++ b/rbi/stripe/params/v2/core/accounts/person_update_params.rbi @@ -400,9 +400,9 @@ module Stripe sig { params(_owner: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) } def owner=(_owner); end # The percentage of ownership the person has in the associated legal entity. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end - sig { params(_percent_ownership: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_percent_ownership: T.nilable(BigDecimal)).returns(T.nilable(BigDecimal)) } def percent_ownership=(_percent_ownership); end # Indicates whether the person is a representative of the associated legal entity. sig { returns(T.nilable(T::Boolean)) } @@ -415,7 +415,7 @@ module Stripe sig { params(_title: T.nilable(String)).returns(T.nilable(String)) } def title=(_title); end sig { - params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(String), representative: T.nilable(T::Boolean), title: T.nilable(String)).void + params(authorizer: T.nilable(T::Boolean), director: T.nilable(T::Boolean), executive: T.nilable(T::Boolean), legal_guardian: T.nilable(T::Boolean), owner: T.nilable(T::Boolean), percent_ownership: T.nilable(BigDecimal), representative: T.nilable(T::Boolean), title: T.nilable(String)).void } def initialize( authorizer: nil, @@ -427,6 +427,9 @@ module Stripe representative: nil, title: nil ); end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::RequestParams class Kana < ::Stripe::RequestParams @@ -755,6 +758,11 @@ module Stripe script_names: nil, surname: nil ); end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end end end diff --git a/rbi/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rbi b/rbi/stripe/params/v2/core/batch_job_cancel_params.rbi similarity index 56% rename from rbi/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rbi rename to rbi/stripe/params/v2/core/batch_job_cancel_params.rbi index b55fdad88..396519dd1 100644 --- a/rbi/stripe/params/v2/billing/license_fee_subscription_retrieve_params.rbi +++ b/rbi/stripe/params/v2/core/batch_job_cancel_params.rbi @@ -4,8 +4,8 @@ # typed: true module Stripe module V2 - module Billing - class LicenseFeeSubscriptionRetrieveParams < ::Stripe::RequestParams; end + module Core + class BatchJobCancelParams < ::Stripe::RequestParams; end end end end \ No newline at end of file diff --git a/rbi/stripe/params/v2/core/batch_job_create_params.rbi b/rbi/stripe/params/v2/core/batch_job_create_params.rbi new file mode 100644 index 000000000..18a1fd14e --- /dev/null +++ b/rbi/stripe/params/v2/core/batch_job_create_params.rbi @@ -0,0 +1,79 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class BatchJobCreateParams < ::Stripe::RequestParams + class Endpoint < ::Stripe::RequestParams + # The HTTP method to use when calling the endpoint. + sig { returns(String) } + def http_method; end + sig { params(_http_method: String).returns(String) } + def http_method=(_http_method); end + # The path of the endpoint to run this batch job against. + # In the form used in the documentation. For instance, for + # subscription migration this would be `/v1/subscriptions/:id/migrate`. + sig { returns(String) } + def path; end + sig { params(_path: String).returns(String) } + def path=(_path); end + sig { params(http_method: String, path: String).void } + def initialize(http_method: nil, path: nil); end + end + class NotificationSuppression < ::Stripe::RequestParams + # The scope of notification suppression. + sig { returns(String) } + def scope; end + sig { params(_scope: String).returns(String) } + def scope=(_scope); end + sig { params(scope: String).void } + def initialize(scope: nil); end + end + # The endpoint configuration for the batch job. + sig { returns(::Stripe::V2::Core::BatchJobCreateParams::Endpoint) } + def endpoint; end + sig { + params(_endpoint: ::Stripe::V2::Core::BatchJobCreateParams::Endpoint).returns(::Stripe::V2::Core::BatchJobCreateParams::Endpoint) + } + def endpoint=(_endpoint); end + # Optional field that allows the user to control how fast they want this batch job to run. + # Gives them a control over the number of webhooks they receive. + sig { returns(T.nilable(Integer)) } + def maximum_rps; end + sig { params(_maximum_rps: T.nilable(Integer)).returns(T.nilable(Integer)) } + def maximum_rps=(_maximum_rps); end + # The metadata of the `BatchJob` object. + sig { returns(T::Hash[String, String]) } + def metadata; end + sig { params(_metadata: T::Hash[String, String]).returns(T::Hash[String, String]) } + def metadata=(_metadata); end + # Notification suppression settings for the batch job. + sig { + returns(T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression)) + } + def notification_suppression; end + sig { + params(_notification_suppression: T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression)).returns(T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression)) + } + def notification_suppression=(_notification_suppression); end + # Allows the user to skip validation. + sig { returns(T::Boolean) } + def skip_validation; end + sig { params(_skip_validation: T::Boolean).returns(T::Boolean) } + def skip_validation=(_skip_validation); end + sig { + params(endpoint: ::Stripe::V2::Core::BatchJobCreateParams::Endpoint, maximum_rps: T.nilable(Integer), metadata: T::Hash[String, String], notification_suppression: T.nilable(::Stripe::V2::Core::BatchJobCreateParams::NotificationSuppression), skip_validation: T::Boolean).void + } + def initialize( + endpoint: nil, + maximum_rps: nil, + metadata: nil, + notification_suppression: nil, + skip_validation: nil + ); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/params/v2/core/batch_job_retrieve_params.rbi b/rbi/stripe/params/v2/core/batch_job_retrieve_params.rbi new file mode 100644 index 000000000..c1d2a23bb --- /dev/null +++ b/rbi/stripe/params/v2/core/batch_job_retrieve_params.rbi @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class BatchJobRetrieveParams < ::Stripe::RequestParams; end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/params/v2/core/event_destination_create_params.rbi b/rbi/stripe/params/v2/core/event_destination_create_params.rbi index a303aec7e..9ea79322e 100644 --- a/rbi/stripe/params/v2/core/event_destination_create_params.rbi +++ b/rbi/stripe/params/v2/core/event_destination_create_params.rbi @@ -20,6 +20,31 @@ module Stripe sig { params(aws_account_id: String, aws_region: String).void } def initialize(aws_account_id: nil, aws_region: nil); end end + class AzureEventGrid < ::Stripe::RequestParams + # The Azure region. + sig { returns(String) } + def azure_region; end + sig { params(_azure_region: String).returns(String) } + def azure_region=(_azure_region); end + # The name of the Azure resource group. + sig { returns(String) } + def azure_resource_group_name; end + sig { params(_azure_resource_group_name: String).returns(String) } + def azure_resource_group_name=(_azure_resource_group_name); end + # The Azure subscription ID. + sig { returns(String) } + def azure_subscription_id; end + sig { params(_azure_subscription_id: String).returns(String) } + def azure_subscription_id=(_azure_subscription_id); end + sig { + params(azure_region: String, azure_resource_group_name: String, azure_subscription_id: String).void + } + def initialize( + azure_region: nil, + azure_resource_group_name: nil, + azure_subscription_id: nil + ); end + end class WebhookEndpoint < ::Stripe::RequestParams # The URL of the webhook endpoint. sig { returns(String) } @@ -44,7 +69,11 @@ module Stripe def event_payload; end sig { params(_event_payload: String).returns(String) } def event_payload=(_event_payload); end - # Where events should be routed from. + # Specifies which accounts' events route to this destination. + # `@self`: Receive events from the account that owns the event destination. + # `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + # `@organization_members`: Receive events from accounts directly linked to the organization. + # `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. sig { returns(T.nilable(T::Array[String])) } def events_from; end sig { @@ -87,6 +116,13 @@ module Stripe params(_amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge)).returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge)) } def amazon_eventbridge=(_amazon_eventbridge); end + # Azure Event Grid configuration. + sig { returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid)) } + def azure_event_grid; end + sig { + params(_azure_event_grid: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid)).returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid)) + } + def azure_event_grid=(_azure_event_grid); end # Webhook endpoint configuration. sig { returns(T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::WebhookEndpoint)) @@ -97,7 +133,7 @@ module Stripe } def webhook_endpoint=(_webhook_endpoint); end sig { - params(description: T.nilable(String), enabled_events: T::Array[String], event_payload: String, events_from: T.nilable(T::Array[String]), include: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, snapshot_api_version: T.nilable(String), type: String, amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge), webhook_endpoint: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::WebhookEndpoint)).void + params(description: T.nilable(String), enabled_events: T::Array[String], event_payload: String, events_from: T.nilable(T::Array[String]), include: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, snapshot_api_version: T.nilable(String), type: String, amazon_eventbridge: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AmazonEventbridge), azure_event_grid: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::AzureEventGrid), webhook_endpoint: T.nilable(::Stripe::V2::Core::EventDestinationCreateParams::WebhookEndpoint)).void } def initialize( description: nil, @@ -110,6 +146,7 @@ module Stripe snapshot_api_version: nil, type: nil, amazon_eventbridge: nil, + azure_event_grid: nil, webhook_endpoint: nil ); end end diff --git a/rbi/stripe/params/v2/core/vault/gb_bank_account_create_params.rbi b/rbi/stripe/params/v2/core/vault/gb_bank_account_create_params.rbi index 519e308a6..60983dcc9 100644 --- a/rbi/stripe/params/v2/core/vault/gb_bank_account_create_params.rbi +++ b/rbi/stripe/params/v2/core/vault/gb_bank_account_create_params.rbi @@ -30,9 +30,9 @@ module Stripe def initialize(business_type: nil, initiate: nil, name: nil); end end # The Account Number of the bank account. - sig { returns(String) } + sig { returns(T.nilable(String)) } def account_number; end - sig { params(_account_number: String).returns(String) } + sig { params(_account_number: T.nilable(String)).returns(T.nilable(String)) } def account_number=(_account_number); end # Closed Enum. The type of the bank account (checking or savings). sig { returns(T.nilable(String)) } @@ -50,18 +50,30 @@ module Stripe params(_confirmation_of_payee: T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee)).returns(T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee)) } def confirmation_of_payee=(_confirmation_of_payee); end - # The Sort Code of the bank account. + # The currency of the bank account. sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end + # The IBAN of the bank account. + sig { returns(T.nilable(String)) } + def iban; end + sig { params(_iban: T.nilable(String)).returns(T.nilable(String)) } + def iban=(_iban); end + # The Sort Code of the bank account. + sig { returns(T.nilable(String)) } def sort_code; end - sig { params(_sort_code: String).returns(String) } + sig { params(_sort_code: T.nilable(String)).returns(T.nilable(String)) } def sort_code=(_sort_code); end sig { - params(account_number: String, bank_account_type: T.nilable(String), confirmation_of_payee: T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee), sort_code: String).void + params(account_number: T.nilable(String), bank_account_type: T.nilable(String), confirmation_of_payee: T.nilable(::Stripe::V2::Core::Vault::GbBankAccountCreateParams::ConfirmationOfPayee), currency: String, iban: T.nilable(String), sort_code: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, confirmation_of_payee: nil, + currency: nil, + iban: nil, sort_code: nil ); end end diff --git a/rbi/stripe/params/v2/core/vault/us_bank_account_create_params.rbi b/rbi/stripe/params/v2/core/vault/us_bank_account_create_params.rbi index eafb8558c..0b0964dda 100644 --- a/rbi/stripe/params/v2/core/vault/us_bank_account_create_params.rbi +++ b/rbi/stripe/params/v2/core/vault/us_bank_account_create_params.rbi @@ -17,6 +17,11 @@ module Stripe def bank_account_type; end sig { params(_bank_account_type: T.nilable(String)).returns(T.nilable(String)) } def bank_account_type=(_bank_account_type); end + # The currency of the bank account. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end # The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number. sig { returns(T.nilable(String)) } def fedwire_routing_number; end @@ -28,11 +33,12 @@ module Stripe sig { params(_routing_number: T.nilable(String)).returns(T.nilable(String)) } def routing_number=(_routing_number); end sig { - params(account_number: String, bank_account_type: T.nilable(String), fedwire_routing_number: T.nilable(String), routing_number: T.nilable(String)).void + params(account_number: String, bank_account_type: T.nilable(String), currency: String, fedwire_routing_number: T.nilable(String), routing_number: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, + currency: nil, fedwire_routing_number: nil, routing_number: nil ); end diff --git a/rbi/stripe/params/v2/money_management/currency_conversion_create_params.rbi b/rbi/stripe/params/v2/money_management/currency_conversion_create_params.rbi index 01489b8b2..af294a569 100644 --- a/rbi/stripe/params/v2/money_management/currency_conversion_create_params.rbi +++ b/rbi/stripe/params/v2/money_management/currency_conversion_create_params.rbi @@ -7,27 +7,11 @@ module Stripe module MoneyManagement class CurrencyConversionCreateParams < ::Stripe::RequestParams class From < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # Amount object. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount)).returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # A lowercase alpha3 currency code like "usd". @@ -35,33 +19,15 @@ module Stripe def currency; end sig { params(_currency: T.nilable(String)).returns(T.nilable(String)) } def currency=(_currency); end - sig { - params(amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::From::Amount), currency: T.nilable(String)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount), currency: T.nilable(String)).void } def initialize(amount: nil, currency: nil); end end class To < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # Amount object. - sig { - returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount)).returns(T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # A lowercase alpha3 currency code like "usd". @@ -69,9 +35,7 @@ module Stripe def currency; end sig { params(_currency: T.nilable(String)).returns(T.nilable(String)) } def currency=(_currency); end - sig { - params(amount: T.nilable(::Stripe::V2::MoneyManagement::CurrencyConversionCreateParams::To::Amount), currency: T.nilable(String)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount), currency: T.nilable(String)).void } def initialize(amount: nil, currency: nil); end end # The FinancialAccount id to create the CurrencyConversion on. diff --git a/rbi/stripe/params/v2/money_management/financial_account_list_params.rbi b/rbi/stripe/params/v2/money_management/financial_account_list_params.rbi index 75cd6f1f7..7b3b4b4d6 100644 --- a/rbi/stripe/params/v2/money_management/financial_account_list_params.rbi +++ b/rbi/stripe/params/v2/money_management/financial_account_list_params.rbi @@ -6,6 +6,11 @@ module Stripe module V2 module MoneyManagement class FinancialAccountListParams < ::Stripe::RequestParams + # Additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end # The page limit. sig { returns(T.nilable(Integer)) } def limit; end @@ -22,9 +27,9 @@ module Stripe sig { params(_types: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def types=(_types); end sig { - params(limit: T.nilable(Integer), status: T.nilable(String), types: T.nilable(T::Array[String])).void + params(include: T.nilable(T::Array[String]), limit: T.nilable(Integer), status: T.nilable(String), types: T.nilable(T::Array[String])).void } - def initialize(limit: nil, status: nil, types: nil); end + def initialize(include: nil, limit: nil, status: nil, types: nil); end end end end diff --git a/rbi/stripe/params/v2/money_management/financial_account_retrieve_params.rbi b/rbi/stripe/params/v2/money_management/financial_account_retrieve_params.rbi index 1105b2b06..143733c15 100644 --- a/rbi/stripe/params/v2/money_management/financial_account_retrieve_params.rbi +++ b/rbi/stripe/params/v2/money_management/financial_account_retrieve_params.rbi @@ -5,7 +5,15 @@ module Stripe module V2 module MoneyManagement - class FinancialAccountRetrieveParams < ::Stripe::RequestParams; end + class FinancialAccountRetrieveParams < ::Stripe::RequestParams + # Additional fields to include in the response. + sig { returns(T.nilable(T::Array[String])) } + def include; end + sig { params(_include: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } + def include=(_include); end + sig { params(include: T.nilable(T::Array[String])).void } + def initialize(include: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/params/v2/money_management/inbound_transfer_create_params.rbi b/rbi/stripe/params/v2/money_management/inbound_transfer_create_params.rbi index 452711e94..c4885385f 100644 --- a/rbi/stripe/params/v2/money_management/inbound_transfer_create_params.rbi +++ b/rbi/stripe/params/v2/money_management/inbound_transfer_create_params.rbi @@ -6,20 +6,6 @@ module Stripe module V2 module MoneyManagement class InboundTransferCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class From < ::Stripe::RequestParams # An optional currency field used to specify which currency is debited from the Payment Method. # Since many Payment Methods support only one currency, this field is optional. @@ -50,11 +36,9 @@ module Stripe def initialize(currency: nil, financial_account: nil); end end # The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. - sig { returns(::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # An optional, freeform description field intended to store metadata. sig { returns(T.nilable(String)) } @@ -76,7 +60,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::Amount, description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::From, to: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::To).void + params(amount: ::Stripe::V2::Amount, description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::From, to: ::Stripe::V2::MoneyManagement::InboundTransferCreateParams::To).void } def initialize(amount: nil, description: nil, from: nil, to: nil); end end 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 0b7ee95a4..6cdcbe3dc 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 @@ -6,20 +6,6 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class DeliveryOptions < ::Stripe::RequestParams class PaperCheck < ::Stripe::RequestParams # Memo printed on the memo field of the check. @@ -118,11 +104,9 @@ module Stripe def initialize(currency: nil, payout_method: nil, recipient: nil); end end # The "presentment amount" to be sent to the recipient. - sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Delivery options to be used to send the OutboundPayment. sig { @@ -176,6 +160,11 @@ module Stripe def recipient_verification; end sig { params(_recipient_verification: T.nilable(String)).returns(T.nilable(String)) } def recipient_verification=(_recipient_verification); end + # The description that appears on the receiving end for an OutboundPayment (for example, on a bank statement). Must be between 3 and 22 characters long, and not contain profanity. + sig { returns(T.nilable(String)) } + def statement_descriptor; end + sig { params(_statement_descriptor: T.nilable(String)).returns(T.nilable(String)) } + def statement_descriptor=(_statement_descriptor); end # To which payout method to send the OutboundPayment. sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::To) } def to; end @@ -184,7 +173,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::From, metadata: T.nilable(T::Hash[String, String]), outbound_payment_quote: T.nilable(String), purpose: T.nilable(String), recipient_notification: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::RecipientNotification), recipient_verification: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::To).void + params(amount: ::Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::From, metadata: T.nilable(T::Hash[String, String]), outbound_payment_quote: T.nilable(String), purpose: T.nilable(String), recipient_notification: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::RecipientNotification), recipient_verification: T.nilable(String), statement_descriptor: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundPaymentCreateParams::To).void } def initialize( amount: nil, @@ -196,6 +185,7 @@ module Stripe purpose: nil, recipient_notification: nil, recipient_verification: nil, + statement_descriptor: nil, to: nil ); end end 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 08c6f4a44..d6ffa3ffb 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 @@ -6,20 +6,6 @@ module Stripe module V2 module MoneyManagement class OutboundPaymentQuoteCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class DeliveryOptions < ::Stripe::RequestParams # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } @@ -76,11 +62,9 @@ module Stripe def initialize(currency: nil, payout_method: nil, recipient: nil); end end # The "presentment amount" to be sent to the recipient. - sig { returns(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Method to be used to send the OutboundPayment. sig { @@ -106,7 +90,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::DeliveryOptions), from: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::From, to: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::To).void + params(amount: ::Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::DeliveryOptions), from: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::From, to: ::Stripe::V2::MoneyManagement::OutboundPaymentQuoteCreateParams::To).void } def initialize(amount: nil, delivery_options: nil, from: nil, to: nil); end end diff --git a/rbi/stripe/params/v2/money_management/outbound_setup_intent_create_params.rbi b/rbi/stripe/params/v2/money_management/outbound_setup_intent_create_params.rbi index b1ac69b4b..76a0b4a39 100644 --- a/rbi/stripe/params/v2/money_management/outbound_setup_intent_create_params.rbi +++ b/rbi/stripe/params/v2/money_management/outbound_setup_intent_create_params.rbi @@ -28,6 +28,11 @@ module Stripe def country; end sig { params(_country: String).returns(String) } def country=(_country); end + # The currency of the bank account. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end # The routing number of the bank account, if present. sig { returns(T.nilable(String)) } def routing_number; end @@ -39,18 +44,24 @@ module Stripe sig { params(_swift_code: T.nilable(String)).returns(T.nilable(String)) } def swift_code=(_swift_code); end sig { - params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void + params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, currency: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, branch_number: nil, country: nil, + currency: nil, routing_number: nil, swift_code: nil ); end end class Card < ::Stripe::RequestParams + # The currency of the card. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end # The expiration month of the card. sig { returns(String) } def exp_month; end @@ -66,8 +77,10 @@ module Stripe def number; end sig { params(_number: String).returns(String) } def number=(_number); end - sig { params(exp_month: String, exp_year: String, number: String).void } - def initialize(exp_month: nil, exp_year: nil, number: nil); end + sig { + params(currency: String, exp_month: String, exp_year: String, number: String).void + } + def initialize(currency: nil, exp_month: nil, exp_year: nil, number: nil); end end class CryptoWallet < ::Stripe::RequestParams # Crypto wallet address. diff --git a/rbi/stripe/params/v2/money_management/outbound_setup_intent_update_params.rbi b/rbi/stripe/params/v2/money_management/outbound_setup_intent_update_params.rbi index e2c99cb43..3b294d099 100644 --- a/rbi/stripe/params/v2/money_management/outbound_setup_intent_update_params.rbi +++ b/rbi/stripe/params/v2/money_management/outbound_setup_intent_update_params.rbi @@ -28,6 +28,11 @@ module Stripe def country; end sig { params(_country: String).returns(String) } def country=(_country); end + # The currency of the bank account. + sig { returns(String) } + def currency; end + sig { params(_currency: String).returns(String) } + def currency=(_currency); end # The routing number of the bank account, if present. sig { returns(T.nilable(String)) } def routing_number; end @@ -39,18 +44,24 @@ module Stripe sig { params(_swift_code: T.nilable(String)).returns(T.nilable(String)) } def swift_code=(_swift_code); end sig { - params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void + params(account_number: String, bank_account_type: T.nilable(String), branch_number: T.nilable(String), country: String, currency: String, routing_number: T.nilable(String), swift_code: T.nilable(String)).void } def initialize( account_number: nil, bank_account_type: nil, branch_number: nil, country: nil, + currency: nil, routing_number: nil, swift_code: nil ); end end class Card < ::Stripe::RequestParams + # The currency of the card. + sig { returns(T.nilable(String)) } + def currency; end + sig { params(_currency: T.nilable(String)).returns(T.nilable(String)) } + def currency=(_currency); end # The expiration month of the card. sig { returns(T.nilable(String)) } def exp_month; end @@ -67,9 +78,9 @@ module Stripe sig { params(_number: T.nilable(String)).returns(T.nilable(String)) } def number=(_number); end sig { - params(exp_month: T.nilable(String), exp_year: T.nilable(String), number: T.nilable(String)).void + params(currency: T.nilable(String), exp_month: T.nilable(String), exp_year: T.nilable(String), number: T.nilable(String)).void } - def initialize(exp_month: nil, exp_year: nil, number: nil); end + def initialize(currency: nil, exp_month: nil, exp_year: nil, number: nil); end end # Closed Enum. The type of payout method to be created/updated. sig { returns(String) } diff --git a/rbi/stripe/params/v2/money_management/outbound_transfer_create_params.rbi b/rbi/stripe/params/v2/money_management/outbound_transfer_create_params.rbi index b4004ab65..70ff27f29 100644 --- a/rbi/stripe/params/v2/money_management/outbound_transfer_create_params.rbi +++ b/rbi/stripe/params/v2/money_management/outbound_transfer_create_params.rbi @@ -6,20 +6,6 @@ module Stripe module V2 module MoneyManagement class OutboundTransferCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class DeliveryOptions < ::Stripe::RequestParams # Open Enum. Method for bank account. sig { returns(T.nilable(String)) } @@ -64,11 +50,9 @@ module Stripe def initialize(currency: nil, payout_method: nil); end end # The "presentment amount" for the OutboundPayment. - sig { returns(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount).returns(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Delivery options to be used to send the OutboundTransfer. sig { @@ -103,6 +87,11 @@ module Stripe def recipient_verification; end sig { params(_recipient_verification: T.nilable(String)).returns(T.nilable(String)) } def recipient_verification=(_recipient_verification); end + # The description that appears on the receiving end for an OutboundTransfer (for example, on a bank statement). Must be between 3 and 22 characters long, and not contain profanity. + sig { returns(T.nilable(String)) } + def statement_descriptor; end + sig { params(_statement_descriptor: T.nilable(String)).returns(T.nilable(String)) } + def statement_descriptor=(_statement_descriptor); end # To which payout method to send the OutboundTransfer. sig { returns(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::To) } def to; end @@ -111,7 +100,7 @@ module Stripe } def to=(_to); end sig { - params(amount: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::From, metadata: T.nilable(T::Hash[String, String]), recipient_verification: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::To).void + params(amount: ::Stripe::V2::Amount, delivery_options: T.nilable(::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::DeliveryOptions), description: T.nilable(String), from: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::From, metadata: T.nilable(T::Hash[String, String]), recipient_verification: T.nilable(String), statement_descriptor: T.nilable(String), to: ::Stripe::V2::MoneyManagement::OutboundTransferCreateParams::To).void } def initialize( amount: nil, @@ -120,6 +109,7 @@ module Stripe from: nil, metadata: nil, recipient_verification: nil, + statement_descriptor: nil, to: nil ); end end diff --git a/rbi/stripe/params/v2/payments/off_session_payment_create_params.rbi b/rbi/stripe/params/v2/payments/off_session_payment_create_params.rbi index dc83055db..604c71d02 100644 --- a/rbi/stripe/params/v2/payments/off_session_payment_create_params.rbi +++ b/rbi/stripe/params/v2/payments/off_session_payment_create_params.rbi @@ -6,20 +6,6 @@ module Stripe module V2 module Payments class OffSessionPaymentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end class Capture < ::Stripe::RequestParams # The method to use to capture the payment. sig { returns(String) } @@ -231,11 +217,9 @@ module Stripe def initialize(amount: nil, destination: nil); end end # The “presentment amount” to be collected from the customer. - sig { returns(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount).returns(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # The frequency of the underlying payment. sig { returns(String) } @@ -338,7 +322,7 @@ module Stripe } def transfer_data=(_transfer_data); end sig { - params(amount: ::Stripe::V2::Payments::OffSessionPaymentCreateParams::Amount, cadence: String, capture: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Capture), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::TransferData)).void + params(amount: ::Stripe::V2::Amount, cadence: String, capture: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::Capture), customer: String, metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), payment_method: T.nilable(String), payment_method_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodData), payment_method_options: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentMethodOptions), payments_orchestration: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::PaymentsOrchestration), retry_details: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::RetryDetails), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), test_clock: T.nilable(String), transfer_data: T.nilable(::Stripe::V2::Payments::OffSessionPaymentCreateParams::TransferData)).void } def initialize( amount: nil, diff --git a/rbi/stripe/params/v2/payments/settlement_allocation_intent_create_params.rbi b/rbi/stripe/params/v2/payments/settlement_allocation_intent_create_params.rbi index 63d051008..ad4d794c1 100644 --- a/rbi/stripe/params/v2/payments/settlement_allocation_intent_create_params.rbi +++ b/rbi/stripe/params/v2/payments/settlement_allocation_intent_create_params.rbi @@ -6,26 +6,10 @@ module Stripe module V2 module Payments class SettlementAllocationIntentCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # The amount and currency of the SettlementAllocationIntent. Allowed Currencies are `gbp` | `eur`. - sig { returns(::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount).returns(::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Date when we expect to receive the funds. Must be in future . sig { returns(String) } @@ -50,7 +34,7 @@ module Stripe sig { params(_reference: String).returns(String) } def reference=(_reference); end sig { - params(amount: ::Stripe::V2::Payments::SettlementAllocationIntentCreateParams::Amount, expected_settlement_date: String, financial_account: String, metadata: T.nilable(T::Hash[String, String]), reference: String).void + params(amount: ::Stripe::V2::Amount, expected_settlement_date: String, financial_account: String, metadata: T.nilable(T::Hash[String, String]), reference: String).void } def initialize( amount: nil, diff --git a/rbi/stripe/params/v2/payments/settlement_allocation_intent_update_params.rbi b/rbi/stripe/params/v2/payments/settlement_allocation_intent_update_params.rbi index f6bcef81d..82b7cc240 100644 --- a/rbi/stripe/params/v2/payments/settlement_allocation_intent_update_params.rbi +++ b/rbi/stripe/params/v2/payments/settlement_allocation_intent_update_params.rbi @@ -6,27 +6,11 @@ module Stripe module V2 module Payments class SettlementAllocationIntentUpdateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # The new amount for the SettlementAllocationIntent. Only amount.value can be updated and currency must remain same. - sig { - returns(T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount)) - } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end sig { - params(_amount: T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount)).returns(T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount)) + params(_amount: T.nilable(::Stripe::V2::Amount)).returns(T.nilable(::Stripe::V2::Amount)) } def amount=(_amount); end # The new reference for the SettlementAllocationIntent. @@ -34,9 +18,7 @@ module Stripe def reference; end sig { params(_reference: T.nilable(String)).returns(T.nilable(String)) } def reference=(_reference); end - sig { - params(amount: T.nilable(::Stripe::V2::Payments::SettlementAllocationIntentUpdateParams::Amount), reference: T.nilable(String)).void - } + sig { params(amount: T.nilable(::Stripe::V2::Amount), reference: T.nilable(String)).void } def initialize(amount: nil, reference: nil); end end end diff --git a/rbi/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rbi b/rbi/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rbi index a8ddbf809..ea8471f09 100644 --- a/rbi/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rbi +++ b/rbi/stripe/params/v2/payments/settlement_allocation_intents/split_create_params.rbi @@ -7,33 +7,15 @@ module Stripe module Payments module SettlementAllocationIntents class SplitCreateParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # The target account for settling the SettlementAllocationIntentSplit. sig { returns(String) } def account; end sig { params(_account: String).returns(String) } def account=(_account); end # The amount and currency of the SettlementAllocationIntentSplit. - sig { - returns(::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount) - } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount).returns(::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Metadata associated with the SettlementAllocationIntentSplit. sig { returns(T.nilable(T::Hash[String, String])) } @@ -48,7 +30,7 @@ module Stripe sig { params(_type: String).returns(String) } def type=(_type); end sig { - params(account: String, amount: ::Stripe::V2::Payments::SettlementAllocationIntents::SplitCreateParams::Amount, metadata: T.nilable(T::Hash[String, String]), type: String).void + params(account: String, amount: ::Stripe::V2::Amount, metadata: T.nilable(T::Hash[String, String]), type: String).void } def initialize(account: nil, amount: nil, metadata: nil, type: nil); end end diff --git a/rbi/stripe/params/v2/tax/manual_rule_create_params.rbi b/rbi/stripe/params/v2/tax/manual_rule_create_params.rbi index 36316efec..2e4319e47 100644 --- a/rbi/stripe/params/v2/tax/manual_rule_create_params.rbi +++ b/rbi/stripe/params/v2/tax/manual_rule_create_params.rbi @@ -69,9 +69,9 @@ module Stripe sig { params(_jurisdiction: T.nilable(String)).returns(T.nilable(String)) } def jurisdiction=(_jurisdiction); end # Percentage of the tax rate. Must be positive and maximum of 4 decimal points. - sig { returns(String) } + sig { returns(BigDecimal) } def percentage; end - sig { params(_percentage: String).returns(String) } + sig { params(_percentage: BigDecimal).returns(BigDecimal) } def percentage=(_percentage); end # State of the tax rate. sig { returns(T.nilable(String)) } @@ -79,7 +79,7 @@ module Stripe sig { params(_state: T.nilable(String)).returns(T.nilable(String)) } def state=(_state); end sig { - params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: String, state: T.nilable(String)).void + params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: BigDecimal, state: T.nilable(String)).void } def initialize( country: nil, @@ -89,6 +89,9 @@ module Stripe percentage: nil, state: nil ); end + def self.field_encodings + @field_encodings = {percentage: :decimal_string} + end end # The tax rates to be applied. sig { @@ -108,6 +111,14 @@ module Stripe params(rates: T::Array[::Stripe::V2::Tax::ManualRuleCreateParams::ScheduledTaxRate::Rate], starts_at: T.nilable(String)).void } def initialize(rates: nil, starts_at: nil); end + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + } + end end # Location where the rule applies. sig { returns(T.nilable(::Stripe::V2::Tax::ManualRuleCreateParams::Location)) } @@ -134,6 +145,22 @@ module Stripe params(location: T.nilable(::Stripe::V2::Tax::ManualRuleCreateParams::Location), products: T.nilable(T::Array[::Stripe::V2::Tax::ManualRuleCreateParams::Product]), scheduled_tax_rates: T::Array[::Stripe::V2::Tax::ManualRuleCreateParams::ScheduledTaxRate]).void } def initialize(location: nil, products: nil, scheduled_tax_rates: nil); end + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/tax/manual_rule_update_params.rbi b/rbi/stripe/params/v2/tax/manual_rule_update_params.rbi index ca5af96b0..960be55b0 100644 --- a/rbi/stripe/params/v2/tax/manual_rule_update_params.rbi +++ b/rbi/stripe/params/v2/tax/manual_rule_update_params.rbi @@ -69,9 +69,9 @@ module Stripe sig { params(_jurisdiction: T.nilable(String)).returns(T.nilable(String)) } def jurisdiction=(_jurisdiction); end # Percentage of the tax rate. Must be positive and maximum of 4 decimal points. - sig { returns(String) } + sig { returns(BigDecimal) } def percentage; end - sig { params(_percentage: String).returns(String) } + sig { params(_percentage: BigDecimal).returns(BigDecimal) } def percentage=(_percentage); end # State of the tax rate. sig { returns(T.nilable(String)) } @@ -79,7 +79,7 @@ module Stripe sig { params(_state: T.nilable(String)).returns(T.nilable(String)) } def state=(_state); end sig { - params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: String, state: T.nilable(String)).void + params(country: T.nilable(String), description: T.nilable(String), display_name: String, jurisdiction: T.nilable(String), percentage: BigDecimal, state: T.nilable(String)).void } def initialize( country: nil, @@ -89,6 +89,9 @@ module Stripe percentage: nil, state: nil ); end + def self.field_encodings + @field_encodings = {percentage: :decimal_string} + end end # The tax rates to be applied. sig { @@ -108,6 +111,14 @@ module Stripe params(rates: T::Array[::Stripe::V2::Tax::ManualRuleUpdateParams::ScheduledTaxRate::Rate], starts_at: T.nilable(String)).void } def initialize(rates: nil, starts_at: nil); end + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + } + end end # Location where the rule applies. sig { returns(T.nilable(::Stripe::V2::Tax::ManualRuleUpdateParams::Location)) } @@ -134,6 +145,22 @@ module Stripe params(location: T.nilable(::Stripe::V2::Tax::ManualRuleUpdateParams::Location), products: T.nilable(T::Array[::Stripe::V2::Tax::ManualRuleUpdateParams::Product]), scheduled_tax_rates: T::Array[::Stripe::V2::Tax::ManualRuleUpdateParams::ScheduledTaxRate]).void } def initialize(location: nil, products: nil, scheduled_tax_rates: nil); end + def self.field_encodings + @field_encodings = { + scheduled_tax_rates: { + kind: :array, + element: { + kind: :object, + fields: { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + }, + }, + }, + } + end end end end diff --git a/rbi/stripe/params/v2/test_helpers/financial_address_credit_params.rbi b/rbi/stripe/params/v2/test_helpers/financial_address_credit_params.rbi index 5a8618f09..1a3bf694e 100644 --- a/rbi/stripe/params/v2/test_helpers/financial_address_credit_params.rbi +++ b/rbi/stripe/params/v2/test_helpers/financial_address_credit_params.rbi @@ -6,26 +6,10 @@ module Stripe module V2 module TestHelpers class FinancialAddressCreditParams < ::Stripe::RequestParams - class Amount < ::Stripe::RequestParams - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - sig { params(_value: Integer).returns(Integer) } - def value=(_value); end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - sig { params(_currency: String).returns(String) } - def currency=(_currency); end - sig { params(value: Integer, currency: String).void } - def initialize(value: nil, currency: nil); end - end # Object containing the amount value and currency to credit. - sig { returns(::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end - sig { - params(_amount: ::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount).returns(::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount) - } + sig { params(_amount: ::Stripe::V2::Amount).returns(::Stripe::V2::Amount) } def amount=(_amount); end # Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. sig { returns(String) } @@ -38,7 +22,7 @@ module Stripe sig { params(_statement_descriptor: T.nilable(String)).returns(T.nilable(String)) } def statement_descriptor=(_statement_descriptor); end sig { - params(amount: ::Stripe::V2::TestHelpers::FinancialAddressCreditParams::Amount, network: String, statement_descriptor: T.nilable(String)).void + params(amount: ::Stripe::V2::Amount, network: String, statement_descriptor: T.nilable(String)).void } def initialize(amount: nil, network: nil, statement_descriptor: nil); end end diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi index 0c27b9c65..6d3999c0f 100644 --- a/rbi/stripe/resources/billing/alert.rbi +++ b/rbi/stripe/resources/billing/alert.rbi @@ -56,7 +56,7 @@ module Stripe sig { returns(String) } def id; end # A positive decimal string representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -64,6 +64,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -94,6 +97,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # The filters allow limiting the scope of this credit balance alert. You must specify only a customer filter at this time. sig { returns(T.nilable(T::Array[Filter])) } @@ -107,6 +115,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + lte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class SpendThreshold < ::Stripe::StripeObject class Filters < ::Stripe::StripeObject @@ -178,7 +194,7 @@ module Stripe sig { returns(String) } def id; end # A positive decimal string representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -186,6 +202,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end # The monetary amount. Present when type is `amount`. sig { returns(T.nilable(Amount)) } @@ -202,6 +221,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # Defines the period over which spend is aggregated. sig { returns(String) } @@ -221,6 +245,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + gte: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class UsageThreshold < ::Stripe::StripeObject class Filter < ::Stripe::StripeObject diff --git a/rbi/stripe/resources/billing/alert_recovered.rbi b/rbi/stripe/resources/billing/alert_recovered.rbi index d119a7ed8..7509524b3 100644 --- a/rbi/stripe/resources/billing/alert_recovered.rbi +++ b/rbi/stripe/resources/billing/alert_recovered.rbi @@ -30,7 +30,7 @@ module Stripe sig { returns(String) } def object; end # The value at which the alert recovered - sig { returns(String) } + sig { returns(BigDecimal) } def value; end end end diff --git a/rbi/stripe/resources/billing/alert_triggered.rbi b/rbi/stripe/resources/billing/alert_triggered.rbi index a8d8c360e..23b4073d3 100644 --- a/rbi/stripe/resources/billing/alert_triggered.rbi +++ b/rbi/stripe/resources/billing/alert_triggered.rbi @@ -70,7 +70,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def triggered_at; end # The value triggering the alert - sig { returns(String) } + sig { returns(BigDecimal) } def value; end end end diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi index 3e39acf32..ae5919d13 100644 --- a/rbi/stripe/resources/billing/credit_balance_summary.rbi +++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi @@ -42,7 +42,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -50,6 +50,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -80,6 +83,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class BalanceUpdateDetails < ::Stripe::StripeObject class LatestMeterEvent < ::Stripe::StripeObject @@ -141,7 +149,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -149,6 +157,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -179,6 +190,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end # Attribute for field available_balance sig { returns(AvailableBalance) } @@ -199,6 +215,18 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + available_balance: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + ledger_balance: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. sig { returns(T::Array[Balance]) } diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi index 7d792b8b8..4e2f1100c 100644 --- a/rbi/stripe/resources/billing/credit_balance_transaction.rbi +++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi @@ -42,7 +42,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -50,6 +50,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -80,6 +83,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class CreditsApplicationInvoiceVoided < ::Stripe::StripeObject # The invoice to which the reinstated billing credits were originally applied. @@ -113,6 +121,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class Debit < ::Stripe::StripeObject class Amount < ::Stripe::StripeObject @@ -150,7 +166,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -158,6 +174,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -188,6 +207,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class CreditsApplied < ::Stripe::StripeObject # The invoice to which the billing credits were applied. @@ -218,6 +242,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index ec56e4a9e..f64e410c4 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -43,7 +43,7 @@ module Stripe sig { returns(String) } def id; end # A positive integer representing the amount. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {custom_pricing_unit_details: CustomPricingUnitDetails} @@ -51,6 +51,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end end class Monetary < ::Stripe::StripeObject # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -81,6 +84,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject class Scope < ::Stripe::StripeObject diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index e81a82b1f..2ca7612c6 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -295,7 +295,7 @@ module Stripe sig { returns(Integer) } def amount_total; end # Exchange rate used to convert source currency amounts to customer currency amounts - sig { returns(String) } + sig { returns(BigDecimal) } def fx_rate; end # Creation currency of the CheckoutSession before localization sig { returns(String) } @@ -306,6 +306,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {fx_rate: :decimal_string} + end end class CustomField < ::Stripe::StripeObject class Dropdown < ::Stripe::StripeObject diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi index 0942d5fc2..26102e0ab 100644 --- a/rbi/stripe/resources/climate/order.rbi +++ b/rbi/stripe/resources/climate/order.rbi @@ -116,7 +116,7 @@ module Stripe sig { returns(T::Hash[String, String]) } def metadata; end # Quantity of carbon removal that is included in this order. - sig { returns(String) } + sig { returns(BigDecimal) } def metric_tons; end # String representing the object's type. Objects of the same type share the same value. sig { returns(String) } diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi index e21863420..8757e2036 100644 --- a/rbi/stripe/resources/climate/product.rbi +++ b/rbi/stripe/resources/climate/product.rbi @@ -42,7 +42,7 @@ module Stripe sig { returns(T::Boolean) } def livemode; end # The quantity of metric tons available for reservation. - sig { returns(String) } + sig { returns(BigDecimal) } def metric_tons_available; end # The Climate product's name. sig { returns(String) } diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi index 4797a5b3c..35a2f6221 100644 --- a/rbi/stripe/resources/credit_note_line_item.rbi +++ b/rbi/stripe/resources/credit_note_line_item.rbi @@ -136,7 +136,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi index 7b488b47b..243ef6afb 100644 --- a/rbi/stripe/resources/invoice_item.rbi +++ b/rbi/stripe/resources/invoice_item.rbi @@ -192,7 +192,7 @@ module Stripe sig { returns(String) } def type; end # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end def self.inner_class_types @inner_class_types = { @@ -205,6 +205,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class ProrationDetails < ::Stripe::StripeObject class DiscountAmount < ::Stripe::StripeObject diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi index b35ce2123..d744f8f3d 100644 --- a/rbi/stripe/resources/invoice_line_item.rbi +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -364,7 +364,7 @@ module Stripe sig { returns(String) } def type; end # The unit amount (in the `currency` specified) of the item which contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end def self.inner_class_types @inner_class_types = { @@ -377,6 +377,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {unit_amount_decimal: :decimal_string} + end end class TaxCalculationReference < ::Stripe::StripeObject # The calculation identifier for tax calculation response. diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi index f6da0e172..d4e7593da 100644 --- a/rbi/stripe/resources/issuing/authorization.rbi +++ b/rbi/stripe/resources/issuing/authorization.rbi @@ -54,7 +54,7 @@ module Stripe class ReportedBreakdown < ::Stripe::StripeObject class Fuel < ::Stripe::StripeObject # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -62,10 +62,13 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::StripeObject # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -73,13 +76,16 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::StripeObject # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -87,6 +93,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } @@ -103,6 +115,19 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { returns(T.nilable(CardholderPromptData)) } @@ -125,6 +150,24 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class FraudChallenge < ::Stripe::StripeObject # The method by which the fraud challenge was delivered to the cardholder. @@ -148,7 +191,7 @@ module Stripe sig { returns(T.nilable(String)) } def industry_product_code; end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end # The type of fuel that was purchased. sig { returns(T.nilable(String)) } @@ -157,7 +200,7 @@ module Stripe sig { returns(T.nilable(String)) } def unit; end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_cost_decimal; end def self.inner_class_types @inner_class_types = {} @@ -165,6 +208,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string} + end end class MerchantData < ::Stripe::StripeObject # A categorization of the seller's type of business. See our [merchant categories guide](https://docs.stripe.com/issuing/merchant-categories) for a list of possible values. diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi index 3188f0813..54a126119 100644 --- a/rbi/stripe/resources/issuing/transaction.rbi +++ b/rbi/stripe/resources/issuing/transaction.rbi @@ -110,7 +110,7 @@ module Stripe class ReportedBreakdown < ::Stripe::StripeObject class Fuel < ::Stripe::StripeObject # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -118,10 +118,13 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class NonFuel < ::Stripe::StripeObject # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def gross_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -129,13 +132,16 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {gross_amount_decimal: :decimal_string} + end end class Tax < ::Stripe::StripeObject # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def local_amount_decimal; end # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def national_amount_decimal; end def self.inner_class_types @inner_class_types = {} @@ -143,6 +149,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + } + end end # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } @@ -159,6 +171,19 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + } + end end # Answers to prompts presented to cardholder at point of sale. sig { returns(T.nilable(CardholderPromptData)) } @@ -181,6 +206,24 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + } + end end class Flight < ::Stripe::StripeObject class Segment < ::Stripe::StripeObject @@ -236,7 +279,7 @@ module Stripe sig { returns(T.nilable(String)) } def industry_product_code; end # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def quantity_decimal; end # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(String) } @@ -245,7 +288,7 @@ module Stripe sig { returns(String) } def unit; end # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - sig { returns(String) } + sig { returns(BigDecimal) } def unit_cost_decimal; end def self.inner_class_types @inner_class_types = {} @@ -253,6 +296,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + quantity_decimal: :decimal_string, + unit_cost_decimal: :decimal_string, + } + end end class Lodging < ::Stripe::StripeObject # The time of checking into the lodging. @@ -318,6 +367,33 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + fleet: { + kind: :object, + fields: { + reported_breakdown: { + kind: :object, + fields: { + fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + non_fuel: {kind: :object, fields: {gross_amount_decimal: :decimal_string}}, + tax: { + kind: :object, + fields: { + local_amount_decimal: :decimal_string, + national_amount_decimal: :decimal_string, + }, + }, + }, + }, + }, + }, + fuel: { + kind: :object, + fields: {quantity_decimal: :decimal_string, unit_cost_decimal: :decimal_string}, + }, + } + end end class Treasury < ::Stripe::StripeObject # The Treasury [ReceivedCredit](https://docs.stripe.com/api/treasury/received_credits) representing this Issuing transaction if it is a refund diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index c425ba81d..8666cdff9 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -4317,9 +4317,6 @@ module Stripe # Bank account verification method. sig { returns(T.nilable(String)) } def verification_method; end - # Preferred transaction settlement speed - sig { returns(T.nilable(String)) } - def preferred_settlement_speed; end def self.inner_class_types @inner_class_types = { financial_connections: FinancialConnections, diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi index 7d44d51f4..2e7cc9e1d 100644 --- a/rbi/stripe/resources/plan.rbi +++ b/rbi/stripe/resources/plan.rbi @@ -17,13 +17,13 @@ module Stripe sig { returns(T.nilable(Integer)) } def flat_amount; end # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } @@ -34,6 +34,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformUsage < ::Stripe::StripeObject # Divide usage by this number. @@ -56,7 +62,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def amount; end # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def amount_decimal; end # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. sig { returns(String) } diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi index baf45bf88..8576875a0 100644 --- a/rbi/stripe/resources/price.rbi +++ b/rbi/stripe/resources/price.rbi @@ -33,13 +33,13 @@ module Stripe sig { returns(T.nilable(Integer)) } def flat_amount; end # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } @@ -50,6 +50,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(CustomUnitAmount)) } @@ -64,7 +70,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def unit_amount; end # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end def self.inner_class_types @inner_class_types = {custom_unit_amount: CustomUnitAmount, tiers: Tier} @@ -72,6 +78,18 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: { + kind: :object, + fields: {flat_amount_decimal: :decimal_string, unit_amount_decimal: :decimal_string}, + }, + }, + unit_amount_decimal: :decimal_string, + } + end end class CustomUnitAmount < ::Stripe::StripeObject # The maximum unit amount the customer can specify for this item. @@ -135,13 +153,13 @@ module Stripe sig { returns(T.nilable(Integer)) } def flat_amount; end # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def flat_amount_decimal; end # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } def unit_amount; end # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } @@ -152,6 +170,12 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + flat_amount_decimal: :decimal_string, + unit_amount_decimal: :decimal_string, + } + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -234,7 +258,7 @@ module Stripe sig { returns(T.nilable(Integer)) } def unit_amount; end # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def unit_amount_decimal; end # Always true for a deleted object sig { returns(T.nilable(T::Boolean)) } diff --git a/rbi/stripe/resources/v2/billing/cadence.rbi b/rbi/stripe/resources/v2/billing/cadence.rbi index 5c6e8f382..0ff890b5a 100644 --- a/rbi/stripe/resources/v2/billing/cadence.rbi +++ b/rbi/stripe/resources/v2/billing/cadence.rbi @@ -199,7 +199,7 @@ module Stripe sig { returns(MaximumApplications) } def maximum_applications; end # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - sig { returns(String) } + sig { returns(BigDecimal) } def percent_off; end def self.inner_class_types @inner_class_types = {maximum_applications: MaximumApplications} @@ -207,6 +207,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_off: :decimal_string} + end end # Unique identifier for the object. sig { returns(String) } @@ -223,6 +226,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + } + end end class Payer < ::Stripe::StripeObject # The ID of the Billing Profile object which determines how a bill will be paid. @@ -429,6 +437,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } @@ -448,6 +459,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + mandate_options: {kind: :object, fields: {amount: :int64_string}}, + } + end end class CustomerBalance < ::Stripe::StripeObject class BankTransfer < ::Stripe::StripeObject @@ -563,6 +579,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, @@ -588,6 +612,19 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + } + end end # Expanded bill settings data with actual configuration values. sig { returns(Bill) } @@ -601,6 +638,24 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + collection: { + kind: :object, + fields: { + payment_method_options: { + kind: :object, + fields: { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + }, + }, + }, + }, + } + end end # The billing cycle is the object that defines future billing cycle dates. sig { returns(BillingCycle) } diff --git a/rbi/stripe/resources/v2/billing/collection_setting.rbi b/rbi/stripe/resources/v2/billing/collection_setting.rbi index b476b17bc..c7b7f94a8 100644 --- a/rbi/stripe/resources/v2/billing/collection_setting.rbi +++ b/rbi/stripe/resources/v2/billing/collection_setting.rbi @@ -86,6 +86,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } @@ -105,6 +108,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::StripeObject class BankTransfer < ::Stripe::StripeObject @@ -220,6 +226,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, diff --git a/rbi/stripe/resources/v2/billing/collection_setting_version.rbi b/rbi/stripe/resources/v2/billing/collection_setting_version.rbi index dcba35bb4..a506db1b2 100644 --- a/rbi/stripe/resources/v2/billing/collection_setting_version.rbi +++ b/rbi/stripe/resources/v2/billing/collection_setting_version.rbi @@ -86,6 +86,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {amount: :int64_string} + end end # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } @@ -105,6 +108,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {mandate_options: {kind: :object, fields: {amount: :int64_string}}} + end end class CustomerBalance < ::Stripe::StripeObject class BankTransfer < ::Stripe::StripeObject @@ -220,6 +226,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + card: { + kind: :object, + fields: {mandate_options: {kind: :object, fields: {amount: :int64_string}}}, + }, + } + end end # Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this # bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, diff --git a/rbi/stripe/resources/v2/billing/intent.rbi b/rbi/stripe/resources/v2/billing/intent.rbi index 875afdba6..73fbfa415 100644 --- a/rbi/stripe/resources/v2/billing/intent.rbi +++ b/rbi/stripe/resources/v2/billing/intent.rbi @@ -10,9 +10,15 @@ module Stripe # previewed before committing, allowing you to see the billing impact before changes take effect. class Intent < APIResource class AmountDetails < ::Stripe::StripeObject + # The outstanding amount after discount, tax, and customer balance application. + sig { returns(String) } + def amount_due; end # Three-letter ISO currency code, in lowercase. Must be a supported currency. sig { returns(String) } def currency; end + # The customer's account balance applied to the amount. + sig { returns(String) } + def customer_balance_applied; end # Amount of discount applied. sig { returns(String) } def discount; end @@ -35,6 +41,17 @@ module Stripe @field_remappings = {} end end + class InvoiceResources < ::Stripe::StripeObject + # ID of a preview invoice showing the breakdown of line items. Null if the billing intent will not create an invoice. Only present when "invoice_resources.preview_invoice" is included. + sig { returns(T.nilable(String)) } + def preview_invoice; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class StatusTransitions < ::Stripe::StripeObject # Time at which the Billing Intent was canceled. sig { returns(T.nilable(String)) } @@ -45,6 +62,9 @@ module Stripe # Time at which the Billing Intent was drafted. sig { returns(T.nilable(String)) } def drafted_at; end + # Time at which the Billing Intent will expire. + sig { returns(String) } + def expires_at; end # Time at which the Billing Intent was reserved. sig { returns(T.nilable(String)) } def reserved_at; end @@ -330,6 +350,9 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end + # Invoice resources associated with this Billing Intent. Populated when include parameters are specified. + sig { returns(T.nilable(InvoiceResources)) } + def invoice_resources; end # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end diff --git a/rbi/stripe/resources/v2/billing/intent_action.rbi b/rbi/stripe/resources/v2/billing/intent_action.rbi index c1c0134da..9c8b0b96b 100644 --- a/rbi/stripe/resources/v2/billing/intent_action.rbi +++ b/rbi/stripe/resources/v2/billing/intent_action.rbi @@ -10,7 +10,30 @@ module Stripe # define what change will be made when the Intent is committed. class IntentAction < APIResource class Apply < ::Stripe::StripeObject + class Discount < ::Stripe::StripeObject + # The ID of the Coupon applied. + sig { returns(T.nilable(String)) } + def coupon; end + # The ID of the created Discount. + sig { returns(T.nilable(String)) } + def discount; end + # The ID of the PromotionCode applied. + sig { returns(T.nilable(String)) } + def promotion_code; end + # Type of the discount. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class EffectiveAt < ::Stripe::StripeObject + # The timestamp at which the apply action will take effect. Only present if type is timestamp. Only allowed for discount actions. + sig { returns(T.nilable(String)) } + def timestamp; end # When the apply action will take effect. sig { returns(String) } def type; end @@ -38,7 +61,7 @@ module Stripe sig { returns(MaximumApplications) } def maximum_applications; end # Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - sig { returns(String) } + sig { returns(BigDecimal) } def percent_off; end def self.inner_class_types @inner_class_types = {maximum_applications: MaximumApplications} @@ -46,6 +69,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_off: :decimal_string} + end end # The entity that the discount rule applies to, for example, the Billing Cadence. sig { returns(String) } @@ -65,6 +91,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + percent_off: {kind: :object, fields: {percent_off: :decimal_string}}, + } + end end class SpendModifierRule < ::Stripe::StripeObject class MaxBillingPeriodSpend < ::Stripe::StripeObject @@ -107,7 +138,7 @@ module Stripe # The maximum amount allowed for the billing period. sig { returns(Amount) } def amount; end - # The configration for the overage rate for the custom pricing unit. + # The configuration for the overage rate for the custom pricing unit. sig { returns(CustomPricingUnitOverageRate) } def custom_pricing_unit_overage_rate; end def self.inner_class_types @@ -139,12 +170,15 @@ module Stripe @field_remappings = {} end end - # When the apply action will take effect. Defaults to on_reserve if not specified. + # When the apply action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(EffectiveAt)) } def effective_at; end # Type of the apply action details. sig { returns(String) } def type; end + # Details for applying a discount. + sig { returns(T.nilable(Discount)) } + def discount; end # Details for applying a discount rule to future invoices. sig { returns(T.nilable(InvoiceDiscountRule)) } def invoice_discount_rule; end @@ -154,6 +188,7 @@ module Stripe def self.inner_class_types @inner_class_types = { effective_at: EffectiveAt, + discount: Discount, invoice_discount_rule: InvoiceDiscountRule, spend_modifier_rule: SpendModifierRule, } @@ -161,6 +196,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + invoice_discount_rule: { + kind: :object, + fields: {percent_off: {kind: :object, fields: {percent_off: :decimal_string}}}, + }, + } + end end class Deactivate < ::Stripe::StripeObject class CancellationDetails < ::Stripe::StripeObject @@ -398,7 +441,7 @@ module Stripe @field_remappings = {} end end - # When the remove action will take effect. Defaults to on_reserve if not specified. + # When the remove action will take effect. If not specified, defaults to on_reserve. sig { returns(T.nilable(EffectiveAt)) } def effective_at; end # Type of the remove action. @@ -522,7 +565,7 @@ module Stripe # The ID of the price object. sig { returns(String) } def price; end - # Quantity for this item. If not provided, will default to 1. + # Quantity for this item. If not provided, defaults to 1. sig { returns(T.nilable(Integer)) } def quantity; end def self.inner_class_types diff --git a/rbi/stripe/resources/v2/billing/license_fee.rbi b/rbi/stripe/resources/v2/billing/license_fee.rbi index ce74cd326..946a1c46f 100644 --- a/rbi/stripe/resources/v2/billing/license_fee.rbi +++ b/rbi/stripe/resources/v2/billing/license_fee.rbi @@ -9,6 +9,21 @@ module Stripe # pricing. Each License Fee defines the pricing structure (flat unit amount or tiered pricing) and service interval. After # creating a License Fee, you can subscribe customers to it by creating a License Fee Subscription. class LicenseFee < APIResource + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class Tier < ::Stripe::StripeObject # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. sig { returns(T.nilable(String)) } @@ -19,7 +34,7 @@ module Stripe def unit_amount; end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -30,6 +45,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -44,6 +62,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Whether this License Fee is active. Inactive License Fees cannot be used in new activations or be modified. sig { returns(T::Boolean) } @@ -62,9 +83,6 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # The ID of the license fee's most recently created version. - sig { returns(String) } - def latest_version; end # A Licensed Item represents a billable item whose pricing is based on license fees. You can use license fees # to specify the pricing and create subscriptions to these items. sig { returns(::Stripe::V2::Billing::LicensedItem) } @@ -81,13 +99,9 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end - # The interval for assessing service. - sig { returns(String) } - def service_interval; end - # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - # order to specify quarterly service. - sig { returns(Integer) } - def service_interval_count; end + # The service cycle configuration for this License Fee. + sig { returns(ServiceCycle) } + def service_cycle; end # The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax. sig { returns(String) } def tax_behavior; end diff --git a/rbi/stripe/resources/v2/billing/license_fee_subscription.rbi b/rbi/stripe/resources/v2/billing/license_fee_subscription.rbi deleted file mode 100644 index bef738afc..000000000 --- a/rbi/stripe/resources/v2/billing/license_fee_subscription.rbi +++ /dev/null @@ -1,45 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -# typed: true -module Stripe - module V2 - module Billing - # A License Fee Subscription represents a customer's subscription to a License Fee at a specified quantity. It tracks - # the number of units (such as seats or licenses) the customer has subscribed to and bills them according to the service - # interval defined in the License Fee and the Billing Cadence. - class LicenseFeeSubscription < APIResource - # The ID of the Billing Cadence. - sig { returns(String) } - def billing_cadence; end - # Timestamp of when the object was created. - sig { returns(String) } - def created; end - # Unique identifier for the object. - sig { returns(String) } - def id; end - # The ID of the License Fee. - sig { returns(String) } - def license_fee; end - # The ID of the License Fee Version. - sig { returns(String) } - def license_fee_version; end - # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - sig { returns(T.nilable(T::Hash[String, String])) } - def metadata; end - # String representing the object's type. Objects of the same type share the same value of the object field. - sig { returns(String) } - def object; end - # Quantity of the License Fee subscribed to. - sig { returns(Integer) } - def quantity; end - # The ID of the Test Clock, if any. - sig { returns(T.nilable(String)) } - def test_clock; 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 - end - end - end -end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/license_fee_version.rbi b/rbi/stripe/resources/v2/billing/license_fee_version.rbi index 527f04a1e..25db2d43e 100644 --- a/rbi/stripe/resources/v2/billing/license_fee_version.rbi +++ b/rbi/stripe/resources/v2/billing/license_fee_version.rbi @@ -19,7 +19,7 @@ module Stripe def unit_amount; end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -30,6 +30,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -44,6 +47,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Timestamp of when the object was created. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/billing/licensed_item.rbi b/rbi/stripe/resources/v2/billing/licensed_item.rbi index 9933d6671..8587caa68 100644 --- a/rbi/stripe/resources/v2/billing/licensed_item.rbi +++ b/rbi/stripe/resources/v2/billing/licensed_item.rbi @@ -29,7 +29,7 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular licensed item. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end diff --git a/rbi/stripe/resources/v2/billing/metered_item.rbi b/rbi/stripe/resources/v2/billing/metered_item.rbi index 5857436af..52ae26675 100644 --- a/rbi/stripe/resources/v2/billing/metered_item.rbi +++ b/rbi/stripe/resources/v2/billing/metered_item.rbi @@ -46,7 +46,7 @@ module Stripe # Optional array of Meter dimensions to group event dimension keys for invoice line items. sig { returns(T::Array[String]) } def invoice_presentation_dimensions; end - # An internal key you can use to search for a particular billable item. + # An internal key you can use to search for a particular metered item. # Maximum length of 200 characters. sig { returns(T.nilable(String)) } def lookup_key; end diff --git a/rbi/stripe/resources/v2/billing/pricing_plan.rbi b/rbi/stripe/resources/v2/billing/pricing_plan.rbi index 80ea2b64d..0778ff632 100644 --- a/rbi/stripe/resources/v2/billing/pricing_plan.rbi +++ b/rbi/stripe/resources/v2/billing/pricing_plan.rbi @@ -28,9 +28,6 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # The ID of the latest version of the PricingPlan. - sig { returns(String) } - def latest_version; end # The ID of the live version of the PricingPlan. sig { returns(T.nilable(String)) } def live_version; end diff --git a/rbi/stripe/resources/v2/billing/pricing_plan_component.rbi b/rbi/stripe/resources/v2/billing/pricing_plan_component.rbi index 12479685e..016ed1dce 100644 --- a/rbi/stripe/resources/v2/billing/pricing_plan_component.rbi +++ b/rbi/stripe/resources/v2/billing/pricing_plan_component.rbi @@ -13,7 +13,7 @@ module Stripe # The ID of the License Fee. sig { returns(String) } def id; end - # The version of the LicenseFee. Defaults to 'latest', if not specified. + # The ID of the License Fee Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end def self.inner_class_types @@ -27,7 +27,7 @@ module Stripe # The ID of the Rate Card. sig { returns(String) } def id; end - # The version of the RateCard. Defaults to 'latest', if not specified. + # The ID of the Rate Card Version. If not specified, defaults to 'latest'. sig { returns(T.nilable(String)) } def version; end def self.inner_class_types diff --git a/rbi/stripe/resources/v2/billing/pricing_plan_subscription.rbi b/rbi/stripe/resources/v2/billing/pricing_plan_subscription.rbi index a5899a71b..871ccc667 100644 --- a/rbi/stripe/resources/v2/billing/pricing_plan_subscription.rbi +++ b/rbi/stripe/resources/v2/billing/pricing_plan_subscription.rbi @@ -49,6 +49,549 @@ module Stripe @field_remappings = {} end end + class DiscountDetail < ::Stripe::StripeObject + class Source < ::Stripe::StripeObject + # The ID of the Coupon. + sig { returns(T.nilable(String)) } + def coupon; end + # Type of the Discount source. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The ID of the Discount. + sig { returns(String) } + def discount; end + # The time at which the Discount ends, if applicable. + sig { returns(T.nilable(String)) } + def end; end + # The ID of the PromotionCode, if applicable. + sig { returns(T.nilable(String)) } + def promotion_code; end + # The source of the Discount. + sig { returns(Source) } + def source; end + # The time at which the Discount starts. + sig { returns(String) } + def start; end + def self.inner_class_types + @inner_class_types = {source: Source} + end + def self.field_remappings + @field_remappings = {} + end + end + class PricingPlanComponentDetail < ::Stripe::StripeObject + class LicenseFeeDetails < ::Stripe::StripeObject + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class Tier < ::Stripe::StripeObject + # Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + sig { returns(T.nilable(String)) } + def flat_amount; end + # Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + # most 12 decimal places. + sig { returns(T.nilable(String)) } + def unit_amount; end + # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + # be set. + sig { returns(T.nilable(BigDecimal)) } + def up_to_decimal; end + # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + sig { returns(T.nilable(String)) } + def up_to_inf; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end + end + class TransformQuantity < ::Stripe::StripeObject + # Divide usage by this number. + sig { returns(Integer) } + def divide_by; end + # After division, round the result up or down. + sig { returns(String) } + def round; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end + end + # Three-letter ISO currency code, in lowercase. + sig { returns(String) } + def currency; end + # A customer-facing name for the license fee. + sig { returns(String) } + def display_name; end + # The ID of the License Fee. + sig { returns(String) } + def license_fee; end + # The ID of the License Fee Version. + sig { returns(String) } + def license_fee_version; end + # Quantity of the license fee on the subscription. + sig { returns(Integer) } + def quantity; end + # The service cycle configuration. + sig { returns(ServiceCycle) } + def service_cycle; end + # Defines whether the tiering price should be graduated or volume-based. + sig { returns(T.nilable(String)) } + def tiering_mode; end + # Each element represents a pricing tier. + sig { returns(T::Array[Tier]) } + def tiers; end + # Apply a transformation to the reported usage or set quantity before computing the amount billed. + sig { returns(T.nilable(TransformQuantity)) } + def transform_quantity; end + # The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. + sig { returns(T.nilable(String)) } + def unit_amount; end + # The unit label from the licensed item, used for display purposes (e.g. "seat", "environment"). + sig { returns(T.nilable(String)) } + def unit_label; end + def self.inner_class_types + @inner_class_types = { + service_cycle: ServiceCycle, + tiers: Tier, + transform_quantity: TransformQuantity, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + } + end + end + class RateCardDetails < ::Stripe::StripeObject + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Three-letter ISO currency code, in lowercase. + sig { returns(String) } + def currency; end + # A customer-facing name for the rate card. + sig { returns(String) } + def display_name; end + # The ID of the Rate Card. + sig { returns(String) } + def rate_card; end + # The ID of the Rate Card Version. + sig { returns(String) } + def rate_card_version; end + # The service cycle configuration. + sig { returns(ServiceCycle) } + def service_cycle; end + # Whether the rates are inclusive or exclusive of tax. + sig { returns(String) } + def tax_behavior; end + def self.inner_class_types + @inner_class_types = {service_cycle: ServiceCycle} + end + def self.field_remappings + @field_remappings = {} + end + end + class RecurringCreditGrantDetails < ::Stripe::StripeObject + class CreditGrantDetails < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + # The Custom Pricing Unit object. + sig { returns(T.nilable(::Stripe::V2::Billing::CustomPricingUnit)) } + def custom_pricing_unit_details; end + # The id of the custom pricing unit. + sig { returns(String) } + def id; end + # The value of the credit grant, decimal value represented as a string. + sig { returns(BigDecimal) } + def value; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end + end + # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + sig { returns(String) } + def type; end + # The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + sig { returns(T.nilable(CustomPricingUnit)) } + def custom_pricing_unit; end + # The monetary amount of the credit grant. Required if `type` is `monetary`. + sig { returns(T.nilable(::Stripe::V2::Amount)) } + def monetary; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end + end + class ApplicabilityConfig < ::Stripe::StripeObject + class Scope < ::Stripe::StripeObject + # The billable items to apply the credit grant to. + sig { returns(T.nilable(T::Array[String])) } + def billable_items; end + # The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + sig { returns(T.nilable(String)) } + def price_type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The applicability scope of the credit grant. + sig { returns(Scope) } + def scope; end + def self.inner_class_types + @inner_class_types = {scope: Scope} + end + def self.field_remappings + @field_remappings = {} + end + end + class ExpiryConfig < ::Stripe::StripeObject + # The type of the expiry configuration. We currently support `end_of_service_period`. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The amount of the credit grant. + sig { returns(Amount) } + def amount; end + # Defines the scope where the credit grant is applicable. + sig { returns(ApplicabilityConfig) } + def applicability_config; end + # The expiry configuration for the credit grant. + sig { returns(ExpiryConfig) } + def expiry_config; end + def self.inner_class_types + @inner_class_types = { + amount: Amount, + applicability_config: ApplicabilityConfig, + expiry_config: ExpiryConfig, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + } + end + end + class CreditGrantPerTenantDetails < ::Stripe::StripeObject + class Amount < ::Stripe::StripeObject + class CustomPricingUnit < ::Stripe::StripeObject + # The Custom Pricing Unit object. + sig { returns(T.nilable(::Stripe::V2::Billing::CustomPricingUnit)) } + def custom_pricing_unit_details; end + # The id of the custom pricing unit. + sig { returns(String) } + def id; end + # The value of the credit grant, decimal value represented as a string. + sig { returns(BigDecimal) } + def value; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {value: :decimal_string} + end + end + # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + sig { returns(String) } + def type; end + # The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + sig { returns(T.nilable(CustomPricingUnit)) } + def custom_pricing_unit; end + # The monetary amount of the credit grant. Required if `type` is `monetary`. + sig { returns(T.nilable(::Stripe::V2::Amount)) } + def monetary; end + def self.inner_class_types + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end + end + class ApplicabilityConfig < ::Stripe::StripeObject + class Scope < ::Stripe::StripeObject + # The billable items to apply the credit grant to. + sig { returns(T.nilable(T::Array[String])) } + def billable_items; end + # The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + sig { returns(T.nilable(String)) } + def price_type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The applicability scope of the credit grant. + sig { returns(Scope) } + def scope; end + def self.inner_class_types + @inner_class_types = {scope: Scope} + end + def self.field_remappings + @field_remappings = {} + end + end + class ExpiryConfig < ::Stripe::StripeObject + # The type of the expiry configuration. We currently support `end_of_service_period`. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The amount of the credit grant. + sig { returns(Amount) } + def amount; end + # Defines the scope where the credit grant is applicable. + sig { returns(ApplicabilityConfig) } + def applicability_config; end + # The expiry configuration for the credit grant. + sig { returns(ExpiryConfig) } + def expiry_config; end + def self.inner_class_types + @inner_class_types = { + amount: Amount, + applicability_config: ApplicabilityConfig, + expiry_config: ExpiryConfig, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + } + end + end + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Credit grant details, present when type is CREDIT_GRANT. + sig { returns(T.nilable(CreditGrantDetails)) } + def credit_grant_details; end + # Credit grant per tenant details, present when type is CREDIT_GRANT_PER_TENANT. + sig { returns(T.nilable(CreditGrantPerTenantDetails)) } + def credit_grant_per_tenant_details; end + # The ID of the Recurring Credit Grant. + sig { returns(String) } + def recurring_credit_grant; end + # The service cycle configuration. + sig { returns(ServiceCycle) } + def service_cycle; end + # The type of the recurring credit grant. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = { + credit_grant_details: CreditGrantDetails, + credit_grant_per_tenant_details: CreditGrantPerTenantDetails, + service_cycle: ServiceCycle, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + } + end + end + # License fee details, present when type is license_fee_details. + sig { returns(T.nilable(LicenseFeeDetails)) } + def license_fee_details; end + # The ID of the Pricing Plan Component. + sig { returns(String) } + def pricing_plan_component; end + # Rate card details, present when type is rate_card_details. + sig { returns(T.nilable(RateCardDetails)) } + def rate_card_details; end + # Recurring credit grant details, present when type is recurring_credit_grant_details. + sig { returns(T.nilable(RecurringCreditGrantDetails)) } + def recurring_credit_grant_details; end + # The type of component details included. + sig { returns(String) } + def type; end + def self.inner_class_types + @inner_class_types = { + license_fee_details: LicenseFeeDetails, + rate_card_details: RateCardDetails, + recurring_credit_grant_details: RecurringCreditGrantDetails, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + license_fee_details: { + kind: :object, + fields: { + tiers: { + kind: :array, + element: {kind: :object, fields: {up_to_decimal: :decimal_string}}, + }, + transform_quantity: {kind: :object, fields: {divide_by: :int64_string}}, + }, + }, + recurring_credit_grant_details: { + kind: :object, + fields: { + credit_grant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + credit_grant_per_tenant_details: { + kind: :object, + fields: { + amount: { + kind: :object, + fields: { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + }, + }, + }, + }, + }, + }, + } + end + end class ServicingStatusTransitions < ::Stripe::StripeObject # When the servicing status transitioned to activated. sig { returns(T.nilable(String)) } @@ -87,6 +630,9 @@ module Stripe # Time at which the object was created. sig { returns(String) } def created; end + # Details about Discounts applied to this subscription. + sig { returns(T.nilable(T::Array[DiscountDetail])) } + def discount_details; end # Unique identifier for the object. sig { returns(String) } def id; end @@ -99,6 +645,9 @@ module Stripe # The ID of the Pricing Plan for this subscription. sig { returns(String) } def pricing_plan; end + # Pricing plan component details for the subscription, populated when pricing_plan_component_details is included. + sig { returns(T.nilable(T::Array[PricingPlanComponentDetail])) } + def pricing_plan_component_details; end # The ID of the Pricing Plan Version for this subscription. sig { returns(String) } def pricing_plan_version; end diff --git a/rbi/stripe/resources/v2/billing/pricing_plan_subscription_components.rbi b/rbi/stripe/resources/v2/billing/pricing_plan_subscription_components.rbi deleted file mode 100644 index 35f1c3fae..000000000 --- a/rbi/stripe/resources/v2/billing/pricing_plan_subscription_components.rbi +++ /dev/null @@ -1,42 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -# typed: true -module Stripe - module V2 - module Billing - # A set of component subscriptions for a Pricing Plan Subscription. - class PricingPlanSubscriptionComponents < APIResource - class Component < ::Stripe::StripeObject - # The Pricing Plan Component associated with this component subscription. - sig { returns(String) } - def pricing_plan_component; end - # The type of subscription. - sig { returns(String) } - def type; end - # The ID of the License Fee Subscription. - sig { returns(T.nilable(String)) } - def license_fee_subscription; end - # The ID of the Rate Card Subscription. - sig { returns(T.nilable(String)) } - def rate_card_subscription; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - # The component subscriptions of the Pricing Plan Subscription. - sig { returns(T::Array[Component]) } - def components; end - # String representing the object's type. Objects of the same type share the same value of the object field. - sig { returns(String) } - def object; 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 - end - end - end -end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/rate_card.rbi b/rbi/stripe/resources/v2/billing/rate_card.rbi index d4c759e77..1dc6f9cb5 100644 --- a/rbi/stripe/resources/v2/billing/rate_card.rbi +++ b/rbi/stripe/resources/v2/billing/rate_card.rbi @@ -9,6 +9,21 @@ module Stripe # defines how much to charge for usage of that item. After you've set up a RateCard, you can subscribe customers to it # by creating a Rate Card Subscription. class RateCard < APIResource + class ServiceCycle < ::Stripe::StripeObject + # The interval for assessing service. + sig { returns(String) } + def interval; end + # The length of the interval for assessing service. For example, set this to 3 and `interval` to `"month"` in + # order to specify quarterly service. + sig { returns(Integer) } + def interval_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end # Whether this RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added. sig { returns(T::Boolean) } def active; end @@ -26,9 +41,6 @@ module Stripe # Unique identifier for the object. sig { returns(String) } def id; end - # The ID of this rate card's most recently created version. - sig { returns(String) } - def latest_version; end # The ID of the Rate Card Version that will be used by all subscriptions when no specific version is specified. sig { returns(String) } def live_version; end @@ -41,16 +53,12 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end - # The interval for assessing service. For example, a monthly Rate Card with a rate of $1 for the first 10 "workloads" - # and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but - # distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, - # while the billing interval in Cadence deals with the rate the customer is billed. - sig { returns(String) } - def service_interval; end - # The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - # order to specify quarterly service. - sig { returns(Integer) } - def service_interval_count; end + # The service cycle configuration for this Rate Card. For example, a monthly Rate Card with a rate of $1 for the + # first 10 "workloads" and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." + # This is similar to but distinct from billing interval; the service interval deals with the rate at which the + # customer accumulates fees, while the billing interval in Cadence deals with the rate the customer is billed. + sig { returns(ServiceCycle) } + def service_cycle; end # The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax. sig { returns(String) } def tax_behavior; end diff --git a/rbi/stripe/resources/v2/billing/rate_card_rate.rbi b/rbi/stripe/resources/v2/billing/rate_card_rate.rbi index 2b6d2d870..74dc33b28 100644 --- a/rbi/stripe/resources/v2/billing/rate_card_rate.rbi +++ b/rbi/stripe/resources/v2/billing/rate_card_rate.rbi @@ -36,7 +36,7 @@ module Stripe def unit_amount; end # Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may # be set. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def up_to_decimal; end # No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. sig { returns(T.nilable(String)) } @@ -47,6 +47,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {up_to_decimal: :decimal_string} + end end class TransformQuantity < ::Stripe::StripeObject # Divide usage by this number. @@ -61,6 +64,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {divide_by: :int64_string} + end end # Timestamp of when the object was created. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/billing/service_action.rbi b/rbi/stripe/resources/v2/billing/service_action.rbi index 5bf78aa69..7f4b349c2 100644 --- a/rbi/stripe/resources/v2/billing/service_action.rbi +++ b/rbi/stripe/resources/v2/billing/service_action.rbi @@ -17,7 +17,7 @@ module Stripe sig { returns(String) } def id; end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {} @@ -25,19 +25,8 @@ module Stripe def self.field_remappings @field_remappings = {} end - end - class Monetary < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = {value: :decimal_string} end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -47,14 +36,19 @@ module Stripe sig { returns(T.nilable(CustomPricingUnit)) } def custom_pricing_unit; end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { returns(T.nilable(Monetary)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end def self.inner_class_types - @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} end def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject class Scope < ::Stripe::StripeObject @@ -120,6 +114,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end class CreditGrantPerTenant < ::Stripe::StripeObject class Amount < ::Stripe::StripeObject @@ -131,7 +133,7 @@ module Stripe sig { returns(String) } def id; end # The value of the credit grant, decimal value represented as a string. - sig { returns(String) } + sig { returns(BigDecimal) } def value; end def self.inner_class_types @inner_class_types = {} @@ -139,19 +141,8 @@ module Stripe def self.field_remappings @field_remappings = {} end - end - class Monetary < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} + def self.field_encodings + @field_encodings = {value: :decimal_string} end end # The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. @@ -161,14 +152,19 @@ module Stripe sig { returns(T.nilable(CustomPricingUnit)) } def custom_pricing_unit; end # The monetary amount of the credit grant. Required if `type` is `monetary`. - sig { returns(T.nilable(Monetary)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def monetary; end def self.inner_class_types - @inner_class_types = {custom_pricing_unit: CustomPricingUnit, monetary: Monetary} + @inner_class_types = {custom_pricing_unit: CustomPricingUnit} end def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}, + } + end end class ApplicabilityConfig < ::Stripe::StripeObject class Scope < ::Stripe::StripeObject @@ -234,6 +230,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + amount: { + kind: :object, + fields: {custom_pricing_unit: {kind: :object, fields: {value: :decimal_string}}}, + }, + } + end end # Timestamp of when the object was created. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/core/account.rbi b/rbi/stripe/resources/v2/core/account.rbi index a1507ce09..8a05aea82 100644 --- a/rbi/stripe/resources/v2/core/account.rbi +++ b/rbi/stripe/resources/v2/core/account.rbi @@ -3491,6 +3491,9 @@ module Stripe # Default responsibilities held by either Stripe or the platform. sig { returns(Responsibilities) } def responsibilities; end + # The Account's local timezone. A list of possible time zone values is maintained at the [IANA Time Zone Database](https://www.iana.org/time-zones). + sig { returns(T.nilable(String)) } + def timezone; end def self.inner_class_types @inner_class_types = {profile: Profile, responsibilities: Responsibilities} end @@ -4912,28 +4915,14 @@ module Stripe end end class AnnualRevenue < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). - sig { returns(T.nilable(Amount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. sig { returns(T.nilable(String)) } def fiscal_year_end; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -5157,25 +5146,11 @@ module Stripe end end class MonthlyEstimatedRevenue < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 USD). - sig { returns(T.nilable(Amount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -5643,7 +5618,7 @@ module Stripe sig { returns(T.nilable(T::Boolean)) } def owner; end # The percentage of the Account's identity that the individual owns. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end # Whether the individual is authorized as the primary representative of the Account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } @@ -5657,6 +5632,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::StripeObject class Kana < ::Stripe::StripeObject @@ -5858,6 +5836,11 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + } + end end # Attestations from the identity's key people, e.g. owners, executives, directors, representatives. sig { returns(T.nilable(Attestations)) } @@ -5884,6 +5867,16 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + individual: { + kind: :object, + fields: { + relationship: {kind: :object, fields: {percent_ownership: :decimal_string}}, + }, + }, + } + end end class Requirements < ::Stripe::StripeObject class Entry < ::Stripe::StripeObject diff --git a/rbi/stripe/resources/v2/core/account_evaluation.rbi b/rbi/stripe/resources/v2/core/account_evaluation.rbi new file mode 100644 index 000000000..82cce353a --- /dev/null +++ b/rbi/stripe/resources/v2/core/account_evaluation.rbi @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + # Account Evaluation resource. + class AccountEvaluation < APIResource + class AccountData < ::Stripe::StripeObject + class Defaults < ::Stripe::StripeObject + class Profile < ::Stripe::StripeObject + # The business URL. + sig { returns(String) } + def business_url; end + # Doing business as (DBA) name. + sig { returns(T.nilable(String)) } + def doing_business_as; end + # Description of the account's product or service. + sig { returns(T.nilable(String)) } + def product_description; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Account profile data. + sig { returns(Profile) } + def profile; end + def self.inner_class_types + @inner_class_types = {profile: Profile} + end + def self.field_remappings + @field_remappings = {} + end + end + class Identity < ::Stripe::StripeObject + class BusinessDetails < ::Stripe::StripeObject + # Registered business name. + sig { returns(T.nilable(String)) } + def registered_name; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # Business details for identity data. + sig { returns(BusinessDetails) } + def business_details; end + def self.inner_class_types + @inner_class_types = {business_details: BusinessDetails} + end + def self.field_remappings + @field_remappings = {} + end + end + # Default account settings. + sig { returns(T.nilable(Defaults)) } + def defaults; end + # Identity data. + sig { returns(T.nilable(Identity)) } + def identity; end + def self.inner_class_types + @inner_class_types = {defaults: Defaults, identity: Identity} + end + def self.field_remappings + @field_remappings = {} + end + end + # The account ID if this evaluation is for an existing account. + sig { returns(T.nilable(String)) } + def account; end + # Account data if this evaluation is for an account without an existing Stripe entity. + sig { returns(T.nilable(AccountData)) } + def account_data; end + # Timestamp at which the evaluation was created. + sig { returns(String) } + def created; end + # List of signals that were triggered for evaluation. + sig { returns(T::Array[String]) } + def evaluations_triggered; end + # Unique identifier for the account evaluation. + sig { returns(String) } + def id; end + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } + def object; 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 + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/core/account_person.rbi b/rbi/stripe/resources/v2/core/account_person.rbi index 3d222e517..147a98f61 100644 --- a/rbi/stripe/resources/v2/core/account_person.rbi +++ b/rbi/stripe/resources/v2/core/account_person.rbi @@ -288,7 +288,7 @@ module Stripe sig { returns(T.nilable(T::Boolean)) } def owner; end # The percentage of the Account's identity that the individual owns. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(BigDecimal)) } def percent_ownership; end # Whether the individual is authorized as the primary representative of the Account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } @@ -302,6 +302,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percent_ownership: :decimal_string} + end end class ScriptAddresses < ::Stripe::StripeObject class Kana < ::Stripe::StripeObject diff --git a/rbi/stripe/resources/v2/core/batch_job.rbi b/rbi/stripe/resources/v2/core/batch_job.rbi new file mode 100644 index 000000000..c46c6da9d --- /dev/null +++ b/rbi/stripe/resources/v2/core/batch_job.rbi @@ -0,0 +1,422 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + # BatchJob resource. + class BatchJob < APIResource + class StatusDetails < ::Stripe::StripeObject + class BatchFailed < ::Stripe::StripeObject + # Details about the `BatchJob` failure. + sig { returns(String) } + def error; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class Canceled < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + class Complete < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + class InProgress < ::Stripe::StripeObject + # The number of records that failed processing so far. + sig { returns(Integer) } + def failure_count; end + # The number of records that were successfully processed so far. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {failure_count: :int64_string, success_count: :int64_string} + end + end + class ReadyForUpload < ::Stripe::StripeObject + class UploadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The upload file details. + sig { returns(UploadUrl) } + def upload_url; end + def self.inner_class_types + @inner_class_types = {upload_url: UploadUrl} + end + def self.field_remappings + @field_remappings = {} + end + end + class Timeout < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + class Validating < ::Stripe::StripeObject + # The number of records that were validated. Note that there is no failure counter here; + # once we have any validation failures we give up. + sig { returns(Integer) } + def validated_count; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {validated_count: :int64_string} + end + end + class ValidationFailed < ::Stripe::StripeObject + class OutputFile < ::Stripe::StripeObject + class DownloadUrl < ::Stripe::StripeObject + # The time that the URL expires. + sig { returns(T.nilable(String)) } + def expires_at; end + # The URL that can be used for accessing the file. + sig { returns(String) } + def url; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + # The content type of the file. + sig { returns(String) } + def content_type; end + # A pre-signed URL that allows secure, time-limited access to download the file. + sig { returns(DownloadUrl) } + def download_url; end + # The total size of the file in bytes. + sig { returns(Integer) } + def size; end + def self.inner_class_types + @inner_class_types = {download_url: DownloadUrl} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = {size: :int64_string} + end + end + # The total number of records that failed processing. + sig { returns(Integer) } + def failure_count; end + # The output file details. If BatchJob is cancelled it's provided only if there is already output at this point. + sig { returns(OutputFile) } + def output_file; end + # The total number of records that were successfully processed. + sig { returns(Integer) } + def success_count; end + def self.inner_class_types + @inner_class_types = {output_file: OutputFile} + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + } + end + end + # Additional details for the `BATCH_FAILED` status of the `BatchJob`. + sig { returns(T.nilable(BatchFailed)) } + def batch_failed; end + # Additional details for the `CANCELED` status of the `BatchJob`. + sig { returns(T.nilable(Canceled)) } + def canceled; end + # Additional details for the `COMPLETE` status of the `BatchJob`. + sig { returns(T.nilable(Complete)) } + def complete; end + # Additional details for the `IN_PROGRESS` status of the `BatchJob`. + sig { returns(T.nilable(InProgress)) } + def in_progress; end + # Additional details for the `READY_FOR_UPLOAD` status of the `BatchJob`. + sig { returns(T.nilable(ReadyForUpload)) } + def ready_for_upload; end + # Additional details for the `TIMEOUT` status of the `BatchJob`. + sig { returns(T.nilable(Timeout)) } + def timeout; end + # Additional details for the `VALIDATING` status of the `BatchJob`. + sig { returns(T.nilable(Validating)) } + def validating; end + # Additional details for the `VALIDATION_FAILED` status of the `BatchJob`. + sig { returns(T.nilable(ValidationFailed)) } + def validation_failed; end + def self.inner_class_types + @inner_class_types = { + batch_failed: BatchFailed, + canceled: Canceled, + complete: Complete, + in_progress: InProgress, + ready_for_upload: ReadyForUpload, + timeout: Timeout, + validating: Validating, + validation_failed: ValidationFailed, + } + end + def self.field_remappings + @field_remappings = {} + end + def self.field_encodings + @field_encodings = { + canceled: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + complete: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + in_progress: { + kind: :object, + fields: {failure_count: :int64_string, success_count: :int64_string}, + }, + timeout: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + validating: {kind: :object, fields: {validated_count: :int64_string}}, + validation_failed: { + kind: :object, + fields: { + failure_count: :int64_string, + output_file: {kind: :object, fields: {size: :int64_string}}, + success_count: :int64_string, + }, + }, + } + end + end + # Timestamp at which BatchJob was created. + sig { returns(String) } + def created; end + # Unique identifier for the BatchJob. + sig { returns(String) } + def id; end + # The maximum rps defined for the `BatchJob`. + sig { returns(Integer) } + def maximum_rps; end + # The metadata of the `BatchJob` object. + sig { returns(T::Hash[String, String]) } + def metadata; end + # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } + def object; end + # If the validation will be run previous to the execution of the `BatchJob`. + sig { returns(T::Boolean) } + def skip_validation; end + # The current status of the `BatchJob`. + sig { returns(String) } + def status; end + # Additional details about the current state of the `BatchJob`. + sig { returns(T.nilable(StatusDetails)) } + def status_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 + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/core/event_destination.rbi b/rbi/stripe/resources/v2/core/event_destination.rbi index 2d6d5a594..b60a676ce 100644 --- a/rbi/stripe/resources/v2/core/event_destination.rbi +++ b/rbi/stripe/resources/v2/core/event_destination.rbi @@ -46,6 +46,29 @@ module Stripe @field_remappings = {} end end + class AzureEventGrid < ::Stripe::StripeObject + # The name of the Azure partner topic. + sig { returns(String) } + def azure_partner_topic_name; end + # The status of the Azure partner topic. + sig { returns(String) } + def azure_partner_topic_status; end + # The Azure region. + sig { returns(String) } + def azure_region; end + # The name of the Azure resource group. + sig { returns(String) } + def azure_resource_group_name; end + # The Azure subscription ID. + sig { returns(String) } + def azure_subscription_id; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end class WebhookEndpoint < ::Stripe::StripeObject # The signing secret of the webhook endpoint, only includable on creation. sig { returns(T.nilable(String)) } @@ -72,7 +95,11 @@ module Stripe # Payload type of events being subscribed to. sig { returns(String) } def event_payload; end - # Where events should be routed from. + # Specifies which accounts' events route to this destination. + # `@self`: Receive events from the account that owns the event destination. + # `@accounts`: Receive events emitted from other accounts you manage which includes your v1 and v2 accounts. + # `@organization_members`: Receive events from accounts directly linked to the organization. + # `@organization_members/@accounts`: Receive events from all accounts connected to any platform accounts in the organization. sig { returns(T.nilable(T::Array[String])) } def events_from; end # Unique identifier for the object. @@ -108,6 +135,9 @@ module Stripe # Amazon EventBridge configuration. sig { returns(T.nilable(AmazonEventbridge)) } def amazon_eventbridge; end + # Azure Event Grid configuration. + sig { returns(T.nilable(AzureEventGrid)) } + def azure_event_grid; end # Webhook endpoint configuration. sig { returns(T.nilable(WebhookEndpoint)) } def webhook_endpoint; end diff --git a/rbi/stripe/resources/v2/core/vault/gb_bank_account.rbi b/rbi/stripe/resources/v2/core/vault/gb_bank_account.rbi index a8da1115a..980855c19 100644 --- a/rbi/stripe/resources/v2/core/vault/gb_bank_account.rbi +++ b/rbi/stripe/resources/v2/core/vault/gb_bank_account.rbi @@ -119,8 +119,11 @@ module Stripe sig { returns(String) } def object; end # The Sort Code of the bank account. - sig { returns(String) } + sig { returns(T.nilable(String)) } def sort_code; end + # The list of currencies supported by this bank account. + sig { returns(T::Array[String]) } + def supported_currencies; 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/core/vault/us_bank_account.rbi b/rbi/stripe/resources/v2/core/vault/us_bank_account.rbi index a09463b28..fb08a211d 100644 --- a/rbi/stripe/resources/v2/core/vault/us_bank_account.rbi +++ b/rbi/stripe/resources/v2/core/vault/us_bank_account.rbi @@ -88,6 +88,9 @@ module Stripe # The ACH routing number of the bank account. sig { returns(T.nilable(String)) } def routing_number; end + # The list of currencies supported by this bank account. + sig { returns(T::Array[String]) } + def supported_currencies; end # The bank account verification details. sig { returns(Verification) } def verification; end diff --git a/rbi/stripe/resources/v2/financial_address_generated_microdeposits.rbi b/rbi/stripe/resources/v2/financial_address_generated_microdeposits.rbi index d69d1464d..5cd059f5f 100644 --- a/rbi/stripe/resources/v2/financial_address_generated_microdeposits.rbi +++ b/rbi/stripe/resources/v2/financial_address_generated_microdeposits.rbi @@ -6,22 +6,8 @@ module Stripe module V2 # Generated Microdeposits represent verification deposits sent to a financial address for ownership verification, containing the deposited amounts and status. class FinancialAddressGeneratedMicrodeposits < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The amounts of the microdeposits that were generated. - sig { returns(T::Array[Amount]) } + sig { returns(T::Array[::Stripe::V2::Amount]) } def amounts; end # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/money_management/adjustment.rbi b/rbi/stripe/resources/v2/money_management/adjustment.rbi index ebab33625..b13fd9aeb 100644 --- a/rbi/stripe/resources/v2/money_management/adjustment.rbi +++ b/rbi/stripe/resources/v2/money_management/adjustment.rbi @@ -36,25 +36,11 @@ module Stripe @field_remappings = {} end end - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # If applicable, contains information about the original flow linked to this Adjustment. sig { returns(T.nilable(AdjustedFlow)) } def adjusted_flow; end # The amount of the Adjustment. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/money_management/currency_conversion.rbi b/rbi/stripe/resources/v2/money_management/currency_conversion.rbi index 1cf58a7d3..c5a6939c1 100644 --- a/rbi/stripe/resources/v2/money_management/currency_conversion.rbi +++ b/rbi/stripe/resources/v2/money_management/currency_conversion.rbi @@ -8,50 +8,22 @@ module Stripe # The CurrencyConversion object. Contains details such as the amount debited and credited and the FinancialAccount the CurrencyConversion was performed on. class CurrencyConversion < APIResource class From < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount object. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end class To < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount object. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} diff --git a/rbi/stripe/resources/v2/money_management/financial_account.rbi b/rbi/stripe/resources/v2/money_management/financial_account.rbi index 2ab2268a4..344c1fb2e 100644 --- a/rbi/stripe/resources/v2/money_management/financial_account.rbi +++ b/rbi/stripe/resources/v2/money_management/financial_account.rbi @@ -22,63 +22,17 @@ module Stripe end end class Balance < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Balance that can be used for money movement. - sig { returns(T::Hash[String, Available]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def available; end # Balance of inbound funds that will later transition to the `available` balance. - sig { returns(T::Hash[String, InboundPending]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def inbound_pending; end # Balance of funds that are being used for a pending outbound money movement. - sig { returns(T::Hash[String, OutboundPending]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def outbound_pending; end def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -107,14 +61,34 @@ module Stripe end end class Payments < ::Stripe::StripeObject - class StartingBalance < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end + class BalanceByFundsType < ::Stripe::StripeObject + class PaymentProcessing < ::Stripe::StripeObject + # Balance that can be used for money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def available; end + # Balance of inbound funds that will later transition to the `available` balance. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def inbound_pending; end + # Balance of funds that are being used for a pending outbound money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def outbound_pending; end + def self.inner_class_types + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class StoredValue < ::Stripe::StripeObject + # Balance that can be used for money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def available; end + # Balance of inbound funds that will later transition to the `available` balance. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def inbound_pending; end + # Balance of funds that are being used for a pending outbound money movement. + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } + def outbound_pending; end def self.inner_class_types @inner_class_types = {} end @@ -122,19 +96,40 @@ module Stripe @field_remappings = {} end end + # Payment processing funds are those that are received for goods or services and may only be used for payouts to self. These funds may be converted to stored value funds. + sig { returns(PaymentProcessing) } + def payment_processing; end + # Stored value funds may be used for either payouts to self or payments to others. + sig { returns(StoredValue) } + def stored_value; end + def self.inner_class_types + @inner_class_types = { + payment_processing: PaymentProcessing, + stored_value: StoredValue, + } + end + def self.field_remappings + @field_remappings = {} + end + end + class StartingBalance < ::Stripe::StripeObject # When the balance was projected. sig { returns(String) } def at; end # The available balance at the time when the balance was projected. - sig { returns(T::Hash[String, Available]) } + sig { returns(T::Hash[String, ::Stripe::V2::Amount]) } def available; end def self.inner_class_types - @inner_class_types = {available: Available} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end + # The balance of the `payments` FinancialAccount is a mix of payment processing and stored value funds, and this field + # describes the breakdown between the two. The sum will match the balance of the FinancialAccount. + sig { returns(T.nilable(BalanceByFundsType)) } + def balance_by_funds_type; end # The currency that non-settlement currency payments will be converted to. sig { returns(String) } def default_currency; end @@ -145,7 +140,10 @@ module Stripe sig { returns(T.nilable(StartingBalance)) } def starting_balance; end def self.inner_class_types - @inner_class_types = {starting_balance: StartingBalance} + @inner_class_types = { + balance_by_funds_type: BalanceByFundsType, + starting_balance: StartingBalance, + } end def self.field_remappings @field_remappings = {} @@ -167,10 +165,10 @@ module Stripe @field_remappings = {} end end - # Attribute for field forwarding_settings + # The forwarding settings for the closed FinancialAccount. sig { returns(T.nilable(ForwardingSettings)) } def forwarding_settings; end - # Attribute for field reason + # The reason the FinancialAccount was closed. sig { returns(String) } def reason; end def self.inner_class_types @@ -180,7 +178,7 @@ module Stripe @field_remappings = {} end end - # Attribute for field closed + # Details related to the closed state of the FinancialAccount. sig { returns(T.nilable(Closed)) } def closed; end def self.inner_class_types @@ -241,7 +239,7 @@ module Stripe # Closed Enum. An enum representing the status of the FinancialAccount. This indicates whether or not the FinancialAccount can be used for any money movement flows. sig { returns(String) } def status; end - # Attribute for field status_details + # Additional details related to the status of the FinancialAccount. sig { returns(T.nilable(StatusDetails)) } def status_details; end # If this is a `storage` FinancialAccount, this hash includes details specific to `storage` FinancialAccounts. diff --git a/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi b/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi index 80ed6e282..576cc9546 100644 --- a/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi +++ b/rbi/stripe/resources/v2/money_management/inbound_transfer.rbi @@ -8,35 +8,7 @@ module Stripe # An InboundTransfer object, representing a money movement from a # user owned PaymentMethod to a FinancialAccount belonging to the same user. class InboundTransfer < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class PaymentMethod < ::Stripe::StripeObject # The type of object this destination represents. For a us bank account, we expect us_bank_account. sig { returns(String) } @@ -52,41 +24,27 @@ module Stripe end end # The amount in specified currency that was debited from the Payment Method. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The Payment Method object used to create the InboundTransfer. sig { returns(PaymentMethod) } def payment_method; end def self.inner_class_types - @inner_class_types = {debited: Debited, payment_method: PaymentMethod} + @inner_class_types = {payment_method: PaymentMethod} end def self.field_remappings @field_remappings = {} end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The amount by which the FinancialAccount balance is credited. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The FinancialAccount that funds will land in. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -156,7 +114,7 @@ module Stripe end end # The amount in specified currency that will land in the FinancialAccount balance. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Creation time of the InboundTransfer. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/money_management/outbound_payment.rbi b/rbi/stripe/resources/v2/money_management/outbound_payment.rbi index 3e1b05c00..bd780624d 100644 --- a/rbi/stripe/resources/v2/money_management/outbound_payment.rbi +++ b/rbi/stripe/resources/v2/money_management/outbound_payment.rbi @@ -7,20 +7,6 @@ module Stripe module MoneyManagement # OutboundPayment represents a single money movement from one FinancialAccount you own to a payout method someone else owns. class OutboundPayment < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class DeliveryOptions < ::Stripe::StripeObject class PaperCheck < ::Stripe::StripeObject # Memo printed on the memo field of the check. @@ -56,28 +42,14 @@ module Stripe end end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The FinancialAccount that funds were pulled from. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {debited: Debited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -156,22 +128,8 @@ module Stripe end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The payout method which the OutboundPayment uses to send payout. sig { returns(String) } @@ -180,7 +138,7 @@ module Stripe sig { returns(String) } def recipient; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -273,7 +231,7 @@ module Stripe end end # The "presentment amount" for the OutboundPayment. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Returns true if the OutboundPayment can be canceled, and false otherwise. sig { returns(T::Boolean) } 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 dd1864907..ac97925d6 100644 --- a/rbi/stripe/resources/v2/money_management/outbound_payment_quote.rbi +++ b/rbi/stripe/resources/v2/money_management/outbound_payment_quote.rbi @@ -7,20 +7,6 @@ module Stripe module MoneyManagement # OutboundPaymentQuote represents a quote that provides fee and amount estimates for OutboundPayment. class OutboundPaymentQuote < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class DeliveryOptions < ::Stripe::StripeObject # Open Enum. Speed of the payout. sig { returns(T.nilable(String)) } @@ -36,56 +22,28 @@ module Stripe end end class EstimatedFee < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The fee amount for corresponding fee type. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The fee type. sig { returns(String) } def type; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The FinancialAccount that funds were pulled from. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {debited: Debited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -126,22 +84,8 @@ module Stripe end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The payout method which the OutboundPayment uses to send payout. sig { returns(String) } @@ -150,14 +94,14 @@ module Stripe sig { returns(String) } def recipient; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end # The "presentment amount" for the OutboundPaymentQuote. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Time at which the OutboundPaymentQuote was created. # Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. diff --git a/rbi/stripe/resources/v2/money_management/outbound_transfer.rbi b/rbi/stripe/resources/v2/money_management/outbound_transfer.rbi index 6be03901f..3b693a105 100644 --- a/rbi/stripe/resources/v2/money_management/outbound_transfer.rbi +++ b/rbi/stripe/resources/v2/money_management/outbound_transfer.rbi @@ -7,20 +7,6 @@ module Stripe module MoneyManagement # OutboundTransfer represents a single money movement from one FinancialAccount you own to a payout method you also own. class OutboundTransfer < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class DeliveryOptions < ::Stripe::StripeObject # Open Enum. Method for bank account. sig { returns(T.nilable(String)) } @@ -33,28 +19,14 @@ module Stripe end end class From < ::Stripe::StripeObject - class Debited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount debited from the sender, only set on responses. - sig { returns(Debited) } + sig { returns(::Stripe::V2::Amount) } def debited; end # The FinancialAccount that funds were pulled from. sig { returns(String) } def financial_account; end def self.inner_class_types - @inner_class_types = {debited: Debited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -121,28 +93,14 @@ module Stripe end end class To < ::Stripe::StripeObject - class Credited < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # The monetary amount being credited to the destination. - sig { returns(Credited) } + sig { returns(::Stripe::V2::Amount) } def credited; end # The payout method which the OutboundTransfer uses to send payout. sig { returns(String) } def payout_method; end def self.inner_class_types - @inner_class_types = {credited: Credited} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -166,7 +124,7 @@ module Stripe end end # The "presentment amount" for the OutboundTransfer. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Returns true if the OutboundTransfer can be canceled, and false otherwise. sig { returns(T::Boolean) } diff --git a/rbi/stripe/resources/v2/money_management/payout_method.rbi b/rbi/stripe/resources/v2/money_management/payout_method.rbi index 00f96aba2..179de38a7 100644 --- a/rbi/stripe/resources/v2/money_management/payout_method.rbi +++ b/rbi/stripe/resources/v2/money_management/payout_method.rbi @@ -97,6 +97,9 @@ module Stripe # The last 4 digits of the card number. sig { returns(String) } def last4; end + # The list of currencies supported by this bank account. + sig { returns(T::Array[String]) } + def supported_currencies; end def self.inner_class_types @inner_class_types = {} end @@ -144,6 +147,10 @@ module Stripe # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end + # Whether the Payout Method is currently unusable for money movement, despite potentially being correctly set up. + # Please reach out to Stripe Support for more information. + sig { returns(T::Boolean) } + def restricted; end # Closed Enum. The type of payout method. sig { returns(String) } def type; end diff --git a/rbi/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rbi b/rbi/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rbi index 8d4dd1cd6..b99df9e14 100644 --- a/rbi/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rbi +++ b/rbi/stripe/resources/v2/money_management/payout_methods_bank_account_spec.rbi @@ -23,6 +23,9 @@ module Stripe @field_remappings = {} end end + # The currencies supported by the corresponding credentials for bank accounts in the specified country. + sig { returns(T.nilable(T::Array[String])) } + def currencies; end # The local name of the field. sig { returns(String) } def local_name; end diff --git a/rbi/stripe/resources/v2/money_management/received_credit.rbi b/rbi/stripe/resources/v2/money_management/received_credit.rbi index d15ea5bcd..c7ac59e11 100644 --- a/rbi/stripe/resources/v2/money_management/received_credit.rbi +++ b/rbi/stripe/resources/v2/money_management/received_credit.rbi @@ -7,34 +7,6 @@ module Stripe module MoneyManagement # Use ReceivedCredits API to retrieve information on when, where, and how funds are sent into your FinancialAccount. class ReceivedCredit < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class ExternalAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class StatusDetails < ::Stripe::StripeObject class Failed < ::Stripe::StripeObject # Open Enum. The `failed` status reason. @@ -267,7 +239,7 @@ module Stripe end end # The amount and currency of the ReceivedCredit. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Time at which the ReceivedCredit was created. # Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. @@ -277,7 +249,7 @@ module Stripe sig { returns(T.nilable(String)) } def description; end # The amount and currency of the original/external credit request. - sig { returns(T.nilable(ExternalAmount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def external_amount; end # Financial Account ID on which funds for ReceivedCredit were received. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/money_management/received_debit.rbi b/rbi/stripe/resources/v2/money_management/received_debit.rbi index 3f6d5a900..68ccc7eb1 100644 --- a/rbi/stripe/resources/v2/money_management/received_debit.rbi +++ b/rbi/stripe/resources/v2/money_management/received_debit.rbi @@ -7,34 +7,6 @@ module Stripe module MoneyManagement # ReceivedDebit resource class ReceivedDebit < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class ExternalAmount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class StatusDetails < ::Stripe::StripeObject class Failed < ::Stripe::StripeObject # Open Enum. The reason for the failure of the ReceivedDebit. @@ -134,56 +106,28 @@ module Stripe end class CardSpend < ::Stripe::StripeObject class Authorization < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount associated with this issuing authorization. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The reference to the v1 issuing authorization ID. sig { returns(String) } def issuing_authorization_v1; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} end end class CardTransaction < ::Stripe::StripeObject - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Amount associated with this issuing transaction. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The reference to the v1 issuing transaction ID. sig { returns(String) } def issuing_transaction_v1; end def self.inner_class_types - @inner_class_types = {amount: Amount} + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -220,7 +164,7 @@ module Stripe end end # Amount and currency of the ReceivedDebit. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The time at which the ReceivedDebit was created. # Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2022-09-18T13:22:18.123Z`. @@ -230,7 +174,7 @@ module Stripe sig { returns(T.nilable(String)) } def description; end # The amount and currency of the original/external debit request. - sig { returns(T.nilable(ExternalAmount)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def external_amount; end # Financial Account on which funds for ReceivedDebit were debited. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/money_management/transaction.rbi b/rbi/stripe/resources/v2/money_management/transaction.rbi index 0ae01e279..d891b2e2d 100644 --- a/rbi/stripe/resources/v2/money_management/transaction.rbi +++ b/rbi/stripe/resources/v2/money_management/transaction.rbi @@ -7,78 +7,29 @@ module Stripe module MoneyManagement # Use Transactions to view changes to your FinancialAccount balance over time. Every flow that moves money, such as OutboundPayments or ReceivedCredits, will have one or more Transactions that describes how the flow impacted your balance. Note that while the FinancialAccount balance will always be up to date, be aware that Transactions and TransactionEntries are created shortly after to reflect changes. class Transaction < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class BalanceImpact < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Impact to the available balance. - sig { returns(Available) } + sig { returns(::Stripe::V2::Amount) } def available; end # Impact to the inbound_pending balance. - sig { returns(InboundPending) } + sig { returns(::Stripe::V2::Amount) } def inbound_pending; end # Impact to the outbound_pending balance. - sig { returns(OutboundPending) } + sig { returns(::Stripe::V2::Amount) } def outbound_pending; end def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} + end + def self.field_remappings + @field_remappings = {} + end + end + class Counterparty < ::Stripe::StripeObject + # Name of the counterparty. + sig { returns(T.nilable(String)) } + def name; end + def self.inner_class_types + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -145,6 +96,30 @@ module Stripe # If applicable, the ID of the Transfer Reversal that created this Transaction. sig { returns(T.nilable(String)) } def transfer_reversal; end + # If applicable, the ID of the Treasury CreditReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_credit_reversal; end + # If applicable, the ID of the Treasury DebitReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_debit_reversal; end + # If applicable, the ID of the Treasury InboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_inbound_transfer; end + # If applicable, the ID of the Treasury IssuingAuthorization that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_issuing_authorization; end + # If applicable, the ID of the Treasury OutboundPayment that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_payment; end + # If applicable, the ID of the Treasury OutboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_transfer; end + # If applicable, the ID of the Treasury ReceivedCredit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_credit; end + # If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_debit; end def self.inner_class_types @inner_class_types = {} end @@ -167,7 +142,7 @@ module Stripe end end # The amount of the Transaction. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to sum of its # TransactionEntries that have `effective_at`s in the past. @@ -176,9 +151,16 @@ module Stripe # Open Enum. A descriptive category used to classify the Transaction. sig { returns(String) } def category; end + # Counterparty to this Transaction. + sig { returns(T.nilable(Counterparty)) } + def counterparty; end # Time at which the object was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. sig { returns(String) } def created; end + # Description of this Transaction. When applicable, the description is copied from the Flow object at the time + # of transaction creation. + sig { returns(T.nilable(String)) } + def description; end # Indicates the FinancialAccount affected by this Transaction. sig { returns(String) } def financial_account; end @@ -201,6 +183,9 @@ module Stripe # Timestamps for when the Transaction transitioned to a particular status. sig { returns(StatusTransitions) } def status_transitions; end + # The v1 Treasury transaction associated with this transaction. + sig { returns(T.nilable(String)) } + def treasury_transaction; 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/transaction_entry.rbi b/rbi/stripe/resources/v2/money_management/transaction_entry.rbi index 5213295a0..f235e8364 100644 --- a/rbi/stripe/resources/v2/money_management/transaction_entry.rbi +++ b/rbi/stripe/resources/v2/money_management/transaction_entry.rbi @@ -8,63 +8,17 @@ module Stripe # TransactionEntries represent individual money movements across different states within a Transaction. class TransactionEntry < APIResource class BalanceImpact < ::Stripe::StripeObject - class Available < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class InboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class OutboundPending < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end # Impact to the available balance. - sig { returns(Available) } + sig { returns(::Stripe::V2::Amount) } def available; end # Impact to the inbound_pending balance. - sig { returns(InboundPending) } + sig { returns(::Stripe::V2::Amount) } def inbound_pending; end # Impact to the outbound_pending balance. - sig { returns(OutboundPending) } + sig { returns(::Stripe::V2::Amount) } def outbound_pending; end def self.inner_class_types - @inner_class_types = { - available: Available, - inbound_pending: InboundPending, - outbound_pending: OutboundPending, - } + @inner_class_types = {} end def self.field_remappings @field_remappings = {} @@ -132,6 +86,30 @@ module Stripe # If applicable, the ID of the Transfer Reversal that created this Transaction. sig { returns(T.nilable(String)) } def transfer_reversal; end + # If applicable, the ID of the Treasury CreditReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_credit_reversal; end + # If applicable, the ID of the Treasury DebitReversal that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_debit_reversal; end + # If applicable, the ID of the Treasury InboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_inbound_transfer; end + # If applicable, the ID of the Treasury IssuingAuthorization that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_issuing_authorization; end + # If applicable, the ID of the Treasury OutboundPayment that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_payment; end + # If applicable, the ID of the Treasury OutboundTransfer that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_outbound_transfer; end + # If applicable, the ID of the Treasury ReceivedCredit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_credit; end + # If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. + sig { returns(T.nilable(String)) } + def treasury_received_debit; end def self.inner_class_types @inner_class_types = {} end @@ -176,6 +154,9 @@ module Stripe # Details copied from the transaction that this TransactionEntry belongs to. sig { returns(TransactionDetails) } def transaction_details; end + # The v1 Treasury transaction entry associated with this transaction entry. + sig { returns(T.nilable(String)) } + def treasury_transaction_entry; 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/payments/off_session_payment.rbi b/rbi/stripe/resources/v2/payments/off_session_payment.rbi index 8668c94a2..b5c4113cf 100644 --- a/rbi/stripe/resources/v2/payments/off_session_payment.rbi +++ b/rbi/stripe/resources/v2/payments/off_session_payment.rbi @@ -12,34 +12,6 @@ module Stripe # OffSessionPayment will transition through its lifecycle asynchronously. # Related guide: [Off-Session Payments API](https://docs.stripe.com/payments/off-session-payments). class OffSessionPayment < APIResource - class AmountCapturable < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end - class AmountRequested < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class Capture < ::Stripe::StripeObject # The timestamp when this payment is no longer eligible to be captured. sig { returns(T.nilable(String)) } @@ -104,10 +76,10 @@ module Stripe end end # The amount available to be captured. - sig { returns(T.nilable(AmountCapturable)) } + sig { returns(T.nilable(::Stripe::V2::Amount)) } def amount_capturable; end # The “presentment amount” to be collected from the customer. - sig { returns(AmountRequested) } + sig { returns(::Stripe::V2::Amount) } def amount_requested; end # The frequency of the underlying payment. sig { returns(String) } diff --git a/rbi/stripe/resources/v2/payments/settlement_allocation_intent.rbi b/rbi/stripe/resources/v2/payments/settlement_allocation_intent.rbi index 25279d2e6..ad4a02282 100644 --- a/rbi/stripe/resources/v2/payments/settlement_allocation_intent.rbi +++ b/rbi/stripe/resources/v2/payments/settlement_allocation_intent.rbi @@ -7,20 +7,6 @@ module Stripe module Payments # SettlementAllocationIntent resource. class SettlementAllocationIntent < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class StatusDetails < ::Stripe::StripeObject class Errored < ::Stripe::StripeObject # Stripe doc link to debug the issue. @@ -50,7 +36,7 @@ module Stripe end end # The amount and currency of the SettlementAllocationIntent. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Timestamp at which SettlementAllocationIntent was created . sig { returns(String) } diff --git a/rbi/stripe/resources/v2/payments/settlement_allocation_intent_split.rbi b/rbi/stripe/resources/v2/payments/settlement_allocation_intent_split.rbi index ed2ee92ce..07d1dc832 100644 --- a/rbi/stripe/resources/v2/payments/settlement_allocation_intent_split.rbi +++ b/rbi/stripe/resources/v2/payments/settlement_allocation_intent_split.rbi @@ -7,20 +7,6 @@ module Stripe module Payments # SettlementAllocationIntentSplit resource. class SettlementAllocationIntentSplit < APIResource - class Amount < ::Stripe::StripeObject - # A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - sig { returns(Integer) } - def value; end - # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - sig { returns(String) } - def currency; end - def self.inner_class_types - @inner_class_types = {} - end - def self.field_remappings - @field_remappings = {} - end - end class Flow < ::Stripe::StripeObject # Type of the flow linked to the transaction which settled the SettlementAllocationIntentSplit. The field matching this value will contain the ID of the flow. sig { returns(String) } @@ -45,7 +31,7 @@ module Stripe sig { returns(String) } def account; end # The amount and currency of the SettlementAllocationIntentSplit. - sig { returns(Amount) } + sig { returns(::Stripe::V2::Amount) } def amount; end # Timestamp at which SettlementAllocationIntentSplit was created. sig { returns(String) } @@ -56,10 +42,13 @@ module Stripe # Unique identifier for the SettlementAllocationIntentSplit. sig { returns(String) } def id; end + # Metadata associated with the SettlementAllocationIntentSplit. + sig { returns(T.nilable(T::Hash[String, String])) } + def metadata; end # String representing the object's type. Objects of the same type share the same value of the object field. sig { returns(String) } def object; end - # The ID of the SettlementAllocationIntent that this split belongs too. + # The ID of the SettlementAllocationIntent that this split belongs to. sig { returns(String) } def settlement_allocation_intent; end # The status of the SettlementAllocationIntentSplit. diff --git a/rbi/stripe/resources/v2/reporting/report_run.rbi b/rbi/stripe/resources/v2/reporting/report_run.rbi index 834f46149..f208afb3a 100644 --- a/rbi/stripe/resources/v2/reporting/report_run.rbi +++ b/rbi/stripe/resources/v2/reporting/report_run.rbi @@ -40,6 +40,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {size: :int64_string} + end end # Contains metadata about the file produced by the `ReportRun`, including # its content type, size, and a URL to download its contents. @@ -54,6 +57,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {file: {kind: :object, fields: {size: :int64_string}}} + end end class ResultOptions < ::Stripe::StripeObject # If set, the generated report file will be compressed into a ZIP folder. diff --git a/rbi/stripe/resources/v2/tax/manual_rule.rbi b/rbi/stripe/resources/v2/tax/manual_rule.rbi index 492441299..9fc3aa864 100644 --- a/rbi/stripe/resources/v2/tax/manual_rule.rbi +++ b/rbi/stripe/resources/v2/tax/manual_rule.rbi @@ -56,7 +56,7 @@ module Stripe sig { returns(T.nilable(String)) } def jurisdiction; end # Percentage of the tax rate. Must be positive and maximum of 4 decimal points. - sig { returns(String) } + sig { returns(BigDecimal) } def percentage; end # State of the tax rate. sig { returns(T.nilable(String)) } @@ -67,6 +67,9 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = {percentage: :decimal_string} + end end # The tax rates to be applied. sig { returns(T::Array[Rate]) } @@ -80,6 +83,14 @@ module Stripe def self.field_remappings @field_remappings = {} end + def self.field_encodings + @field_encodings = { + rates: { + kind: :array, + element: {kind: :object, fields: {percentage: :decimal_string}}, + }, + } + end end # The time at which the ManualRule object was created. sig { returns(String) } diff --git a/rbi/stripe/services/v2/billing/license_fee_subscription_service.rbi b/rbi/stripe/services/v2/billing/license_fee_subscription_service.rbi deleted file mode 100644 index cde052e98..000000000 --- a/rbi/stripe/services/v2/billing/license_fee_subscription_service.rbi +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -# typed: true -module Stripe - module V2 - module Billing - class LicenseFeeSubscriptionService < StripeService - # Retrieve a License Fee Subscription object. - sig { - params(id: String, params: T.any(::Stripe::V2::Billing::LicenseFeeSubscriptionRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::LicenseFeeSubscription) - } - def retrieve(id, params = {}, opts = {}); end - end - end - end -end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing/pricing_plan_subscription_service.rbi b/rbi/stripe/services/v2/billing/pricing_plan_subscription_service.rbi index 951ffc7bc..7b46272d8 100644 --- a/rbi/stripe/services/v2/billing/pricing_plan_subscription_service.rbi +++ b/rbi/stripe/services/v2/billing/pricing_plan_subscription_service.rbi @@ -6,13 +6,18 @@ module Stripe module V2 module Billing class PricingPlanSubscriptionService < StripeService - attr_reader :components # List all Pricing Plan Subscription objects. sig { params(params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptionListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } def list(params = {}, opts = {}); end + # Remove Discounts from a Pricing Plan Subscription. + sig { + params(id: String, params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptionRemoveDiscountsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::PricingPlanSubscription) + } + def remove_discounts(id, params = {}, opts = {}); end + # Retrieve a Pricing Plan Subscription object. sig { params(id: String, params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptionRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::PricingPlanSubscription) diff --git a/rbi/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rbi b/rbi/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rbi deleted file mode 100644 index e17fceeee..000000000 --- a/rbi/stripe/services/v2/billing/pricing_plan_subscriptions/component_service.rbi +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec -# frozen_string_literal: true - -# typed: true -module Stripe - module V2 - module Billing - module PricingPlanSubscriptions - class ComponentService < StripeService - # Retrieve a Pricing Plan Subscription's components. - sig { - params(id: String, params: T.any(::Stripe::V2::Billing::PricingPlanSubscriptions::ComponentRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::PricingPlanSubscriptionComponents) - } - def retrieve(id, params = {}, opts = {}); end - end - end - end - end -end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing/rate_card_service.rbi b/rbi/stripe/services/v2/billing/rate_card_service.rbi index b0e719cba..9d1b1d341 100644 --- a/rbi/stripe/services/v2/billing/rate_card_service.rbi +++ b/rbi/stripe/services/v2/billing/rate_card_service.rbi @@ -21,6 +21,12 @@ module Stripe } def list(params = {}, opts = {}); end + # Creates, updates, and/or deletes multiple Rates on a Rate Card atomically. + sig { + params(id: String, params: T.any(::Stripe::V2::Billing::RateCardModifyRatesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::RateCardVersion) + } + def modify_rates(id, params = {}, opts = {}); end + # Retrieve the latest version of a Rate Card object. sig { params(id: String, params: T.any(::Stripe::V2::Billing::RateCardRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Billing::RateCard) diff --git a/rbi/stripe/services/v2/billing/rate_cards/rate_service.rbi b/rbi/stripe/services/v2/billing/rate_cards/rate_service.rbi index 8fe808f30..a94440a54 100644 --- a/rbi/stripe/services/v2/billing/rate_cards/rate_service.rbi +++ b/rbi/stripe/services/v2/billing/rate_cards/rate_service.rbi @@ -20,7 +20,7 @@ module Stripe } def delete(rate_card_id, id, params = {}, opts = {}); end - # List all Rates associated with a Rate Card for a specific version (defaults to latest). Rates remain active for all subsequent versions until a new rate is created for the same Metered Item. + # List all Rates associated with a Rate Card for a specific version. Defaults to latest. Rates remain active for all subsequent versions until a new rate is created for the same Metered Item. sig { params(rate_card_id: String, params: T.any(::Stripe::V2::Billing::RateCards::RateListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::ListObject) } diff --git a/rbi/stripe/services/v2/billing_service.rbi b/rbi/stripe/services/v2/billing_service.rbi index db20de161..1ffd50f41 100644 --- a/rbi/stripe/services/v2/billing_service.rbi +++ b/rbi/stripe/services/v2/billing_service.rbi @@ -11,7 +11,6 @@ module Stripe attr_reader :custom_pricing_units attr_reader :intents attr_reader :license_fees - attr_reader :license_fee_subscriptions attr_reader :licensed_items attr_reader :meter_events attr_reader :meter_event_adjustments diff --git a/rbi/stripe/services/v2/core/account_evaluation_service.rbi b/rbi/stripe/services/v2/core/account_evaluation_service.rbi new file mode 100644 index 000000000..983d81c4d --- /dev/null +++ b/rbi/stripe/services/v2/core/account_evaluation_service.rbi @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class AccountEvaluationService < StripeService + # Creates a new account evaluation to trigger signal evaluations on an account or account data. + sig { + params(params: T.any(::Stripe::V2::Core::AccountEvaluationCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::AccountEvaluation) + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/core/batch_job_service.rbi b/rbi/stripe/services/v2/core/batch_job_service.rbi new file mode 100644 index 000000000..821007ced --- /dev/null +++ b/rbi/stripe/services/v2/core/batch_job_service.rbi @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class BatchJobService < StripeService + # Cancels an existing batch job. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::BatchJobCancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::BatchJob) + } + def cancel(id, params = {}, opts = {}); end + + # Creates a new batch job. + sig { + params(params: T.any(::Stripe::V2::Core::BatchJobCreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::BatchJob) + } + def create(params = {}, opts = {}); end + + # Retrieves an existing batch job. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::BatchJobRetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(::Stripe::V2::Core::BatchJob) + } + def retrieve(id, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/core_service.rbi b/rbi/stripe/services/v2/core_service.rbi index 790eba3b5..29c93d9b6 100644 --- a/rbi/stripe/services/v2/core_service.rbi +++ b/rbi/stripe/services/v2/core_service.rbi @@ -6,8 +6,10 @@ module Stripe module V2 class CoreService < StripeService attr_reader :accounts + attr_reader :account_evaluations attr_reader :account_links attr_reader :account_tokens + attr_reader :batch_jobs attr_reader :claimable_sandboxes attr_reader :connection_sessions attr_reader :events diff --git a/stripe.gemspec b/stripe.gemspec index 91eb4cc70..3f071dbbe 100644 --- a/stripe.gemspec +++ b/stripe.gemspec @@ -41,4 +41,9 @@ Gem::Specification.new do |s| s.bindir = "exe" s.executables = `git ls-files -- exe/*`.split("\n").map { |f| File.basename(f) } s.require_paths = ["lib"] + + # bigdecimal was a default gem through Ruby 3.3 but must be explicitly declared + # starting from Ruby 3.4.0. Required for decimal_string field coercion. + s.add_dependency "bigdecimal" + s.add_dependency "logger" end diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 6b5af2233..4659ca0e6 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -7827,7 +7827,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing intent get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents").to_return( - body: '{"data":[{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -7837,7 +7837,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing intent post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents").to_return( - body: '{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}', + body: '{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -7847,14 +7847,22 @@ class CodegennedExampleTest < Test::Unit::TestCase { type: "apply", apply: { - effective_at: { type: "current_billing_period_end" }, - type: "invoice_discount_rule", + effective_at: { + timestamp: "1970-01-01T15:18:46.294Z", + type: "current_billing_period_end", + }, + type: "discount", + discount: { + coupon: "coupon", + promotion_code: "promotion_code", + type: "coupon", + }, invoice_discount_rule: { applies_to: "cadence", type: "percent_off", percent_off: { maximum_applications: { type: "indefinite" }, - percent_off: "percent_off", + percent_off: "991934883.3333334", }, }, spend_modifier_rule: { @@ -7976,7 +7984,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing intent get 2 (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents/id_123").to_return( - body: '{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}', + body: '{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -7986,7 +7994,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing intent post 2 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents/id_123/cancel").to_return( - body: '{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}', + body: '{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -7996,7 +8004,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing intent post 3 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents/id_123/commit").to_return( - body: '{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}', + body: '{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8009,7 +8017,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents/id_123/release_reservation" ).to_return( - body: '{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}', + body: '{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8022,7 +8030,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/intents/id_123/reserve" ).to_return( - body: '{"amount_details":{"currency":"usd","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{},"livemode":true}', + body: '{"amount_details":{"amount_due":"amount_due","currency":"usd","customer_balance_applied":"customer_balance_applied","discount":"discount","shipping":"shipping","subtotal":"subtotal","tax":"tax","total":"total"},"created":"1970-01-12T21:42:34.472Z","currency":"usd","id":"obj_123","object":"v2.billing.intent","status":"draft","status_transitions":{"expires_at":"1970-01-10T15:36:51.170Z"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8061,7 +8069,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fees?lookup_keys[0]=lookup_keys" ).to_return( - body: '{"data":[{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8071,7 +8079,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing license fee post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fees").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}],"livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8088,7 +8096,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing license fee get 2 (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fees/id_123").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}],"livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8098,7 +8106,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing license fee post 2 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fees/id_123").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","tiers":[{}],"livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","licensed_item":{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true},"live_version":"live_version","object":"v2.billing.license_fee","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","tiers":[{}],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8135,19 +8143,6 @@ class CodegennedExampleTest < Test::Unit::TestCase ) assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fees/license_fee_id_123/versions/id_123" end - should "Test v2 billing license fee subscription get (service)" do - stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fee_subscriptions/id_123" - ).to_return( - body: '{"billing_cadence":"billing_cadence","created":"1970-01-12T21:42:34.472Z","id":"obj_123","license_fee":"license_fee","license_fee_version":"license_fee_version","object":"v2.billing.license_fee_subscription","quantity":1285004149,"livemode":true}', - status: 200 - ) - client = Stripe::StripeClient.new("sk_test_123") - - license_fee_subscription = client.v2.billing.license_fee_subscriptions.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/license_fee_subscriptions/id_123" - end should "Test v2 billing licensed item get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/licensed_items").to_return( body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","display_name":"display_name","id":"obj_123","object":"v2.billing.licensed_item","livemode":true}],"next_page_url":null,"previous_page_url":null}', @@ -8332,7 +8327,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing pricing plan get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plans").to_return( - body: '{"data":[{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8342,7 +8337,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing pricing plan post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plans").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8356,7 +8351,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing pricing plan get 2 (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plans/id_123").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8366,7 +8361,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing pricing plan post 2 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plans/id_123").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","object":"v2.billing.pricing_plan","tax_behavior":"exclusive","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8513,18 +8508,18 @@ class CodegennedExampleTest < Test::Unit::TestCase pricing_plan_subscription = client.v2.billing.pricing_plan_subscriptions.update("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plan_subscriptions/id_123" end - should "Test v2 billing pricing plan subscriptions component get (service)" do + should "Test v2 billing pricing plan subscription post 2 (service)" do stub_request( - :get, - "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plan_subscriptions/id_123/components" + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts" ).to_return( - body: '{"components":[{"pricing_plan_component":"pricing_plan_component","type":"license_fee_subscription"}],"object":"v2.billing.pricing_plan_subscription_components","livemode":true}', + body: '{"billing_cadence":"billing_cadence","collection_status":"past_due","collection_status_transitions":{},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.billing.pricing_plan_subscription","pricing_plan":"pricing_plan","pricing_plan_version":"pricing_plan_version","servicing_status":"pending","servicing_status_transitions":{},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - pricing_plan_subscription_components = client.v2.billing.pricing_plan_subscriptions.components.retrieve("id_123") - assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plan_subscriptions/id_123/components" + pricing_plan_subscription = client.v2.billing.pricing_plan_subscriptions.remove_discounts("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/pricing_plan_subscriptions/id_123/remove_discounts" end should "Test v2 billing profile get (service)" do stub_request( @@ -8571,7 +8566,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing rate card get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards").to_return( - body: '{"data":[{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","object":"v2.billing.rate_card","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","object":"v2.billing.rate_card","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8581,7 +8576,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing rate card post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","object":"v2.billing.rate_card","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","object":"v2.billing.rate_card","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8597,7 +8592,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing rate card get 2 (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards/id_123").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","object":"v2.billing.rate_card","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","object":"v2.billing.rate_card","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8607,7 +8602,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 billing rate card post 2 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards/id_123").to_return( - body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","latest_version":"latest_version","live_version":"live_version","object":"v2.billing.rate_card","service_interval":"month","service_interval_count":1375336415,"tax_behavior":"exclusive","livemode":true}', + body: '{"active":true,"created":"1970-01-12T21:42:34.472Z","currency":"usd","display_name":"display_name","id":"obj_123","live_version":"live_version","object":"v2.billing.rate_card","service_cycle":{"interval":"month","interval_count":797691627},"tax_behavior":"exclusive","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -8615,6 +8610,56 @@ class CodegennedExampleTest < Test::Unit::TestCase rate_card = client.v2.billing.rate_cards.update("id_123") assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards/id_123" end + should "Test v2 billing rate card post 3 (service)" do + stub_request( + :post, + "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards/id_123/modify_rates" + ).to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.billing.rate_card_version","rate_card_id":"rate_card_id","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + rate_card_version = client.v2.billing.rate_cards.modify_rates( + "id_123", + { + rates_to_create: [ + { + metadata: { key: "metadata" }, + metered_item: "metered_item", + metered_item_data: { + display_name: "display_name", + lookup_key: "lookup_key", + meter: "meter", + meter_segment_conditions: [ + { + dimension: "dimension", + value: "value", + }, + ], + unit_label: "unit_label", + }, + tiering_mode: "graduated", + tiers: [ + { + flat_amount: "flat_amount", + unit_amount: "unit_amount", + up_to_decimal: "1387931359.3333333", + up_to_inf: "inf", + }, + ], + transform_quantity: { + divide_by: 1_592_560_163, + round: "down", + }, + unit_amount: "unit_amount", + }, + ], + rates_to_delete: [{ id: "obj_123" }], + } + ) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/billing/rate_cards/id_123/modify_rates" + end should "Test v2 billing rate cards custom pricing unit overage rate get (service)" do stub_request( :get, @@ -9004,6 +9049,18 @@ class CodegennedExampleTest < Test::Unit::TestCase ) assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/accounts/account_id_123/person_tokens/id_123" end + should "Test v2 core account evaluation post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_evaluations").to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","evaluations_triggered":["fraudulent_website"],"id":"obj_123","object":"v2.core.account_evaluation","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + account_evaluation = client.v2.core.account_evaluations.create({ + signals: ["fraudulent_website"], + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_evaluations" + end should "Test v2 core account link post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_links").to_return( body: '{"account":"account","created":"1970-01-12T21:42:34.472Z","expires_at":"1970-01-10T15:36:51.170Z","object":"v2.core.account_link","url":"url","use_case":{"type":"recipient_onboarding"},"livemode":true}', @@ -9075,6 +9132,43 @@ class CodegennedExampleTest < Test::Unit::TestCase account_token = client.v2.core.account_tokens.retrieve("id_123") assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/account_tokens/id_123" end + should "Test v2 core batch job post (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/batch_jobs").to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","maximum_rps":1686015830,"metadata":{"key":"metadata"},"object":"v2.core.batch_job","skip_validation":true,"status":"batch_failed","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + batch_job = client.v2.core.batch_jobs.create({ + endpoint: { + http_method: "post", + path: "path", + }, + metadata: { key: "metadata" }, + skip_validation: true, + }) + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/batch_jobs" + end + should "Test v2 core batch job get (service)" do + stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/batch_jobs/id_123").to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","maximum_rps":1686015830,"metadata":{"key":"metadata"},"object":"v2.core.batch_job","skip_validation":true,"status":"batch_failed","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + batch_job = client.v2.core.batch_jobs.retrieve("id_123") + assert_requested :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/batch_jobs/id_123" + end + should "Test v2 core batch job post 2 (service)" do + stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/batch_jobs/id_123/cancel").to_return( + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","maximum_rps":1686015830,"metadata":{"key":"metadata"},"object":"v2.core.batch_job","skip_validation":true,"status":"batch_failed","livemode":true}', + status: 200 + ) + client = Stripe::StripeClient.new("sk_test_123") + + batch_job = client.v2.core.batch_jobs.cancel("id_123") + assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/batch_jobs/id_123/cancel" + end should "Test v2 core claimable sandbox post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/claimable_sandboxes").to_return( body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.core.claimable_sandbox","prefill":{"country":"country","email":"email","name":"name"},"sandbox_details":{"account":"account"},"status":"claimed","livemode":true}', @@ -9247,7 +9341,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 core vault gb bank account get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts").to_return( - body: '{"data":[{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","supported_currencies":["supported_currencies"],"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9257,15 +9351,12 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 core vault gb bank account post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts").to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","supported_currencies":["supported_currencies"],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") - gb_bank_account = client.v2.core.vault.gb_bank_accounts.create({ - account_number: "account_number", - sort_code: "sort_code", - }) + gb_bank_account = client.v2.core.vault.gb_bank_accounts.create({ currency: "usd" }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts" end should "Test v2 core vault gb bank account get 2 (service)" do @@ -9273,7 +9364,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","supported_currencies":["supported_currencies"],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9286,7 +9377,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","supported_currencies":["supported_currencies"],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9299,7 +9390,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/archive" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","supported_currencies":["supported_currencies"],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9312,7 +9403,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","sort_code":"sort_code","livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","confirmation_of_payee":{"result":{"created":"1970-01-12T21:42:34.472Z","match_result":"unavailable","matched":{},"message":"message","provided":{"business_type":"personal","name":"name"}},"status":"awaiting_acknowledgement"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.gb_bank_account","supported_currencies":["supported_currencies"],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9322,7 +9413,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 core vault us bank account get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts").to_return( - body: '{"data":[{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9332,13 +9423,14 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 core vault us bank account post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts").to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") us_bank_account = client.v2.core.vault.us_bank_accounts.create({ account_number: "account_number", + currency: "usd", }) assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts" end @@ -9347,7 +9439,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9360,7 +9452,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9373,7 +9465,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/archive" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9386,7 +9478,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/confirm_microdeposits" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9399,7 +9491,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts/id_123/send_microdeposits" ).to_return( - body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","verification":{"status":"verification_failed"},"livemode":true}', + body: '{"archived":true,"bank_account_type":"savings","bank_name":"bank_name","created":"1970-01-12T21:42:34.472Z","id":"obj_123","last4":"last4","object":"v2.core.vault.us_bank_account","supported_currencies":["supported_currencies"],"verification":{"status":"verification_failed"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9469,7 +9561,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 money management adjustment get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/adjustments").to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9482,7 +9574,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/adjustments/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.adjustment","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9495,7 +9587,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/currency_conversions" ).to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"value":111972721,"currency":"usd"}}}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"currency":"USD","value":96}}}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9508,7 +9600,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/currency_conversions" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"value":111972721,"currency":"usd"}}}', + body: '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"currency":"USD","value":96}}}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9517,15 +9609,15 @@ class CodegennedExampleTest < Test::Unit::TestCase financial_account: "financial_account", from: { amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, currency: "usd", }, to: { amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, currency: "usd", }, @@ -9537,7 +9629,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/currency_conversions/id_123" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"value":111972721,"currency":"usd"}}}', + body: '{"created":"1970-01-12T21:42:34.472Z","exchange_rate":"exchange_rate","financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96}},"id":"obj_123","livemode":true,"object":"v2.money_management.currency_conversion","to":{"amount":{"currency":"USD","value":96}}}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9550,7 +9642,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts" ).to_return( - body: '{"data":[{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9563,7 +9655,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts" ).to_return( - body: '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + body: '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9576,7 +9668,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts/id_123" ).to_return( - body: '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + body: '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9589,7 +9681,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts/id_123" ).to_return( - body: '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + body: '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9602,7 +9694,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/financial_accounts/id_123/close" ).to_return( - body: '{"balance":{"available":{"key":{"value":111972721,"currency":"usd"}},"inbound_pending":{"key":{"value":111972721,"currency":"usd"}},"outbound_pending":{"key":{"value":111972721,"currency":"usd"}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', + body: '{"balance":{"available":{"key":{"currency":"USD","value":35}},"inbound_pending":{"key":{"currency":"USD","value":11}},"outbound_pending":{"key":{"currency":"USD","value":60}}},"country":"country","created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.financial_account","status":"closed","type":"payments","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9657,7 +9749,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" ).to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"value":111972721,"currency":"usd"},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"currency":"USD","value":55},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"currency":"USD","value":68},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9670,15 +9762,15 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"value":111972721,"currency":"usd"},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"currency":"USD","value":55},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"currency":"USD","value":68},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") inbound_transfer = client.v2.money_management.inbound_transfers.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, from: { currency: "usd", @@ -9696,7 +9788,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/inbound_transfers/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"value":111972721,"currency":"usd"},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","description":"description","from":{"debited":{"currency":"USD","value":55},"payment_method":{"type":"type"}},"id":"obj_123","object":"v2.money_management.inbound_transfer","to":{"credited":{"currency":"USD","value":68},"financial_account":"financial_account"},"transfer_history":[{"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","level":"canonical","type":"bank_debit_failed"}],"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9709,7 +9801,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" ).to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9722,15 +9814,15 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") outbound_payment = client.v2.money_management.outbound_payments.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, from: { currency: "usd", @@ -9749,7 +9841,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9762,7 +9854,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payments/id_123/cancel" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_payment","recipient_notification":{"setting":"configured"},"statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"trace_id":{"status":"pending"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9775,15 +9867,15 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payment_quotes" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"value":111972721,"currency":"usd"},"type":"cross_border_payout_fee"}],"from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"currency":"USD","value":96},"type":"next_day_payout_fee"}],"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") outbound_payment_quote = client.v2.money_management.outbound_payment_quotes.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, from: { currency: "usd", @@ -9802,7 +9894,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_payment_quotes/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"value":111972721,"currency":"usd"},"type":"cross_border_payout_fee"}],"from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","estimated_fees":[{"amount":{"currency":"USD","value":96},"type":"next_day_payout_fee"}],"from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"fx_quote":{"lock_duration":"five_minutes","lock_status":"active","rates":{"key":{"exchange_rate":"exchange_rate"}},"to_currency":"usd"},"id":"obj_123","object":"v2.money_management.outbound_payment_quote","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method","recipient":"recipient"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9815,7 +9907,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" ).to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9828,7 +9920,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9841,7 +9933,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9854,7 +9946,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9867,7 +9959,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_setup_intents/id_123/cancel" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.outbound_setup_intent","payout_method":{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true},"status":"requires_payout_method","usage_intent":"payment","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9880,7 +9972,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" ).to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9893,15 +9985,15 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") outbound_transfer = client.v2.money_management.outbound_transfers.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, from: { currency: "usd", @@ -9919,7 +10011,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9932,7 +10024,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/outbound_transfers/id_123/cancel" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"value":111972721,"currency":"usd"},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"value":111972721,"currency":"usd"},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"cancelable":true,"created":"1970-01-12T21:42:34.472Z","from":{"debited":{"currency":"USD","value":55},"financial_account":"financial_account"},"id":"obj_123","object":"v2.money_management.outbound_transfer","statement_descriptor":"statement_descriptor","status":"canceled","to":{"credited":{"currency":"USD","value":68},"payout_method":"payout_method"},"trace_id":{"status":"pending"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9945,7 +10037,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods" ).to_return( - body: '{"data":[{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9958,7 +10050,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123" ).to_return( - body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}', + body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9971,7 +10063,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123/archive" ).to_return( - body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}', + body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -9984,7 +10076,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/payout_methods/id_123/unarchive" ).to_return( - body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}', + body: '{"available_payout_speeds":["standard"],"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.money_management.payout_method","restricted":true,"type":"bank_account","usage_status":{"payments":"requires_action","transfers":"invalid"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10010,7 +10102,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/received_credits" ).to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10023,7 +10115,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/received_credits/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_credit","status":"returned","type":"balance_transfer","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10036,7 +10128,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/received_debits" ).to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10049,7 +10141,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/received_debits/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.received_debit","status":"canceled","type":"balance_transfer","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10100,7 +10192,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 money management transaction get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions").to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10113,7 +10205,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transactions/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"category":"received_debit_reversal","created":"1970-01-12T21:42:34.472Z","financial_account":"financial_account","id":"obj_123","object":"v2.money_management.transaction","status":"pending","status_transitions":{},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10126,7 +10218,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transaction_entries" ).to_return( - body: '{"data":[{"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10139,7 +10231,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/money_management/transaction_entries/id_123" ).to_return( - body: '{"balance_impact":{"available":{"value":111972721,"currency":"usd"},"inbound_pending":{"value":111972721,"currency":"usd"},"outbound_pending":{"value":111972721,"currency":"usd"}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}', + body: '{"balance_impact":{"available":{"currency":"USD","value":35},"inbound_pending":{"currency":"USD","value":11},"outbound_pending":{"currency":"USD","value":60}},"created":"1970-01-12T21:42:34.472Z","effective_at":"1970-01-03T20:38:28.043Z","id":"obj_123","object":"v2.money_management.transaction_entry","transaction":"transaction","transaction_details":{"category":"received_debit_reversal","financial_account":"financial_account"},"livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10149,7 +10241,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 payments off session payment get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments").to_return( - body: '{"data":[{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10159,15 +10251,15 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 payments off session payment post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments").to_return( - body: '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") off_session_payment = client.v2.payments.off_session_payments.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, cadence: "unscheduled", customer: "customer", @@ -10180,7 +10272,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123" ).to_return( - body: '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10193,7 +10285,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/cancel" ).to_return( - body: '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10206,7 +10298,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/off_session_payments/id_123/capture" ).to_return( - body: '{"amount_requested":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', + body: '{"amount_requested":{"currency":"USD","value":47},"cadence":"unscheduled","compartment_id":"compartment_id","created":"1970-01-12T21:42:34.472Z","customer":"customer","id":"obj_123","livemode":true,"metadata":{"key":"metadata"},"object":"v2.payments.off_session_payment","payment_method":"payment_method","payments_orchestration":{"enabled":true},"retry_details":{"attempts":542738246,"retry_strategy":"scheduled"},"status":"pending"}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10222,7 +10314,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents" ).to_return( - body: '{"data":[{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10235,15 +10327,15 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") settlement_allocation_intent = client.v2.payments.settlement_allocation_intents.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, expected_settlement_date: "1970-01-22T14:14:13.629Z", financial_account: "financial_account", @@ -10256,7 +10348,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10269,7 +10361,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/id_123" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10282,7 +10374,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/id_123/cancel" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10295,7 +10387,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/id_123/submit" ).to_return( - body: '{"amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', + body: '{"amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","id":"obj_123","linked_credits":["linked_credits"],"object":"v2.payments.settlement_allocation_intent","reference":"reference","status":"canceled","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10308,7 +10400,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits" ).to_return( - body: '{"data":[{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10321,7 +10413,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits" ).to_return( - body: '{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', + body: '{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10331,8 +10423,8 @@ class CodegennedExampleTest < Test::Unit::TestCase { account: "account", amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, type: "credit", } @@ -10344,7 +10436,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :get, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123" ).to_return( - body: '{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', + body: '{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10360,7 +10452,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits/id_123/cancel" ).to_return( - body: '{"account":"account","amount":{"value":111972721,"currency":"usd"},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', + body: '{"account":"account","amount":{"currency":"USD","value":96},"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.payments.settlement_allocation_intent_split","settlement_allocation_intent":"settlement_allocation_intent","status":"canceled","type":"credit","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10416,7 +10508,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 tax manual rule get (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/tax/manual_rules").to_return( - body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}],"next_page_url":null,"previous_page_url":null}', + body: '{"data":[{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}],"next_page_url":null,"previous_page_url":null}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10426,7 +10518,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 tax manual rule post (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/tax/manual_rules").to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10440,7 +10532,7 @@ class CodegennedExampleTest < Test::Unit::TestCase description: "description", display_name: "display_name", jurisdiction: "jurisdiction", - percentage: "percentage", + percentage: "614555204", state: "state", }, ], @@ -10452,7 +10544,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 tax manual rule get 2 (service)" do stub_request(:get, "#{Stripe::DEFAULT_API_BASE}/v2/tax/manual_rules/id_123").to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10462,7 +10554,7 @@ class CodegennedExampleTest < Test::Unit::TestCase end should "Test v2 tax manual rule post 2 (service)" do stub_request(:post, "#{Stripe::DEFAULT_API_BASE}/v2/tax/manual_rules/id_123").to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10478,7 +10570,7 @@ class CodegennedExampleTest < Test::Unit::TestCase description: "description", display_name: "display_name", jurisdiction: "jurisdiction", - percentage: "percentage", + percentage: "614555204", state: "state", }, ], @@ -10494,7 +10586,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/tax/manual_rules/id_123/deactivate" ).to_return( - body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"percentage"}]}],"status":"active","livemode":true}', + body: '{"created":"1970-01-12T21:42:34.472Z","id":"obj_123","object":"v2.tax.manual_rule","products":[{"type":"licensed_item"}],"scheduled_tax_rates":[{"rates":[{"display_name":"display_name","percentage":"614555204"}]}],"status":"active","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10516,8 +10608,8 @@ class CodegennedExampleTest < Test::Unit::TestCase "id_123", { amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, network: "ach", } @@ -10529,7 +10621,7 @@ class CodegennedExampleTest < Test::Unit::TestCase :post, "#{Stripe::DEFAULT_API_BASE}/v2/test_helpers/financial_addresses/id_123/generate_microdeposits" ).to_return( - body: '{"amounts":[{"value":111972721,"currency":"usd"}],"object":"financial_address_generated_microdeposits","status":"accepted","livemode":true}', + body: '{"amounts":[{"currency":"USD","value":1}],"object":"financial_address_generated_microdeposits","status":"accepted","livemode":true}', status: 200 ) client = Stripe::StripeClient.new("sk_test_123") @@ -10590,6 +10682,7 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_raises Stripe::BlockedByStripeError do us_bank_account = client.v2.core.vault.us_bank_accounts.create({ account_number: "account_number", + currency: "usd", }) end assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts" @@ -10674,8 +10767,8 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_raises Stripe::InsufficientFundsError do outbound_payment = client.v2.money_management.outbound_payments.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, from: { currency: "usd", @@ -10696,6 +10789,7 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_raises Stripe::InvalidPaymentMethodError do us_bank_account = client.v2.core.vault.us_bank_accounts.create({ account_number: "account_number", + currency: "usd", }) end assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts" @@ -10755,6 +10849,7 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_raises Stripe::QuotaExceededError do us_bank_account = client.v2.core.vault.us_bank_accounts.create({ account_number: "account_number", + currency: "usd", }) end assert_requested :post, "#{Stripe::DEFAULT_API_BASE}/v2/core/vault/us_bank_accounts" @@ -10784,8 +10879,8 @@ class CodegennedExampleTest < Test::Unit::TestCase assert_raises Stripe::RecipientNotNotifiableError do outbound_payment = client.v2.money_management.outbound_payments.create({ amount: { - value: 111_972_721, - currency: "usd", + currency: "USD", + value: 96, }, from: { currency: "usd", diff --git a/test/stripe/oauth_service_test.rb b/test/stripe/oauth_service_test.rb index 389446410..d2c734a27 100644 --- a/test/stripe/oauth_service_test.rb +++ b/test/stripe/oauth_service_test.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require File.expand_path("../test_helper", __dir__) +require "cgi" module Stripe class OAuthServiceTest < Test::Unit::TestCase diff --git a/test/stripe/oauth_test.rb b/test/stripe/oauth_test.rb index 97a5a574e..10fd79810 100644 --- a/test/stripe/oauth_test.rb +++ b/test/stripe/oauth_test.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require File.expand_path("../test_helper", __dir__) +require "cgi" module Stripe class OAuthTest < Test::Unit::TestCase diff --git a/test/stripe/request_params_test.rb b/test/stripe/request_params_test.rb index 987c7c0b9..bfd21b585 100644 --- a/test/stripe/request_params_test.rb +++ b/test/stripe/request_params_test.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require File.expand_path("../test_helper", __dir__) +require "bigdecimal" module Stripe class RequestParamsTest < Test::Unit::TestCase @@ -332,6 +333,47 @@ def self.field_encodings assert_equal "hello", Stripe::RequestParams.coerce_value("hello", :something_else) end + should "return nil as-is for decimal_string encoding" do + assert_nil Stripe::RequestParams.coerce_value(nil, :decimal_string) + end + + should "convert BigDecimal to plain decimal String for decimal_string encoding" do + assert_equal "99.999", Stripe::RequestParams.coerce_value(BigDecimal("99.999"), :decimal_string) + assert_equal "0.1", Stripe::RequestParams.coerce_value(BigDecimal("0.1"), :decimal_string) + assert_equal "0.0", Stripe::RequestParams.coerce_value(BigDecimal("0"), :decimal_string) + assert_equal "-1.5", Stripe::RequestParams.coerce_value(BigDecimal("-1.5"), :decimal_string) + end + + should "pass through String for decimal_string encoding" do + assert_equal "99.999", Stripe::RequestParams.coerce_value("99.999", :decimal_string) + assert_equal "0.1", Stripe::RequestParams.coerce_value("0.1", :decimal_string) + end + + should "convert Integer to String for decimal_string encoding" do + assert_equal "42", Stripe::RequestParams.coerce_value(42, :decimal_string) + assert_equal "0", Stripe::RequestParams.coerce_value(0, :decimal_string) + end + + should "convert Float to String for decimal_string encoding" do + assert_equal "3.14", Stripe::RequestParams.coerce_value(3.14, :decimal_string) + end + + should "convert Array of BigDecimal for decimal_string encoding" do + result = Stripe::RequestParams.coerce_value( + [BigDecimal("1.1"), BigDecimal("2.2"), BigDecimal("3.3")], + :decimal_string + ) + assert_equal %w[1.1 2.2 3.3], result + end + + should "convert mixed Array for decimal_string encoding" do + result = Stripe::RequestParams.coerce_value( + [BigDecimal("1.5"), "already", 3], + :decimal_string + ) + assert_equal ["1.5", "already", "3"], result + end + should "coerce object fields recursively" do encoding = { kind: :object, diff --git a/test/stripe/stripe_object_decimal_test.rb b/test/stripe/stripe_object_decimal_test.rb new file mode 100644 index 000000000..c50a6401d --- /dev/null +++ b/test/stripe/stripe_object_decimal_test.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +require File.expand_path("../test_helper", __dir__) +require "bigdecimal" + +module Stripe + class StripeObjectDecimalTest < Test::Unit::TestCase + # A test resource with a decimal_string-encoded field. + class DecimalResource < Stripe::StripeObject + def self.field_encodings + { amount: :decimal_string } + end + end + + # A test resource without any field_encodings (non-regression). + class PlainResource < Stripe::StripeObject + end + + context "response-side decimal_string coercion" do + should "deserialize a string field to BigDecimal when encoding is :decimal_string" do + obj = DecimalResource.construct_from(id: "obj_1", amount: "99.999") + assert_equal BigDecimal("99.999"), obj.amount + assert_instance_of BigDecimal, obj.amount + end + + should "preserve full decimal precision (0.1 is a BigDecimal, not a Float)" do + obj = DecimalResource.construct_from(id: "obj_2", amount: "0.1") + assert_equal BigDecimal("0.1"), obj.amount + assert_instance_of BigDecimal, obj.amount + # Confirm it's not stored as a Float (which would lose precision) + refute_instance_of Float, obj.amount + end + + should "preserve negative decimal values" do + obj = DecimalResource.construct_from(id: "obj_3", amount: "-1.5") + assert_equal BigDecimal("-1.5"), obj.amount + assert_instance_of BigDecimal, obj.amount + end + + should "preserve zero" do + obj = DecimalResource.construct_from(id: "obj_4", amount: "0") + assert_equal BigDecimal("0"), obj.amount + assert_instance_of BigDecimal, obj.amount + end + + should "pass through nil without error" do + obj = DecimalResource.construct_from(id: "obj_5", amount: nil) + assert_nil obj.amount + end + + should "leave non-decimal fields unaffected on a resource with field_encodings" do + obj = DecimalResource.construct_from(id: "obj_6", amount: "10.0", name: "test") + assert_equal "test", obj.name + end + end + + context "non-regression: resources without field_encodings" do + should "not coerce string fields on plain resources" do + obj = PlainResource.construct_from(id: "obj_7", value: "99.999") + assert_equal "99.999", obj.value + assert_instance_of String, obj.value + end + + should "leave all fields unaffected" do + obj = PlainResource.construct_from(id: "obj_8", count: 42, label: "hello") + assert_equal 42, obj.count + assert_equal "hello", obj.label + end + end + end +end diff --git a/test/stripe/v2_event_test.rb b/test/stripe/v2_event_test.rb index 834c4b1ac..ee743803f 100644 --- a/test/stripe/v2_event_test.rb +++ b/test/stripe/v2_event_test.rb @@ -93,6 +93,15 @@ def parse_signed_event(payload, secret = Test::WebhookHelpers::SECRET) end context ".event_signing" do + should "raise an ArgumentError when given a v1 payload" do + v1_payload = { "id" => "evt_123", "object" => "event", "type" => "charge.succeeded" }.to_json + header = Test::WebhookHelpers.generate_header(payload: v1_payload) + e = assert_raises(ArgumentError) do + @client.parse_event_notification(v1_payload, header, Test::WebhookHelpers::SECRET) + end + assert_match(/Webhook\.construct_event/, e.message) + end + should "parse v2 events" do event = parse_signed_event(@v2_push_payload) assert event.is_a?(Stripe::V2::Core::EventNotification) diff --git a/test/stripe/webhook_test.rb b/test/stripe/webhook_test.rb index e54fc3676..293284247 100644 --- a/test/stripe/webhook_test.rb +++ b/test/stripe/webhook_test.rb @@ -64,6 +64,15 @@ class WebhookTest < Test::Unit::TestCase end end + should "raise an ArgumentError when given a v2 payload" do + v2_payload = { "id" => "evt_234", "object" => "v2.core.event", "type" => "some.event" }.to_json + header = Test::WebhookHelpers.generate_header(payload: v2_payload) + e = assert_raises(ArgumentError) do + Stripe::Webhook.construct_event(v2_payload, header, Test::WebhookHelpers::SECRET) + end + assert_match(/StripeClient#parse_event_notification/, e.message) + end + should "can call refresh on Event data object" do payload = { id: "evt_123",