diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 380b6f913..3188cedb5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.24" + ".": "0.1.0-alpha.25" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 7b040e5db..229bdad6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27f9f4f9013338a67494704ce9fa855698e5de91ea0600decd52fddcf9b298a2.yml -openapi_spec_hash: 21382ccac2711e76cdc2c1af0e2d6954 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8f6c4012863716d091d2212f4a079ceb2af3b5b4e776b00aab9b5cba7f452960.yml +openapi_spec_hash: 11c039f345002ae50d39988570ae266e config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e5ab06ab..ebd630660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 0.1.0-alpha.25 (2025-05-20) + +Full Changelog: [v0.1.0-alpha.24...v0.1.0-alpha.25](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.24...v0.1.0-alpha.25) + +### Features + +* **api:** api update ([e0ff4dc](https://github.com/Increase/increase-ruby/commit/e0ff4dc3724a0afac1fe6b232f319752dd0503f3)) + + +### Bug Fixes + +* correctly instantiate sorbet type aliases for enums and unions ([dbf0949](https://github.com/Increase/increase-ruby/commit/dbf094958b6e2f50f82252018dbc7d44380be1e1)) + + +### Chores + +* whitespaces ([67b9c0d](https://github.com/Increase/increase-ruby/commit/67b9c0d67f049bc1db8c0adb32320479aa48b4e5)) + ## 0.1.0-alpha.24 (2025-05-15) Full Changelog: [v0.1.0-alpha.23...v0.1.0-alpha.24](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.23...v0.1.0-alpha.24) diff --git a/Gemfile.lock b/Gemfile.lock index e00c7609e..1abcaab25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (0.1.0.pre.alpha.24) + increase (0.1.0.pre.alpha.25) connection_pool GEM diff --git a/README.md b/README.md index 5782dcbfe..a743948ec 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "increase", "~> 0.1.0.pre.alpha.24" +gem "increase", "~> 0.1.0.pre.alpha.25" ``` diff --git a/Steepfile b/Steepfile index d7aebca17..528b48c35 100644 --- a/Steepfile +++ b/Steepfile @@ -7,7 +7,7 @@ target(:lib) do signature("sig") - YAML.safe_load_file("./manifest.yaml", symbolize_names: true) => { dependencies: } + YAML.safe_load_file("./manifest.yaml", symbolize_names: true) => {dependencies:} # currently these libraries lack the `*.rbs` annotations required by `steep` stdlibs = dependencies - %w[English etc net/http rbconfig set stringio] diff --git a/lib/increase/internal/type/array_of.rb b/lib/increase/internal/type/array_of.rb index 95b930f34..bce161c0f 100644 --- a/lib/increase/internal/type/array_of.rb +++ b/lib/increase/internal/type/array_of.rb @@ -12,6 +12,7 @@ module Type # Array of items of a given type. class ArrayOf include Increase::Internal::Type::Converter + include Increase::Internal::Util::SorbetRuntimeSupport private_class_method :new @@ -110,6 +111,13 @@ def dump(value, state:) end end + # @api private + # + # @return [Object] + def to_sorbet_type + T::Array[Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)] + end + # @api private # # @return [generic] diff --git a/lib/increase/internal/type/base_model.rb b/lib/increase/internal/type/base_model.rb index 347de76c5..3fba8838c 100644 --- a/lib/increase/internal/type/base_model.rb +++ b/lib/increase/internal/type/base_model.rb @@ -311,6 +311,13 @@ def dump(value, state:) acc end + + # @api private + # + # @return [Object] + def to_sorbet_type + self + end end class << self diff --git a/lib/increase/internal/type/boolean.rb b/lib/increase/internal/type/boolean.rb index 4e995eb55..9a2439226 100644 --- a/lib/increase/internal/type/boolean.rb +++ b/lib/increase/internal/type/boolean.rb @@ -10,6 +10,7 @@ module Type # Ruby has no Boolean class; this is something for models to refer to. class Boolean extend Increase::Internal::Type::Converter + extend Increase::Internal::Util::SorbetRuntimeSupport private_class_method :new @@ -56,6 +57,13 @@ def coerce(value, state:) # @option state [Boolean] :can_retry # # @return [Boolean, Object] + + # @api private + # + # @return [Object] + def to_sorbet_type + T::Boolean + end end end end diff --git a/lib/increase/internal/type/enum.rb b/lib/increase/internal/type/enum.rb index c7ac186f6..962152e7c 100644 --- a/lib/increase/internal/type/enum.rb +++ b/lib/increase/internal/type/enum.rb @@ -87,6 +87,18 @@ def coerce(value, state:) # # @return [Symbol, Object] + # @api private + # + # @return [Object] + def to_sorbet_type + case values + in [] + T.noreturn + in [value, *_] + T.all(Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self) + end + end + # @api private # # @param depth [Integer] diff --git a/lib/increase/internal/type/file_input.rb b/lib/increase/internal/type/file_input.rb index b318d21a1..2096c1485 100644 --- a/lib/increase/internal/type/file_input.rb +++ b/lib/increase/internal/type/file_input.rb @@ -89,6 +89,13 @@ def dump(value, state:) value end + + # @api private + # + # @return [Object] + def to_sorbet_type + T.any(Pathname, StringIO, IO, String, Increase::FilePart) + end end end end diff --git a/lib/increase/internal/type/hash_of.rb b/lib/increase/internal/type/hash_of.rb index 7223c8df4..b1b5d4f53 100644 --- a/lib/increase/internal/type/hash_of.rb +++ b/lib/increase/internal/type/hash_of.rb @@ -12,6 +12,7 @@ module Type # Hash of items of a given type. class HashOf include Increase::Internal::Type::Converter + include Increase::Internal::Util::SorbetRuntimeSupport private_class_method :new @@ -130,6 +131,13 @@ def dump(value, state:) end end + # @api private + # + # @return [Object] + def to_sorbet_type + T::Hash[Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)] + end + # @api private # # @return [generic] diff --git a/lib/increase/internal/type/union.rb b/lib/increase/internal/type/union.rb index 7e0464912..0e9dddf7c 100644 --- a/lib/increase/internal/type/union.rb +++ b/lib/increase/internal/type/union.rb @@ -191,6 +191,18 @@ def dump(value, state:) super end + # @api private + # + # @return [Object] + def to_sorbet_type + case (v = variants) + in [] + T.noreturn + else + T.any(*v.map { Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }) + end + end + # rubocop:enable Style/CaseEquality # rubocop:enable Style/HashEachMethods diff --git a/lib/increase/internal/type/unknown.rb b/lib/increase/internal/type/unknown.rb index bc2161cbc..a07536ef7 100644 --- a/lib/increase/internal/type/unknown.rb +++ b/lib/increase/internal/type/unknown.rb @@ -10,6 +10,7 @@ module Type # When we don't know what to expect for the value. class Unknown extend Increase::Internal::Type::Converter + extend Increase::Internal::Util::SorbetRuntimeSupport # rubocop:disable Lint/UnusedMethodArgument @@ -58,6 +59,13 @@ def coerce(value, state:) # @option state [Boolean] :can_retry # # @return [Object] + + # @api private + # + # @return [Object] + def to_sorbet_type + T.anything + end end # rubocop:enable Lint/UnusedMethodArgument diff --git a/lib/increase/internal/util.rb b/lib/increase/internal/util.rb index d1ae02194..fb1196886 100644 --- a/lib/increase/internal/util.rb +++ b/lib/increase/internal/util.rb @@ -9,6 +9,23 @@ module Util # @return [Float] def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC) + # @api private + # + # @param ns [Module, Class] + # + # @return [Enumerable] + def self.walk_namespaces(ns) + ns.constants(false).lazy.flat_map do + case (c = ns.const_get(_1, false)) + in Module | Class + walk_namespaces(c) + else + [] + end + end + .chain([ns]) + end + class << self # @api private # @@ -826,11 +843,39 @@ def const_missing(name) sorbet_runtime_constants.fetch(name).call end + # @api private + # + # @param name [Symbol] + # + # @return [Boolean] + def sorbet_constant_defined?(name) = sorbet_runtime_constants.key?(name) + # @api private # # @param name [Symbol] # @param blk [Proc] def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk) + + # @api private + # + # @return [Object] + def to_sorbet_type = raise NotImplementedError + + class << self + # @api private + # + # @param type [Increase::Internal::Util::SorbetRuntimeSupport, Object] + # + # @return [Object] + def to_sorbet_type(type) + case type + in Increase::Internal::Util::SorbetRuntimeSupport + type.to_sorbet_type + else + type + end + end + end end extend Increase::Internal::Util::SorbetRuntimeSupport diff --git a/lib/increase/models.rb b/lib/increase/models.rb index 54b778103..32c1b8828 100644 --- a/lib/increase/models.rb +++ b/lib/increase/models.rb @@ -5,29 +5,40 @@ module Increase cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Increase::Internal::AnyHash) } } end - [ - *Increase::Internal::Type::Enum.included_modules, - *Increase::Internal::Type::Union.included_modules - ].each do |cls| - cls.constants.each do |name| - case cls.const_get(name) - in true | false - cls.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, cls) } } - cls.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } } - in Integer - cls.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, cls) } } - cls.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } } - in Float - cls.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, cls) } } - cls.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } } - in Symbol - cls.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, cls) } } - cls.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } } - else + Increase::Internal::Util.walk_namespaces(Increase::Models).each do |mod| + case mod + in Increase::Internal::Type::Enum | Increase::Internal::Type::Union + mod.constants.each do |name| + case mod.const_get(name) + in true | false + mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } } + mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } } + in Integer + mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } } + mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } } + in Float + mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } } + mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } } + in Symbol + mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } } + mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } } + else + end end + else end end + Increase::Internal::Util.walk_namespaces(Increase::Models) + .lazy + .grep(Increase::Internal::Type::Union) + .each do |mod| + const = :Variants + next if mod.sorbet_constant_defined?(const) + + mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } } + end + Account = Increase::Models::Account AccountBalanceParams = Increase::Models::AccountBalanceParams diff --git a/lib/increase/models/event.rb b/lib/increase/models/event.rb index af2d2a361..7c73d0f4f 100644 --- a/lib/increase/models/event.rb +++ b/lib/increase/models/event.rb @@ -262,6 +262,12 @@ module Category # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" diff --git a/lib/increase/models/event_list_params.rb b/lib/increase/models/event_list_params.rb index 8c59986ab..93ec3c729 100644 --- a/lib/increase/models/event_list_params.rb +++ b/lib/increase/models/event_list_params.rb @@ -264,6 +264,12 @@ module In # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" diff --git a/lib/increase/models/event_subscription.rb b/lib/increase/models/event_subscription.rb index 1ca5731a4..3e3e8d4c8 100644 --- a/lib/increase/models/event_subscription.rb +++ b/lib/increase/models/event_subscription.rb @@ -285,6 +285,12 @@ module SelectedEventCategory # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" diff --git a/lib/increase/models/event_subscription_create_params.rb b/lib/increase/models/event_subscription_create_params.rb index 5fd0a3acc..d8aa86695 100644 --- a/lib/increase/models/event_subscription_create_params.rb +++ b/lib/increase/models/event_subscription_create_params.rb @@ -246,6 +246,12 @@ module SelectedEventCategory # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED = :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = :"pending_transaction.created" diff --git a/lib/increase/models/pending_transaction.rb b/lib/increase/models/pending_transaction.rb index 9ee5248c3..f486740f1 100644 --- a/lib/increase/models/pending_transaction.rb +++ b/lib/increase/models/pending_transaction.rb @@ -257,6 +257,16 @@ class Source < Increase::Internal::Type::BaseModel # @return [Object, nil] required :other, Increase::Internal::Type::Unknown, nil?: true + # @!attribute outbound_card_push_transfer_instruction + # An Outbound Card Push Transfer Instruction object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_instruction`. + # + # @return [Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction, nil] + required :outbound_card_push_transfer_instruction, + -> { Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction }, + nil?: true + # @!attribute real_time_payments_transfer_instruction # A Real-Time Payments Transfer Instruction object. This field will be present in # the JSON response if and only if `category` is equal to @@ -285,7 +295,7 @@ class Source < Increase::Internal::Type::BaseModel -> { Increase::PendingTransaction::Source::WireTransferInstruction }, nil?: true - # @!method initialize(account_transfer_instruction:, ach_transfer_instruction:, card_authorization:, category:, check_deposit_instruction:, check_transfer_instruction:, inbound_funds_hold:, inbound_wire_transfer_reversal:, other:, real_time_payments_transfer_instruction:, swift_transfer_instruction:, wire_transfer_instruction:) + # @!method initialize(account_transfer_instruction:, ach_transfer_instruction:, card_authorization:, category:, check_deposit_instruction:, check_transfer_instruction:, inbound_funds_hold:, inbound_wire_transfer_reversal:, other:, outbound_card_push_transfer_instruction:, real_time_payments_transfer_instruction:, swift_transfer_instruction:, wire_transfer_instruction:) # Some parameter documentations has been truncated, see # {Increase::PendingTransaction::Source} for more details. # @@ -311,6 +321,8 @@ class Source < Increase::Internal::Type::BaseModel # # @param other [Object, nil] If the category of this Transaction source is equal to `other`, this field will # + # @param outbound_card_push_transfer_instruction [Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction, nil] An Outbound Card Push Transfer Instruction object. This field will be present in + # # @param real_time_payments_transfer_instruction [Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction, nil] A Real-Time Payments Transfer Instruction object. This field will be present in # # @param swift_transfer_instruction [Increase::PendingTransaction::Source::SwiftTransferInstruction, nil] A Swift Transfer Instruction object. This field will be present in the JSON resp @@ -1195,6 +1207,9 @@ module Category # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION = :swift_transfer_instruction + # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. + OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = :outbound_card_push_transfer_instruction + # The Pending Transaction was made for an undocumented or deprecated reason. OTHER = :other @@ -1528,6 +1543,35 @@ class InboundWireTransferReversal < Increase::Internal::Type::BaseModel # @param inbound_wire_transfer_id [String] The ID of the Inbound Wire Transfer that is being reversed. end + # @see Increase::PendingTransaction::Source#outbound_card_push_transfer_instruction + class OutboundCardPushTransferInstruction < Increase::Internal::Type::BaseModel + # @!attribute amount + # The transfer amount in USD cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute transfer_id + # The identifier of the Outbound Card Push Transfer that led to this Pending + # Transaction. + # + # @return [String] + required :transfer_id, String + + # @!method initialize(amount:, transfer_id:) + # Some parameter documentations has been truncated, see + # {Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction} for + # more details. + # + # An Outbound Card Push Transfer Instruction object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_instruction`. + # + # @param amount [Integer] The transfer amount in USD cents. + # + # @param transfer_id [String] The identifier of the Outbound Card Push Transfer that led to this Pending Trans + end + # @see Increase::PendingTransaction::Source#real_time_payments_transfer_instruction class RealTimePaymentsTransferInstruction < Increase::Internal::Type::BaseModel # @!attribute amount diff --git a/lib/increase/models/pending_transaction_list_params.rb b/lib/increase/models/pending_transaction_list_params.rb index 362acd5a5..3a73f05d0 100644 --- a/lib/increase/models/pending_transaction_list_params.rb +++ b/lib/increase/models/pending_transaction_list_params.rb @@ -118,6 +118,9 @@ module In # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION = :swift_transfer_instruction + # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. + OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = :outbound_card_push_transfer_instruction + # The Pending Transaction was made for an undocumented or deprecated reason. OTHER = :other diff --git a/lib/increase/models/transaction.rb b/lib/increase/models/transaction.rb index af78f9fa5..1980a2231 100644 --- a/lib/increase/models/transaction.rb +++ b/lib/increase/models/transaction.rb @@ -430,6 +430,18 @@ class Source < Increase::Internal::Type::BaseModel # @return [Object, nil] required :other, Increase::Internal::Type::Unknown, nil?: true + # @!attribute outbound_card_push_transfer_acceptance + # An Outbound Card Push Transfer Acceptance object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer + # Acceptance is created when an Outbound Card Push Transfer sent from Increase is + # accepted by the receiving bank. + # + # @return [Increase::Transaction::Source::OutboundCardPushTransferAcceptance, nil] + required :outbound_card_push_transfer_acceptance, + -> { Increase::Transaction::Source::OutboundCardPushTransferAcceptance }, + nil?: true + # @!attribute real_time_payments_transfer_acknowledgement # A Real-Time Payments Transfer Acknowledgement object. This field will be present # in the JSON response if and only if `category` is equal to @@ -472,7 +484,7 @@ class Source < Increase::Internal::Type::BaseModel }, nil?: true - # @!method initialize(account_transfer_intention:, ach_transfer_intention:, ach_transfer_rejection:, ach_transfer_return:, card_dispute_acceptance:, card_dispute_loss:, card_refund:, card_revenue_payment:, card_settlement:, cashback_payment:, category:, check_deposit_acceptance:, check_deposit_return:, check_transfer_deposit:, fee_payment:, inbound_ach_transfer:, inbound_ach_transfer_return_intention:, inbound_check_adjustment:, inbound_check_deposit_return_intention:, inbound_real_time_payments_transfer_confirmation:, inbound_real_time_payments_transfer_decline:, inbound_wire_reversal:, inbound_wire_transfer:, inbound_wire_transfer_reversal:, interest_payment:, internal_source:, other:, real_time_payments_transfer_acknowledgement:, sample_funds:, swift_transfer_intention:, wire_transfer_intention:) + # @!method initialize(account_transfer_intention:, ach_transfer_intention:, ach_transfer_rejection:, ach_transfer_return:, card_dispute_acceptance:, card_dispute_loss:, card_refund:, card_revenue_payment:, card_settlement:, cashback_payment:, category:, check_deposit_acceptance:, check_deposit_return:, check_transfer_deposit:, fee_payment:, inbound_ach_transfer:, inbound_ach_transfer_return_intention:, inbound_check_adjustment:, inbound_check_deposit_return_intention:, inbound_real_time_payments_transfer_confirmation:, inbound_real_time_payments_transfer_decline:, inbound_wire_reversal:, inbound_wire_transfer:, inbound_wire_transfer_reversal:, interest_payment:, internal_source:, other:, outbound_card_push_transfer_acceptance:, real_time_payments_transfer_acknowledgement:, sample_funds:, swift_transfer_intention:, wire_transfer_intention:) # Some parameter documentations has been truncated, see # {Increase::Transaction::Source} for more details. # @@ -535,6 +547,8 @@ class Source < Increase::Internal::Type::BaseModel # # @param other [Object, nil] If the category of this Transaction source is equal to `other`, this field will # + # @param outbound_card_push_transfer_acceptance [Increase::Transaction::Source::OutboundCardPushTransferAcceptance, nil] An Outbound Card Push Transfer Acceptance object. This field will be present in + # # @param real_time_payments_transfer_acknowledgement [Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement, nil] A Real-Time Payments Transfer Acknowledgement object. This field will be present # # @param sample_funds [Increase::Transaction::Source::SampleFunds, nil] A Sample Funds object. This field will be present in the JSON response if and on @@ -4066,6 +4080,9 @@ module Category # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION = :swift_transfer_intention + # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. + OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = :outbound_card_push_transfer_acceptance + # The Transaction was made for an undocumented or deprecated reason. OTHER = :other @@ -5626,6 +5643,32 @@ module Reason end end + # @see Increase::Transaction::Source#outbound_card_push_transfer_acceptance + class OutboundCardPushTransferAcceptance < Increase::Internal::Type::BaseModel + # @!attribute amount + # The transfer amount in USD cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute transfer_id + # The identifier of the Outbound Card Push Transfer that led to this Transaction. + # + # @return [String] + required :transfer_id, String + + # @!method initialize(amount:, transfer_id:) + # An Outbound Card Push Transfer Acceptance object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer + # Acceptance is created when an Outbound Card Push Transfer sent from Increase is + # accepted by the receiving bank. + # + # @param amount [Integer] The transfer amount in USD cents. + # + # @param transfer_id [String] The identifier of the Outbound Card Push Transfer that led to this Transaction. + end + # @see Increase::Transaction::Source#real_time_payments_transfer_acknowledgement class RealTimePaymentsTransferAcknowledgement < Increase::Internal::Type::BaseModel # @!attribute amount diff --git a/lib/increase/models/transaction_list_params.rb b/lib/increase/models/transaction_list_params.rb index 9fdbe1f76..076f3364e 100644 --- a/lib/increase/models/transaction_list_params.rb +++ b/lib/increase/models/transaction_list_params.rb @@ -169,6 +169,9 @@ module In # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION = :swift_transfer_intention + # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. + OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = :outbound_card_push_transfer_acceptance + # The Transaction was made for an undocumented or deprecated reason. OTHER = :other diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 18d2a0dad..5e251f62a 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "0.1.0.pre.alpha.24" + VERSION = "0.1.0.pre.alpha.25" end diff --git a/rbi/increase/internal/type/array_of.rbi b/rbi/increase/internal/type/array_of.rbi index 37ecf3088..2e657607e 100644 --- a/rbi/increase/internal/type/array_of.rbi +++ b/rbi/increase/internal/type/array_of.rbi @@ -8,6 +8,7 @@ module Increase # Array of items of a given type. class ArrayOf include Increase::Internal::Type::Converter + include Increase::Internal::Util::SorbetRuntimeSupport abstract! @@ -63,6 +64,11 @@ module Increase def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { returns(Elem) } protected def item_type diff --git a/rbi/increase/internal/type/base_model.rbi b/rbi/increase/internal/type/base_model.rbi index 2bd6dd6d7..5bedf1d27 100644 --- a/rbi/increase/internal/type/base_model.rbi +++ b/rbi/increase/internal/type/base_model.rbi @@ -197,6 +197,11 @@ module Increase end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end class << self diff --git a/rbi/increase/internal/type/boolean.rbi b/rbi/increase/internal/type/boolean.rbi index 47f7f9a7d..9149d3238 100644 --- a/rbi/increase/internal/type/boolean.rbi +++ b/rbi/increase/internal/type/boolean.rbi @@ -8,6 +8,7 @@ module Increase # Ruby has no Boolean class; this is something for models to refer to. class Boolean extend Increase::Internal::Type::Converter + extend Increase::Internal::Util::SorbetRuntimeSupport abstract! @@ -43,6 +44,11 @@ module Increase end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end end end diff --git a/rbi/increase/internal/type/enum.rbi b/rbi/increase/internal/type/enum.rbi index 09db3360c..74f31218d 100644 --- a/rbi/increase/internal/type/enum.rbi +++ b/rbi/increase/internal/type/enum.rbi @@ -67,6 +67,11 @@ module Increase def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { params(depth: Integer).returns(String) } def inspect(depth: 0) diff --git a/rbi/increase/internal/type/file_input.rbi b/rbi/increase/internal/type/file_input.rbi index d166a656c..4df70bad8 100644 --- a/rbi/increase/internal/type/file_input.rbi +++ b/rbi/increase/internal/type/file_input.rbi @@ -47,6 +47,11 @@ module Increase end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end end end diff --git a/rbi/increase/internal/type/hash_of.rbi b/rbi/increase/internal/type/hash_of.rbi index 551125ab3..0ce3f4279 100644 --- a/rbi/increase/internal/type/hash_of.rbi +++ b/rbi/increase/internal/type/hash_of.rbi @@ -8,6 +8,7 @@ module Increase # Hash of items of a given type. class HashOf include Increase::Internal::Type::Converter + include Increase::Internal::Util::SorbetRuntimeSupport abstract! @@ -63,6 +64,11 @@ module Increase def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { returns(Elem) } protected def item_type diff --git a/rbi/increase/internal/type/union.rbi b/rbi/increase/internal/type/union.rbi index 4c873164d..bd7ef7c79 100644 --- a/rbi/increase/internal/type/union.rbi +++ b/rbi/increase/internal/type/union.rbi @@ -101,6 +101,11 @@ module Increase def dump(value, state:) end + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + # @api private sig { params(depth: Integer).returns(String) } def inspect(depth: 0) diff --git a/rbi/increase/internal/type/unknown.rbi b/rbi/increase/internal/type/unknown.rbi index f85d4fdda..67a9ef9bb 100644 --- a/rbi/increase/internal/type/unknown.rbi +++ b/rbi/increase/internal/type/unknown.rbi @@ -8,6 +8,7 @@ module Increase # When we don't know what to expect for the value. class Unknown extend Increase::Internal::Type::Converter + extend Increase::Internal::Util::SorbetRuntimeSupport abstract! @@ -43,6 +44,11 @@ module Increase end def dump(value, state:) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end end end end diff --git a/rbi/increase/internal/util.rbi b/rbi/increase/internal/util.rbi index 3d42fefcd..4f89af808 100644 --- a/rbi/increase/internal/util.rbi +++ b/rbi/increase/internal/util.rbi @@ -11,6 +11,15 @@ module Increase def self.monotonic_secs end + # @api private + sig do + params(ns: T.any(Module, T::Class[T.anything])).returns( + T::Enumerable[T.any(Module, T::Class[T.anything])] + ) + end + def self.walk_namespaces(ns) + end + class << self # @api private sig { returns(String) } @@ -441,10 +450,35 @@ module Increase def const_missing(name) end + # @api private + sig { params(name: Symbol).returns(T::Boolean) } + def sorbet_constant_defined?(name) + end + # @api private sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void } def define_sorbet_constant!(name, &blk) end + + # @api private + sig { returns(T.anything) } + def to_sorbet_type + end + + class << self + # @api private + sig do + params( + type: + T.any( + Increase::Internal::Util::SorbetRuntimeSupport, + T.anything + ) + ).returns(T.anything) + end + def to_sorbet_type(type) + end + end end end end diff --git a/rbi/increase/models/event.rbi b/rbi/increase/models/event.rbi index 4bb135c39..ff982d62e 100644 --- a/rbi/increase/models/event.rbi +++ b/rbi/increase/models/event.rbi @@ -493,6 +493,20 @@ module Increase Increase::Event::Category::TaggedSymbol ) + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = + T.let( + :"outbound_card_push_transfer.created", + Increase::Event::Category::TaggedSymbol + ) + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"outbound_card_push_transfer.updated", + Increase::Event::Category::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/event_list_params.rbi b/rbi/increase/models/event_list_params.rbi index f5c0809f3..144d5359c 100644 --- a/rbi/increase/models/event_list_params.rbi +++ b/rbi/increase/models/event_list_params.rbi @@ -592,6 +592,20 @@ module Increase Increase::EventListParams::Category::In::TaggedSymbol ) + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = + T.let( + :"outbound_card_push_transfer.created", + Increase::EventListParams::Category::In::TaggedSymbol + ) + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"outbound_card_push_transfer.updated", + Increase::EventListParams::Category::In::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/event_subscription.rbi b/rbi/increase/models/event_subscription.rbi index 9f7bb0ab3..91b4cdee8 100644 --- a/rbi/increase/models/event_subscription.rbi +++ b/rbi/increase/models/event_subscription.rbi @@ -576,6 +576,20 @@ module Increase Increase::EventSubscription::SelectedEventCategory::TaggedSymbol ) + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = + T.let( + :"outbound_card_push_transfer.created", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"outbound_card_push_transfer.updated", + Increase::EventSubscription::SelectedEventCategory::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/event_subscription_create_params.rbi b/rbi/increase/models/event_subscription_create_params.rbi index b7098ad15..036e6a64f 100644 --- a/rbi/increase/models/event_subscription_create_params.rbi +++ b/rbi/increase/models/event_subscription_create_params.rbi @@ -556,6 +556,20 @@ module Increase Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol ) + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED = + T.let( + :"outbound_card_push_transfer.created", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED = + T.let( + :"outbound_card_push_transfer.updated", + Increase::EventSubscriptionCreateParams::SelectedEventCategory::TaggedSymbol + ) + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED = T.let( diff --git a/rbi/increase/models/pending_transaction.rbi b/rbi/increase/models/pending_transaction.rbi index 43a21a0ef..84e673c41 100644 --- a/rbi/increase/models/pending_transaction.rbi +++ b/rbi/increase/models/pending_transaction.rbi @@ -397,6 +397,28 @@ module Increase sig { returns(T.nilable(T.anything)) } attr_accessor :other + # An Outbound Card Push Transfer Instruction object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_instruction`. + sig do + returns( + T.nilable( + Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction + ) + ) + end + attr_reader :outbound_card_push_transfer_instruction + + sig do + params( + outbound_card_push_transfer_instruction: + T.nilable( + Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction::OrHash + ) + ).void + end + attr_writer :outbound_card_push_transfer_instruction + # A Real-Time Payments Transfer Instruction object. This field will be present in # the JSON response if and only if `category` is equal to # `real_time_payments_transfer_instruction`. @@ -496,6 +518,10 @@ module Increase Increase::PendingTransaction::Source::InboundWireTransferReversal::OrHash ), other: T.nilable(T.anything), + outbound_card_push_transfer_instruction: + T.nilable( + Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction::OrHash + ), real_time_payments_transfer_instruction: T.nilable( Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction::OrHash @@ -544,6 +570,10 @@ module Increase # If the category of this Transaction source is equal to `other`, this field will # contain an empty object, otherwise it will contain null. other:, + # An Outbound Card Push Transfer Instruction object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_instruction`. + outbound_card_push_transfer_instruction:, # A Real-Time Payments Transfer Instruction object. This field will be present in # the JSON response if and only if `category` is equal to # `real_time_payments_transfer_instruction`. @@ -591,6 +621,10 @@ module Increase Increase::PendingTransaction::Source::InboundWireTransferReversal ), other: T.nilable(T.anything), + outbound_card_push_transfer_instruction: + T.nilable( + Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction + ), real_time_payments_transfer_instruction: T.nilable( Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction @@ -2275,6 +2309,13 @@ module Increase Increase::PendingTransaction::Source::Category::TaggedSymbol ) + # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. + OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = + T.let( + :outbound_card_push_transfer_instruction, + Increase::PendingTransaction::Source::Category::TaggedSymbol + ) + # The Pending Transaction was made for an undocumented or deprecated reason. OTHER = T.let( @@ -2875,6 +2916,46 @@ module Increase end end + class OutboundCardPushTransferInstruction < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction, + Increase::Internal::AnyHash + ) + end + + # The transfer amount in USD cents. + sig { returns(Integer) } + attr_accessor :amount + + # The identifier of the Outbound Card Push Transfer that led to this Pending + # Transaction. + sig { returns(String) } + attr_accessor :transfer_id + + # An Outbound Card Push Transfer Instruction object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_instruction`. + sig do + params(amount: Integer, transfer_id: String).returns( + T.attached_class + ) + end + def self.new( + # The transfer amount in USD cents. + amount:, + # The identifier of the Outbound Card Push Transfer that led to this Pending + # Transaction. + transfer_id: + ) + end + + sig { override.returns({ amount: Integer, transfer_id: String }) } + def to_hash + end + end + class RealTimePaymentsTransferInstruction < Increase::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/increase/models/pending_transaction_list_params.rbi b/rbi/increase/models/pending_transaction_list_params.rbi index cd8c064a0..e27686bb9 100644 --- a/rbi/increase/models/pending_transaction_list_params.rbi +++ b/rbi/increase/models/pending_transaction_list_params.rbi @@ -265,6 +265,13 @@ module Increase Increase::PendingTransactionListParams::Category::In::TaggedSymbol ) + # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. + OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION = + T.let( + :outbound_card_push_transfer_instruction, + Increase::PendingTransactionListParams::Category::In::TaggedSymbol + ) + # The Pending Transaction was made for an undocumented or deprecated reason. OTHER = T.let( diff --git a/rbi/increase/models/transaction.rbi b/rbi/increase/models/transaction.rbi index e7a22ae2a..96b0a0ed8 100644 --- a/rbi/increase/models/transaction.rbi +++ b/rbi/increase/models/transaction.rbi @@ -711,6 +711,30 @@ module Increase sig { returns(T.nilable(T.anything)) } attr_accessor :other + # An Outbound Card Push Transfer Acceptance object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer + # Acceptance is created when an Outbound Card Push Transfer sent from Increase is + # accepted by the receiving bank. + sig do + returns( + T.nilable( + Increase::Transaction::Source::OutboundCardPushTransferAcceptance + ) + ) + end + attr_reader :outbound_card_push_transfer_acceptance + + sig do + params( + outbound_card_push_transfer_acceptance: + T.nilable( + Increase::Transaction::Source::OutboundCardPushTransferAcceptance::OrHash + ) + ).void + end + attr_writer :outbound_card_push_transfer_acceptance + # A Real-Time Payments Transfer Acknowledgement object. This field will be present # in the JSON response if and only if `category` is equal to # `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer @@ -883,6 +907,10 @@ module Increase internal_source: T.nilable(Increase::Transaction::Source::InternalSource::OrHash), other: T.nilable(T.anything), + outbound_card_push_transfer_acceptance: + T.nilable( + Increase::Transaction::Source::OutboundCardPushTransferAcceptance::OrHash + ), real_time_payments_transfer_acknowledgement: T.nilable( Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement::OrHash @@ -1037,6 +1065,12 @@ module Increase # If the category of this Transaction source is equal to `other`, this field will # contain an empty object, otherwise it will contain null. other:, + # An Outbound Card Push Transfer Acceptance object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer + # Acceptance is created when an Outbound Card Push Transfer sent from Increase is + # accepted by the receiving bank. + outbound_card_push_transfer_acceptance:, # A Real-Time Payments Transfer Acknowledgement object. This field will be present # in the JSON response if and only if `category` is equal to # `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer @@ -1127,6 +1161,10 @@ module Increase internal_source: T.nilable(Increase::Transaction::Source::InternalSource), other: T.nilable(T.anything), + outbound_card_push_transfer_acceptance: + T.nilable( + Increase::Transaction::Source::OutboundCardPushTransferAcceptance + ), real_time_payments_transfer_acknowledgement: T.nilable( Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement @@ -7520,6 +7558,13 @@ module Increase Increase::Transaction::Source::Category::TaggedSymbol ) + # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. + OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = + T.let( + :outbound_card_push_transfer_acceptance, + Increase::Transaction::Source::Category::TaggedSymbol + ) + # The Transaction was made for an undocumented or deprecated reason. OTHER = T.let(:other, Increase::Transaction::Source::Category::TaggedSymbol) @@ -10149,6 +10194,46 @@ module Increase end end + class OutboundCardPushTransferAcceptance < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::OutboundCardPushTransferAcceptance, + Increase::Internal::AnyHash + ) + end + + # The transfer amount in USD cents. + sig { returns(Integer) } + attr_accessor :amount + + # The identifier of the Outbound Card Push Transfer that led to this Transaction. + sig { returns(String) } + attr_accessor :transfer_id + + # An Outbound Card Push Transfer Acceptance object. This field will be present in + # the JSON response if and only if `category` is equal to + # `outbound_card_push_transfer_acceptance`. An Outbound Card Push Transfer + # Acceptance is created when an Outbound Card Push Transfer sent from Increase is + # accepted by the receiving bank. + sig do + params(amount: Integer, transfer_id: String).returns( + T.attached_class + ) + end + def self.new( + # The transfer amount in USD cents. + amount:, + # The identifier of the Outbound Card Push Transfer that led to this Transaction. + transfer_id: + ) + end + + sig { override.returns({ amount: Integer, transfer_id: String }) } + def to_hash + end + end + class RealTimePaymentsTransferAcknowledgement < Increase::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/increase/models/transaction_list_params.rbi b/rbi/increase/models/transaction_list_params.rbi index ee85b16af..9f47d8a2b 100644 --- a/rbi/increase/models/transaction_list_params.rbi +++ b/rbi/increase/models/transaction_list_params.rbi @@ -369,6 +369,13 @@ module Increase Increase::TransactionListParams::Category::In::TaggedSymbol ) + # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. + OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE = + T.let( + :outbound_card_push_transfer_acceptance, + Increase::TransactionListParams::Category::In::TaggedSymbol + ) + # The Transaction was made for an undocumented or deprecated reason. OTHER = T.let( diff --git a/sig/increase/internal/type/array_of.rbs b/sig/increase/internal/type/array_of.rbs index 7e41c01f1..eccc5a495 100644 --- a/sig/increase/internal/type/array_of.rbs +++ b/sig/increase/internal/type/array_of.rbs @@ -3,6 +3,7 @@ module Increase module Type class ArrayOf[Elem] include Increase::Internal::Type::Converter + include Increase::Internal::Util::SorbetRuntimeSupport def self.[]: ( ::Hash[Symbol, top] @@ -27,6 +28,8 @@ module Increase state: Increase::Internal::Type::Converter::dump_state ) -> (::Array[top] | top) + def to_sorbet_type: -> top + def item_type: -> Elem def nilable?: -> bool diff --git a/sig/increase/internal/type/base_model.rbs b/sig/increase/internal/type/base_model.rbs index 1ef9c1d88..dee9c1ab2 100644 --- a/sig/increase/internal/type/base_model.rbs +++ b/sig/increase/internal/type/base_model.rbs @@ -68,6 +68,8 @@ module Increase state: Increase::Internal::Type::Converter::dump_state ) -> (::Hash[top, top] | top) + def self.to_sorbet_type: -> top + def self.recursively_to_h: ( Increase::Internal::Type::BaseModel model, convert: bool diff --git a/sig/increase/internal/type/boolean.rbs b/sig/increase/internal/type/boolean.rbs index f983a78ee..b5f6b7736 100644 --- a/sig/increase/internal/type/boolean.rbs +++ b/sig/increase/internal/type/boolean.rbs @@ -3,6 +3,7 @@ module Increase module Type class Boolean extend Increase::Internal::Type::Converter + extend Increase::Internal::Util::SorbetRuntimeSupport def self.===: (top other) -> bool @@ -17,6 +18,8 @@ module Increase bool | top value, state: Increase::Internal::Type::Converter::dump_state ) -> (bool | top) + + def self.to_sorbet_type: -> top end end end diff --git a/sig/increase/internal/type/enum.rbs b/sig/increase/internal/type/enum.rbs index 6acd8ddc8..69ce4d6e1 100644 --- a/sig/increase/internal/type/enum.rbs +++ b/sig/increase/internal/type/enum.rbs @@ -23,6 +23,8 @@ module Increase state: Increase::Internal::Type::Converter::dump_state ) -> (Symbol | top) + def to_sorbet_type: -> top + def inspect: (?depth: Integer) -> String end end diff --git a/sig/increase/internal/type/file_input.rbs b/sig/increase/internal/type/file_input.rbs index 6db29dce8..4757779b1 100644 --- a/sig/increase/internal/type/file_input.rbs +++ b/sig/increase/internal/type/file_input.rbs @@ -17,6 +17,8 @@ module Increase Pathname | StringIO | IO | String | top value, state: Increase::Internal::Type::Converter::dump_state ) -> (Pathname | StringIO | IO | String | top) + + def self.to_sorbet_type: -> top end end end diff --git a/sig/increase/internal/type/hash_of.rbs b/sig/increase/internal/type/hash_of.rbs index 870585e14..d97e395e2 100644 --- a/sig/increase/internal/type/hash_of.rbs +++ b/sig/increase/internal/type/hash_of.rbs @@ -3,6 +3,7 @@ module Increase module Type class HashOf[Elem] include Increase::Internal::Type::Converter + include Increase::Internal::Util::SorbetRuntimeSupport def self.[]: ( ::Hash[Symbol, top] @@ -27,6 +28,8 @@ module Increase state: Increase::Internal::Type::Converter::dump_state ) -> (::Hash[Symbol, top] | top) + def to_sorbet_type: -> top + def item_type: -> Elem def nilable?: -> bool diff --git a/sig/increase/internal/type/union.rbs b/sig/increase/internal/type/union.rbs index 73c295a5b..164c5f93e 100644 --- a/sig/increase/internal/type/union.rbs +++ b/sig/increase/internal/type/union.rbs @@ -43,6 +43,8 @@ module Increase state: Increase::Internal::Type::Converter::dump_state ) -> top + def to_sorbet_type: -> top + def inspect: (?depth: Integer) -> String end end diff --git a/sig/increase/internal/type/unknown.rbs b/sig/increase/internal/type/unknown.rbs index 1d3bd1141..2fdad104a 100644 --- a/sig/increase/internal/type/unknown.rbs +++ b/sig/increase/internal/type/unknown.rbs @@ -3,6 +3,7 @@ module Increase module Type class Unknown extend Increase::Internal::Type::Converter + extend Increase::Internal::Util::SorbetRuntimeSupport def self.===: (top other) -> bool @@ -17,6 +18,8 @@ module Increase top value, state: Increase::Internal::Type::Converter::dump_state ) -> top + + def self.to_sorbet_type: -> top end end end diff --git a/sig/increase/internal/util.rbs b/sig/increase/internal/util.rbs index 6f79420d7..a4c83d429 100644 --- a/sig/increase/internal/util.rbs +++ b/sig/increase/internal/util.rbs @@ -5,6 +5,10 @@ module Increase def self?.monotonic_secs: -> Float + def self?.walk_namespaces: ( + Module | Class ns + ) -> Enumerable[(Module | Class)] + def self?.arch: -> String def self?.os: -> String @@ -166,7 +170,15 @@ module Increase def const_missing: (Symbol name) -> void + def sorbet_constant_defined?: (Symbol name) -> bool + def define_sorbet_constant!: (Symbol name) { -> top } -> void + + def to_sorbet_type: -> top + + def self.to_sorbet_type: ( + Increase::Internal::Util::SorbetRuntimeSupport | top `type` + ) -> top end end end diff --git a/sig/increase/models/event.rbs b/sig/increase/models/event.rbs index 5a1874b00..d5e675f88 100644 --- a/sig/increase/models/event.rbs +++ b/sig/increase/models/event.rbs @@ -97,6 +97,8 @@ module Increase | :"lockbox.updated" | :"oauth_connection.created" | :"oauth_connection.deactivated" + | :"outbound_card_push_transfer.created" + | :"outbound_card_push_transfer.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -315,6 +317,12 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" diff --git a/sig/increase/models/event_list_params.rbs b/sig/increase/models/event_list_params.rbs index 3fb2b6e18..c1a32a80d 100644 --- a/sig/increase/models/event_list_params.rbs +++ b/sig/increase/models/event_list_params.rbs @@ -125,6 +125,8 @@ module Increase | :"lockbox.updated" | :"oauth_connection.created" | :"oauth_connection.deactivated" + | :"outbound_card_push_transfer.created" + | :"outbound_card_push_transfer.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -343,6 +345,12 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" diff --git a/sig/increase/models/event_subscription.rbs b/sig/increase/models/event_subscription.rbs index 6df105a22..2c9e5225e 100644 --- a/sig/increase/models/event_subscription.rbs +++ b/sig/increase/models/event_subscription.rbs @@ -105,6 +105,8 @@ module Increase | :"lockbox.updated" | :"oauth_connection.created" | :"oauth_connection.deactivated" + | :"outbound_card_push_transfer.created" + | :"outbound_card_push_transfer.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -323,6 +325,12 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" diff --git a/sig/increase/models/event_subscription_create_params.rbs b/sig/increase/models/event_subscription_create_params.rbs index 8f4a93015..d837614bb 100644 --- a/sig/increase/models/event_subscription_create_params.rbs +++ b/sig/increase/models/event_subscription_create_params.rbs @@ -102,6 +102,8 @@ module Increase | :"lockbox.updated" | :"oauth_connection.created" | :"oauth_connection.deactivated" + | :"outbound_card_push_transfer.created" + | :"outbound_card_push_transfer.updated" | :"pending_transaction.created" | :"pending_transaction.updated" | :"physical_card.created" @@ -320,6 +322,12 @@ module Increase # Occurs whenever an OAuth Connection is deactivated. OAUTH_CONNECTION_DEACTIVATED: :"oauth_connection.deactivated" + # Occurs whenever an Outbound Card Push Transfer is created. + OUTBOUND_CARD_PUSH_TRANSFER_CREATED: :"outbound_card_push_transfer.created" + + # Occurs whenever an Outbound Card Push Transfer is updated. + OUTBOUND_CARD_PUSH_TRANSFER_UPDATED: :"outbound_card_push_transfer.updated" + # Occurs whenever a Pending Transaction is created. PENDING_TRANSACTION_CREATED: :"pending_transaction.created" diff --git a/sig/increase/models/pending_transaction.rbs b/sig/increase/models/pending_transaction.rbs index 1f181eb6f..733471d37 100644 --- a/sig/increase/models/pending_transaction.rbs +++ b/sig/increase/models/pending_transaction.rbs @@ -110,6 +110,7 @@ module Increase inbound_funds_hold: Increase::PendingTransaction::Source::InboundFundsHold?, inbound_wire_transfer_reversal: Increase::PendingTransaction::Source::InboundWireTransferReversal?, other: top?, + outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction?, real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction?, swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction?, wire_transfer_instruction: Increase::PendingTransaction::Source::WireTransferInstruction? @@ -134,6 +135,8 @@ module Increase attr_accessor other: top? + attr_accessor outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction? + attr_accessor real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction? attr_accessor swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction? @@ -150,6 +153,7 @@ module Increase inbound_funds_hold: Increase::PendingTransaction::Source::InboundFundsHold?, inbound_wire_transfer_reversal: Increase::PendingTransaction::Source::InboundWireTransferReversal?, other: top?, + outbound_card_push_transfer_instruction: Increase::PendingTransaction::Source::OutboundCardPushTransferInstruction?, real_time_payments_transfer_instruction: Increase::PendingTransaction::Source::RealTimePaymentsTransferInstruction?, swift_transfer_instruction: Increase::PendingTransaction::Source::SwiftTransferInstruction?, wire_transfer_instruction: Increase::PendingTransaction::Source::WireTransferInstruction? @@ -741,6 +745,7 @@ module Increase | :wire_transfer_instruction | :inbound_wire_transfer_reversal | :swift_transfer_instruction + | :outbound_card_push_transfer_instruction | :other module Category @@ -776,6 +781,9 @@ module Increase # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION: :swift_transfer_instruction + # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. + OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION: :outbound_card_push_transfer_instruction + # The Pending Transaction was made for an undocumented or deprecated reason. OTHER: :other @@ -992,6 +1000,17 @@ module Increase def initialize: (inbound_wire_transfer_id: String) -> void end + type outbound_card_push_transfer_instruction = + { amount: Integer, transfer_id: String } + + class OutboundCardPushTransferInstruction < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor transfer_id: String + + def initialize: (amount: Integer, transfer_id: String) -> void + end + type real_time_payments_transfer_instruction = { amount: Integer, transfer_id: String } diff --git a/sig/increase/models/pending_transaction_list_params.rbs b/sig/increase/models/pending_transaction_list_params.rbs index 192c55c95..fc6f47b0a 100644 --- a/sig/increase/models/pending_transaction_list_params.rbs +++ b/sig/increase/models/pending_transaction_list_params.rbs @@ -86,6 +86,7 @@ module Increase | :wire_transfer_instruction | :inbound_wire_transfer_reversal | :swift_transfer_instruction + | :outbound_card_push_transfer_instruction | :other module In @@ -121,6 +122,9 @@ module Increase # Swift Transfer Instruction: details will be under the `swift_transfer_instruction` object. SWIFT_TRANSFER_INSTRUCTION: :swift_transfer_instruction + # Outbound Card Push Transfer Instruction: details will be under the `outbound_card_push_transfer_instruction` object. + OUTBOUND_CARD_PUSH_TRANSFER_INSTRUCTION: :outbound_card_push_transfer_instruction + # The Pending Transaction was made for an undocumented or deprecated reason. OTHER: :other diff --git a/sig/increase/models/transaction.rbs b/sig/increase/models/transaction.rbs index 832b768a5..4a085a4a5 100644 --- a/sig/increase/models/transaction.rbs +++ b/sig/increase/models/transaction.rbs @@ -120,6 +120,7 @@ module Increase interest_payment: Increase::Transaction::Source::InterestPayment?, internal_source: Increase::Transaction::Source::InternalSource?, other: top?, + outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance?, real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement?, sample_funds: Increase::Transaction::Source::SampleFunds?, swift_transfer_intention: Increase::Transaction::Source::SwiftTransferIntention?, @@ -181,6 +182,8 @@ module Increase attr_accessor other: top? + attr_accessor outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance? + attr_accessor real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement? attr_accessor sample_funds: Increase::Transaction::Source::SampleFunds? @@ -217,6 +220,7 @@ module Increase interest_payment: Increase::Transaction::Source::InterestPayment?, internal_source: Increase::Transaction::Source::InternalSource?, other: top?, + outbound_card_push_transfer_acceptance: Increase::Transaction::Source::OutboundCardPushTransferAcceptance?, real_time_payments_transfer_acknowledgement: Increase::Transaction::Source::RealTimePaymentsTransferAcknowledgement?, sample_funds: Increase::Transaction::Source::SampleFunds?, swift_transfer_intention: Increase::Transaction::Source::SwiftTransferIntention?, @@ -2628,6 +2632,7 @@ module Increase | :sample_funds | :wire_transfer_intention | :swift_transfer_intention + | :outbound_card_push_transfer_acceptance | :other module Category @@ -2720,6 +2725,9 @@ module Increase # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION: :swift_transfer_intention + # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. + OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE: :outbound_card_push_transfer_acceptance + # The Transaction was made for an undocumented or deprecated reason. OTHER: :other @@ -3751,6 +3759,17 @@ module Increase end end + type outbound_card_push_transfer_acceptance = + { amount: Integer, transfer_id: String } + + class OutboundCardPushTransferAcceptance < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor transfer_id: String + + def initialize: (amount: Integer, transfer_id: String) -> void + end + type real_time_payments_transfer_acknowledgement = { amount: Integer, diff --git a/sig/increase/models/transaction_list_params.rbs b/sig/increase/models/transaction_list_params.rbs index 71dc1d524..bdbb51bb8 100644 --- a/sig/increase/models/transaction_list_params.rbs +++ b/sig/increase/models/transaction_list_params.rbs @@ -97,6 +97,7 @@ module Increase | :sample_funds | :wire_transfer_intention | :swift_transfer_intention + | :outbound_card_push_transfer_acceptance | :other module In @@ -189,6 +190,9 @@ module Increase # Swift Transfer Intention: details will be under the `swift_transfer_intention` object. SWIFT_TRANSFER_INTENTION: :swift_transfer_intention + # Outbound Card Push Transfer Acceptance: details will be under the `outbound_card_push_transfer_acceptance` object. + OUTBOUND_CARD_PUSH_TRANSFER_ACCEPTANCE: :outbound_card_push_transfer_acceptance + # The Transaction was made for an undocumented or deprecated reason. OTHER: :other