From d7242c9324279e98e91c12da50e85a330e83c149 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:19:54 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 6 +- lib/increase.rb | 5 +- .../inbound_funds_hold_release_response.rb | 161 ---------- ...tion_release_inbound_funds_hold_params.rb} | 4 +- lib/increase/resources/simulations.rb | 6 +- .../simulations/inbound_funds_holds.rb | 37 --- .../simulations/pending_transactions.rb | 44 +++ .../inbound_funds_hold_release_response.rbi | 280 ------------------ ...ion_release_inbound_funds_hold_params.rbi} | 4 +- rbi/increase/resources/simulations.rbi | 4 +- ...nds_holds.rbi => pending_transactions.rbi} | 17 +- .../inbound_funds_hold_release_response.rbs | 117 -------- ...ion_release_inbound_funds_hold_params.rbs} | 4 +- sig/increase/resources/simulations.rbs | 2 +- ...nds_holds.rbs => pending_transactions.rbs} | 8 +- .../simulations/inbound_funds_holds_test.rb | 28 -- .../simulations/pending_transactions_test.rb | 32 ++ 17 files changed, 105 insertions(+), 654 deletions(-) delete mode 100644 lib/increase/models/simulations/inbound_funds_hold_release_response.rb rename lib/increase/models/simulations/{inbound_funds_hold_release_params.rb => pending_transaction_release_inbound_funds_hold_params.rb} (66%) delete mode 100644 lib/increase/resources/simulations/inbound_funds_holds.rb create mode 100644 lib/increase/resources/simulations/pending_transactions.rb delete mode 100644 rbi/increase/models/simulations/inbound_funds_hold_release_response.rbi rename rbi/increase/models/simulations/{inbound_funds_hold_release_params.rbi => pending_transaction_release_inbound_funds_hold_params.rbi} (78%) rename rbi/increase/resources/simulations/{inbound_funds_holds.rbi => pending_transactions.rbi} (55%) delete mode 100644 sig/increase/models/simulations/inbound_funds_hold_release_response.rbs rename sig/increase/models/simulations/{inbound_funds_hold_release_params.rbs => pending_transaction_release_inbound_funds_hold_params.rbs} (71%) rename sig/increase/resources/simulations/{inbound_funds_holds.rbs => pending_transactions.rbs} (53%) delete mode 100644 test/increase/resources/simulations/inbound_funds_holds_test.rb create mode 100644 test/increase/resources/simulations/pending_transactions_test.rb diff --git a/.stats.yml b/.stats.yml index 28f0f87b7..d35c27b7d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-740517a6a575bb225c5bfa111ab83611c58533d5b1514f505aab22185f4a8992.yml -openapi_spec_hash: 8bfd6dcf11d076c24e4f092dc7e151ac -config_hash: 29e452035e915a07cd64333b10a83077 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6c7f7c551cd8635ddf3fa27eb1040a4e3888c8190326472c19fd919a5e2c8c5.yml +openapi_spec_hash: 287cbadcab1cec9f352da22a4e39c160 +config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/lib/increase.rb b/lib/increase.rb index 1d4c47504..a5ef81f19 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -299,13 +299,12 @@ require_relative "increase/models/simulations/document_create_params" require_relative "increase/models/simulations/inbound_ach_transfer_create_params" require_relative "increase/models/simulations/inbound_check_deposit_create_params" -require_relative "increase/models/simulations/inbound_funds_hold_release_params" -require_relative "increase/models/simulations/inbound_funds_hold_release_response" require_relative "increase/models/simulations/inbound_mail_item_create_params" require_relative "increase/models/simulations/inbound_real_time_payments_transfer_create_params" require_relative "increase/models/simulations/inbound_wire_drawdown_request_create_params" require_relative "increase/models/simulations/inbound_wire_transfer_create_params" require_relative "increase/models/simulations/interest_payment_create_params" +require_relative "increase/models/simulations/pending_transaction_release_inbound_funds_hold_params" require_relative "increase/models/simulations/physical_card_advance_shipment_params" require_relative "increase/models/simulations/physical_card_tracking_updates_params" require_relative "increase/models/simulations/program_create_params" @@ -399,12 +398,12 @@ require_relative "increase/resources/simulations/documents" require_relative "increase/resources/simulations/inbound_ach_transfers" require_relative "increase/resources/simulations/inbound_check_deposits" -require_relative "increase/resources/simulations/inbound_funds_holds" require_relative "increase/resources/simulations/inbound_mail_items" require_relative "increase/resources/simulations/inbound_real_time_payments_transfers" require_relative "increase/resources/simulations/inbound_wire_drawdown_requests" require_relative "increase/resources/simulations/inbound_wire_transfers" require_relative "increase/resources/simulations/interest_payments" +require_relative "increase/resources/simulations/pending_transactions" require_relative "increase/resources/simulations/physical_cards" require_relative "increase/resources/simulations/programs" require_relative "increase/resources/simulations/real_time_payments_transfers" diff --git a/lib/increase/models/simulations/inbound_funds_hold_release_response.rb b/lib/increase/models/simulations/inbound_funds_hold_release_response.rb deleted file mode 100644 index 7302ee14b..000000000 --- a/lib/increase/models/simulations/inbound_funds_hold_release_response.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - module Simulations - # @see Increase::Resources::Simulations::InboundFundsHolds#release - class InboundFundsHoldReleaseResponse < Increase::Internal::Type::BaseModel - # @!attribute id - # The Inbound Funds Hold identifier. - # - # @return [String] - required :id, String - - # @!attribute amount - # The held amount in the minor unit of the account's currency. For dollars, for - # example, this is cents. - # - # @return [Integer] - required :amount, Integer - - # @!attribute automatically_releases_at - # When the hold will be released automatically. Certain conditions may cause it to - # be released before this time. - # - # @return [Time] - required :automatically_releases_at, Time - - # @!attribute created_at - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - # was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute currency - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - # currency. - # - # @return [Symbol, Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency] - required :currency, enum: -> { Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency } - - # @!attribute held_transaction_id - # The ID of the Transaction for which funds were held. - # - # @return [String, nil] - required :held_transaction_id, String, nil?: true - - # @!attribute pending_transaction_id - # The ID of the Pending Transaction representing the held funds. - # - # @return [String, nil] - required :pending_transaction_id, String, nil?: true - - # @!attribute released_at - # When the hold was released (if it has been released). - # - # @return [Time, nil] - required :released_at, Time, nil?: true - - # @!attribute status - # The status of the hold. - # - # @return [Symbol, Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status] - required :status, enum: -> { Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status } - - # @!attribute type - # A constant representing the object's type. For this resource it will always be - # `inbound_funds_hold`. - # - # @return [Symbol, Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type] - required :type, enum: -> { Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type } - - # @!method initialize(id:, amount:, automatically_releases_at:, created_at:, currency:, held_transaction_id:, pending_transaction_id:, released_at:, status:, type:) - # Some parameter documentations has been truncated, see - # {Increase::Models::Simulations::InboundFundsHoldReleaseResponse} for more - # details. - # - # We hold funds for certain transaction types to account for return windows where - # funds might still be clawed back by the sending institution. - # - # @param id [String] The Inbound Funds Hold identifier. - # - # @param amount [Integer] The held amount in the minor unit of the account's currency. For dollars, for ex - # - # @param automatically_releases_at [Time] When the hold will be released automatically. Certain conditions may cause it to - # - # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold wa - # - # @param currency [Symbol, Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's curre - # - # @param held_transaction_id [String, nil] The ID of the Transaction for which funds were held. - # - # @param pending_transaction_id [String, nil] The ID of the Pending Transaction representing the held funds. - # - # @param released_at [Time, nil] When the hold was released (if it has been released). - # - # @param status [Symbol, Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status] The status of the hold. - # - # @param type [Symbol, Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type] A constant representing the object's type. For this resource it will always be ` - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - # currency. - # - # @see Increase::Models::Simulations::InboundFundsHoldReleaseResponse#currency - module Currency - extend Increase::Internal::Type::Enum - - # Canadian Dollar (CAD) - CAD = :CAD - - # Swiss Franc (CHF) - CHF = :CHF - - # Euro (EUR) - EUR = :EUR - - # British Pound (GBP) - GBP = :GBP - - # Japanese Yen (JPY) - JPY = :JPY - - # US Dollar (USD) - USD = :USD - - # @!method self.values - # @return [Array] - end - - # The status of the hold. - # - # @see Increase::Models::Simulations::InboundFundsHoldReleaseResponse#status - module Status - extend Increase::Internal::Type::Enum - - # Funds are still being held. - HELD = :held - - # Funds have been released. - COMPLETE = :complete - - # @!method self.values - # @return [Array] - end - - # A constant representing the object's type. For this resource it will always be - # `inbound_funds_hold`. - # - # @see Increase::Models::Simulations::InboundFundsHoldReleaseResponse#type - module Type - extend Increase::Internal::Type::Enum - - INBOUND_FUNDS_HOLD = :inbound_funds_hold - - # @!method self.values - # @return [Array] - end - end - end - end -end diff --git a/lib/increase/models/simulations/inbound_funds_hold_release_params.rb b/lib/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rb similarity index 66% rename from lib/increase/models/simulations/inbound_funds_hold_release_params.rb rename to lib/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rb index d8dea1871..3bb6b5e73 100644 --- a/lib/increase/models/simulations/inbound_funds_hold_release_params.rb +++ b/lib/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rb @@ -3,8 +3,8 @@ module Increase module Models module Simulations - # @see Increase::Resources::Simulations::InboundFundsHolds#release - class InboundFundsHoldReleaseParams < Increase::Internal::Type::BaseModel + # @see Increase::Resources::Simulations::PendingTransactions#release_inbound_funds_hold + class PendingTransactionReleaseInboundFundsHoldParams < Increase::Internal::Type::BaseModel extend Increase::Internal::Type::RequestParameters::Converter include Increase::Internal::Type::RequestParameters diff --git a/lib/increase/resources/simulations.rb b/lib/increase/resources/simulations.rb index 0546bdda2..d9c8d8c57 100644 --- a/lib/increase/resources/simulations.rb +++ b/lib/increase/resources/simulations.rb @@ -36,8 +36,8 @@ class Simulations # @return [Increase::Resources::Simulations::DigitalWalletTokenRequests] attr_reader :digital_wallet_token_requests - # @return [Increase::Resources::Simulations::InboundFundsHolds] - attr_reader :inbound_funds_holds + # @return [Increase::Resources::Simulations::PendingTransactions] + attr_reader :pending_transactions # @return [Increase::Resources::Simulations::AccountTransfers] attr_reader :account_transfers @@ -108,7 +108,7 @@ def initialize(client:) @physical_cards = Increase::Resources::Simulations::PhysicalCards.new(client: client) @digital_wallet_token_requests = Increase::Resources::Simulations::DigitalWalletTokenRequests.new(client: client) - @inbound_funds_holds = Increase::Resources::Simulations::InboundFundsHolds.new(client: client) + @pending_transactions = Increase::Resources::Simulations::PendingTransactions.new(client: client) @account_transfers = Increase::Resources::Simulations::AccountTransfers.new(client: client) @ach_transfers = Increase::Resources::Simulations::ACHTransfers.new(client: client) @inbound_ach_transfers = Increase::Resources::Simulations::InboundACHTransfers.new(client: client) diff --git a/lib/increase/resources/simulations/inbound_funds_holds.rb b/lib/increase/resources/simulations/inbound_funds_holds.rb deleted file mode 100644 index 3d2420c51..000000000 --- a/lib/increase/resources/simulations/inbound_funds_holds.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Resources - class Simulations - class InboundFundsHolds - # This endpoint simulates immediately releasing an Inbound Funds Hold, which might - # be created as a result of e.g., an ACH debit. - # - # @overload release(inbound_funds_hold_id, request_options: {}) - # - # @param inbound_funds_hold_id [String] The inbound funds hold to release. - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [Increase::Models::Simulations::InboundFundsHoldReleaseResponse] - # - # @see Increase::Models::Simulations::InboundFundsHoldReleaseParams - def release(inbound_funds_hold_id, params = {}) - @client.request( - method: :post, - path: ["simulations/inbound_funds_holds/%1$s/release", inbound_funds_hold_id], - model: Increase::Models::Simulations::InboundFundsHoldReleaseResponse, - options: params[:request_options] - ) - end - - # @api private - # - # @param client [Increase::Client] - def initialize(client:) - @client = client - end - end - end - end -end diff --git a/lib/increase/resources/simulations/pending_transactions.rb b/lib/increase/resources/simulations/pending_transactions.rb new file mode 100644 index 000000000..9f2a68df5 --- /dev/null +++ b/lib/increase/resources/simulations/pending_transactions.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +module Increase + module Resources + class Simulations + class PendingTransactions + # Some parameter documentations has been truncated, see + # {Increase::Models::Simulations::PendingTransactionReleaseInboundFundsHoldParams} + # for more details. + # + # This endpoint simulates immediately releasing an Inbound Funds Hold, which might + # be created as a result of, for example, an ACH debit. + # + # @overload release_inbound_funds_hold(pending_transaction_id, request_options: {}) + # + # @param pending_transaction_id [String] The pending transaction to release. The pending transaction must have a `inbound + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::PendingTransaction] + # + # @see Increase::Models::Simulations::PendingTransactionReleaseInboundFundsHoldParams + def release_inbound_funds_hold(pending_transaction_id, params = {}) + @client.request( + method: :post, + path: [ + "simulations/pending_transactions/%1$s/release_inbound_funds_hold", + pending_transaction_id + ], + model: Increase::PendingTransaction, + options: params[:request_options] + ) + end + + # @api private + # + # @param client [Increase::Client] + def initialize(client:) + @client = client + end + end + end + end +end diff --git a/rbi/increase/models/simulations/inbound_funds_hold_release_response.rbi b/rbi/increase/models/simulations/inbound_funds_hold_release_response.rbi deleted file mode 100644 index 75e5f634d..000000000 --- a/rbi/increase/models/simulations/inbound_funds_hold_release_response.rbi +++ /dev/null @@ -1,280 +0,0 @@ -# typed: strong - -module Increase - module Models - module Simulations - class InboundFundsHoldReleaseResponse < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::Models::Simulations::InboundFundsHoldReleaseResponse, - Increase::Internal::AnyHash - ) - end - - # The Inbound Funds Hold identifier. - sig { returns(String) } - attr_accessor :id - - # The held amount in the minor unit of the account's currency. For dollars, for - # example, this is cents. - sig { returns(Integer) } - attr_accessor :amount - - # When the hold will be released automatically. Certain conditions may cause it to - # be released before this time. - sig { returns(Time) } - attr_accessor :automatically_releases_at - - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - # was created. - sig { returns(Time) } - attr_accessor :created_at - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - # currency. - sig do - returns( - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - end - attr_accessor :currency - - # The ID of the Transaction for which funds were held. - sig { returns(T.nilable(String)) } - attr_accessor :held_transaction_id - - # The ID of the Pending Transaction representing the held funds. - sig { returns(T.nilable(String)) } - attr_accessor :pending_transaction_id - - # When the hold was released (if it has been released). - sig { returns(T.nilable(Time)) } - attr_accessor :released_at - - # The status of the hold. - sig do - returns( - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status::TaggedSymbol - ) - end - attr_accessor :status - - # A constant representing the object's type. For this resource it will always be - # `inbound_funds_hold`. - sig do - returns( - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type::TaggedSymbol - ) - end - attr_accessor :type - - # We hold funds for certain transaction types to account for return windows where - # funds might still be clawed back by the sending institution. - sig do - params( - id: String, - amount: Integer, - automatically_releases_at: Time, - created_at: Time, - currency: - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::OrSymbol, - held_transaction_id: T.nilable(String), - pending_transaction_id: T.nilable(String), - released_at: T.nilable(Time), - status: - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status::OrSymbol, - type: - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The Inbound Funds Hold identifier. - id:, - # The held amount in the minor unit of the account's currency. For dollars, for - # example, this is cents. - amount:, - # When the hold will be released automatically. Certain conditions may cause it to - # be released before this time. - automatically_releases_at:, - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - # was created. - created_at:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - # currency. - currency:, - # The ID of the Transaction for which funds were held. - held_transaction_id:, - # The ID of the Pending Transaction representing the held funds. - pending_transaction_id:, - # When the hold was released (if it has been released). - released_at:, - # The status of the hold. - status:, - # A constant representing the object's type. For this resource it will always be - # `inbound_funds_hold`. - type: - ) - end - - sig do - override.returns( - { - id: String, - amount: Integer, - automatically_releases_at: Time, - created_at: Time, - currency: - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol, - held_transaction_id: T.nilable(String), - pending_transaction_id: T.nilable(String), - released_at: T.nilable(Time), - status: - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status::TaggedSymbol, - type: - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type::TaggedSymbol - } - ) - end - def to_hash - end - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - # currency. - module Currency - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The status of the hold. - module Status - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Funds are still being held. - HELD = - T.let( - :held, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status::TaggedSymbol - ) - - # Funds have been released. - COMPLETE = - T.let( - :complete, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status::TaggedSymbol - ] - ) - end - def self.values - end - end - - # A constant representing the object's type. For this resource it will always be - # `inbound_funds_hold`. - module Type - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - INBOUND_FUNDS_HOLD = - T.let( - :inbound_funds_hold, - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end -end diff --git a/rbi/increase/models/simulations/inbound_funds_hold_release_params.rbi b/rbi/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rbi similarity index 78% rename from rbi/increase/models/simulations/inbound_funds_hold_release_params.rbi rename to rbi/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rbi index 7cbc48a7a..ad6474ca4 100644 --- a/rbi/increase/models/simulations/inbound_funds_hold_release_params.rbi +++ b/rbi/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rbi @@ -3,14 +3,14 @@ module Increase module Models module Simulations - class InboundFundsHoldReleaseParams < Increase::Internal::Type::BaseModel + class PendingTransactionReleaseInboundFundsHoldParams < Increase::Internal::Type::BaseModel extend Increase::Internal::Type::RequestParameters::Converter include Increase::Internal::Type::RequestParameters OrHash = T.type_alias do T.any( - Increase::Simulations::InboundFundsHoldReleaseParams, + Increase::Simulations::PendingTransactionReleaseInboundFundsHoldParams, Increase::Internal::AnyHash ) end diff --git a/rbi/increase/resources/simulations.rbi b/rbi/increase/resources/simulations.rbi index e974b7dc5..1d647b52f 100644 --- a/rbi/increase/resources/simulations.rbi +++ b/rbi/increase/resources/simulations.rbi @@ -40,8 +40,8 @@ module Increase end attr_reader :digital_wallet_token_requests - sig { returns(Increase::Resources::Simulations::InboundFundsHolds) } - attr_reader :inbound_funds_holds + sig { returns(Increase::Resources::Simulations::PendingTransactions) } + attr_reader :pending_transactions sig { returns(Increase::Resources::Simulations::AccountTransfers) } attr_reader :account_transfers diff --git a/rbi/increase/resources/simulations/inbound_funds_holds.rbi b/rbi/increase/resources/simulations/pending_transactions.rbi similarity index 55% rename from rbi/increase/resources/simulations/inbound_funds_holds.rbi rename to rbi/increase/resources/simulations/pending_transactions.rbi index 42ed1f1e1..ed83e156d 100644 --- a/rbi/increase/resources/simulations/inbound_funds_holds.rbi +++ b/rbi/increase/resources/simulations/pending_transactions.rbi @@ -3,20 +3,19 @@ module Increase module Resources class Simulations - class InboundFundsHolds + class PendingTransactions # This endpoint simulates immediately releasing an Inbound Funds Hold, which might - # be created as a result of e.g., an ACH debit. + # be created as a result of, for example, an ACH debit. sig do params( - inbound_funds_hold_id: String, + pending_transaction_id: String, request_options: Increase::RequestOptions::OrHash - ).returns( - Increase::Models::Simulations::InboundFundsHoldReleaseResponse - ) + ).returns(Increase::PendingTransaction) end - def release( - # The inbound funds hold to release. - inbound_funds_hold_id, + def release_inbound_funds_hold( + # The pending transaction to release. The pending transaction must have a + # `inbound_funds_hold` source. + pending_transaction_id, request_options: {} ) end diff --git a/sig/increase/models/simulations/inbound_funds_hold_release_response.rbs b/sig/increase/models/simulations/inbound_funds_hold_release_response.rbs deleted file mode 100644 index 2a2fb54ed..000000000 --- a/sig/increase/models/simulations/inbound_funds_hold_release_response.rbs +++ /dev/null @@ -1,117 +0,0 @@ -module Increase - module Models - module Simulations - type inbound_funds_hold_release_response = - { - id: String, - amount: Integer, - automatically_releases_at: Time, - created_at: Time, - currency: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::currency, - held_transaction_id: String?, - pending_transaction_id: String?, - released_at: Time?, - status: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::status, - type: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::type_ - } - - class InboundFundsHoldReleaseResponse < Increase::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor amount: Integer - - attr_accessor automatically_releases_at: Time - - attr_accessor created_at: Time - - attr_accessor currency: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::currency - - attr_accessor held_transaction_id: String? - - attr_accessor pending_transaction_id: String? - - attr_accessor released_at: Time? - - attr_accessor status: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::status - - attr_accessor type: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::type_ - - def initialize: ( - id: String, - amount: Integer, - automatically_releases_at: Time, - created_at: Time, - currency: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::currency, - held_transaction_id: String?, - pending_transaction_id: String?, - released_at: Time?, - status: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::status, - type: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::type_ - ) -> void - - def to_hash: -> { - id: String, - amount: Integer, - automatically_releases_at: Time, - created_at: Time, - currency: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::currency, - held_transaction_id: String?, - pending_transaction_id: String?, - released_at: Time?, - status: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::status, - type: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::type_ - } - - type currency = :CAD | :CHF | :EUR | :GBP | :JPY | :USD - - module Currency - extend Increase::Internal::Type::Enum - - # Canadian Dollar (CAD) - CAD: :CAD - - # Swiss Franc (CHF) - CHF: :CHF - - # Euro (EUR) - EUR: :EUR - - # British Pound (GBP) - GBP: :GBP - - # Japanese Yen (JPY) - JPY: :JPY - - # US Dollar (USD) - USD: :USD - - def self?.values: -> ::Array[Increase::Models::Simulations::InboundFundsHoldReleaseResponse::currency] - end - - type status = :held | :complete - - module Status - extend Increase::Internal::Type::Enum - - # Funds are still being held. - HELD: :held - - # Funds have been released. - COMPLETE: :complete - - def self?.values: -> ::Array[Increase::Models::Simulations::InboundFundsHoldReleaseResponse::status] - end - - type type_ = :inbound_funds_hold - - module Type - extend Increase::Internal::Type::Enum - - INBOUND_FUNDS_HOLD: :inbound_funds_hold - - def self?.values: -> ::Array[Increase::Models::Simulations::InboundFundsHoldReleaseResponse::type_] - end - end - end - end -end diff --git a/sig/increase/models/simulations/inbound_funds_hold_release_params.rbs b/sig/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rbs similarity index 71% rename from sig/increase/models/simulations/inbound_funds_hold_release_params.rbs rename to sig/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rbs index 9cbfbdb46..41d4fa1f8 100644 --- a/sig/increase/models/simulations/inbound_funds_hold_release_params.rbs +++ b/sig/increase/models/simulations/pending_transaction_release_inbound_funds_hold_params.rbs @@ -1,10 +1,10 @@ module Increase module Models module Simulations - type inbound_funds_hold_release_params = + type pending_transaction_release_inbound_funds_hold_params = { } & Increase::Internal::Type::request_parameters - class InboundFundsHoldReleaseParams < Increase::Internal::Type::BaseModel + class PendingTransactionReleaseInboundFundsHoldParams < Increase::Internal::Type::BaseModel extend Increase::Internal::Type::RequestParameters::Converter include Increase::Internal::Type::RequestParameters diff --git a/sig/increase/resources/simulations.rbs b/sig/increase/resources/simulations.rbs index d3a12d9d0..fbd77233e 100644 --- a/sig/increase/resources/simulations.rbs +++ b/sig/increase/resources/simulations.rbs @@ -23,7 +23,7 @@ module Increase attr_reader digital_wallet_token_requests: Increase::Resources::Simulations::DigitalWalletTokenRequests - attr_reader inbound_funds_holds: Increase::Resources::Simulations::InboundFundsHolds + attr_reader pending_transactions: Increase::Resources::Simulations::PendingTransactions attr_reader account_transfers: Increase::Resources::Simulations::AccountTransfers diff --git a/sig/increase/resources/simulations/inbound_funds_holds.rbs b/sig/increase/resources/simulations/pending_transactions.rbs similarity index 53% rename from sig/increase/resources/simulations/inbound_funds_holds.rbs rename to sig/increase/resources/simulations/pending_transactions.rbs index 20fbd00bb..0ed7b8ffc 100644 --- a/sig/increase/resources/simulations/inbound_funds_holds.rbs +++ b/sig/increase/resources/simulations/pending_transactions.rbs @@ -1,11 +1,11 @@ module Increase module Resources class Simulations - class InboundFundsHolds - def release: ( - String inbound_funds_hold_id, + class PendingTransactions + def release_inbound_funds_hold: ( + String pending_transaction_id, ?request_options: Increase::request_opts - ) -> Increase::Models::Simulations::InboundFundsHoldReleaseResponse + ) -> Increase::PendingTransaction def initialize: (client: Increase::Client) -> void end diff --git a/test/increase/resources/simulations/inbound_funds_holds_test.rb b/test/increase/resources/simulations/inbound_funds_holds_test.rb deleted file mode 100644 index da1e32c8e..000000000 --- a/test/increase/resources/simulations/inbound_funds_holds_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -require_relative "../../test_helper" - -class Increase::Test::Resources::Simulations::InboundFundsHoldsTest < Increase::Test::ResourceTest - def test_release - response = @increase.simulations.inbound_funds_holds.release("inbound_funds_hold_id") - - assert_pattern do - response => Increase::Models::Simulations::InboundFundsHoldReleaseResponse - end - - assert_pattern do - response => { - id: String, - amount: Integer, - automatically_releases_at: Time, - created_at: Time, - currency: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Currency, - held_transaction_id: String | nil, - pending_transaction_id: String | nil, - released_at: Time | nil, - status: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Status, - type: Increase::Models::Simulations::InboundFundsHoldReleaseResponse::Type - } - end - end -end diff --git a/test/increase/resources/simulations/pending_transactions_test.rb b/test/increase/resources/simulations/pending_transactions_test.rb new file mode 100644 index 000000000..dddb489ba --- /dev/null +++ b/test/increase/resources/simulations/pending_transactions_test.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class Increase::Test::Resources::Simulations::PendingTransactionsTest < Increase::Test::ResourceTest + def test_release_inbound_funds_hold + response = + @increase.simulations.pending_transactions.release_inbound_funds_hold("pending_transaction_id") + + assert_pattern do + response => Increase::PendingTransaction + end + + assert_pattern do + response => { + id: String, + account_id: String, + amount: Integer, + balance_impact: Increase::PendingTransaction::BalanceImpact, + completed_at: Time | nil, + created_at: Time, + currency: Increase::PendingTransaction::Currency, + description: String, + route_id: String | nil, + route_type: Increase::PendingTransaction::RouteType | nil, + source: Increase::PendingTransaction::Source, + status: Increase::PendingTransaction::Status, + type: Increase::PendingTransaction::Type + } + end + end +end From b757ba82364771c9698ccad69d25053b38b7cc9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:20:16 +0000 Subject: [PATCH 2/2] release: 1.52.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/increase/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3ff0a9eb3..37d774d68 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.51.0" + ".": "1.52.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a1bbf801..49b7384a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.52.0 (2025-08-26) + +Full Changelog: [v1.51.0...v1.52.0](https://github.com/Increase/increase-ruby/compare/v1.51.0...v1.52.0) + +### Features + +* **api:** api update ([d7242c9](https://github.com/Increase/increase-ruby/commit/d7242c9324279e98e91c12da50e85a330e83c149)) + ## 1.51.0 (2025-08-26) Full Changelog: [v1.50.0...v1.51.0](https://github.com/Increase/increase-ruby/compare/v1.50.0...v1.51.0) diff --git a/Gemfile.lock b/Gemfile.lock index b7d55fddf..5f832e06e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.51.0) + increase (1.52.0) connection_pool GEM diff --git a/README.md b/README.md index b68a46eaf..ca3d5663f 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", "~> 1.51.0" +gem "increase", "~> 1.52.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index f8b5f89bf..113825c75 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.51.0" + VERSION = "1.52.0" end