diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b9606709..2390bfeb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.139.0" + ".": "1.140.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e94fde2d..2cc58976 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6b193549e9c795e807b299e7161628dc1e504d43d6be27113b1f3a1e491914f.yml -openapi_spec_hash: 9d0ff6cc1ec60a6772598cff20f8db1d -config_hash: eb2035151c7b49c2f12caf55469b8f9a +configured_endpoints: 229 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a0eb4b9ef698e80be2fc9e995d6096b96de35e4985c8586e0773fa55a6b50943.yml +openapi_spec_hash: a36c0bee01bf3af40ebcd7075308f170 +config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/CHANGELOG.md b/CHANGELOG.md index 91dacf99..8ad28b59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.140.0 (2025-11-12) + +Full Changelog: [v1.139.0...v1.140.0](https://github.com/Increase/increase-ruby/compare/v1.139.0...v1.140.0) + +### Features + +* **api:** api update ([ec8f079](https://github.com/Increase/increase-ruby/commit/ec8f0799545f42cf6c1ab2281669744f469514a8)) + ## 1.139.0 (2025-11-10) Full Changelog: [v1.138.0...v1.139.0](https://github.com/Increase/increase-ruby/compare/v1.138.0...v1.139.0) diff --git a/Gemfile.lock b/Gemfile.lock index e8533786..aab61656 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.139.0) + increase (1.140.0) connection_pool GEM diff --git a/README.md b/README.md index 9b2e256d..d6f8c090 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.139.0" +gem "increase", "~> 1.140.0" ``` diff --git a/lib/increase.rb b/lib/increase.rb index bcbb1bfb..81c0754d 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -220,6 +220,7 @@ require_relative "increase/models/inbound_fednow_transfer_list_params" require_relative "increase/models/inbound_fednow_transfer_retrieve_params" require_relative "increase/models/inbound_mail_item" +require_relative "increase/models/inbound_mail_item_action_params" require_relative "increase/models/inbound_mail_item_list_params" require_relative "increase/models/inbound_mail_item_retrieve_params" require_relative "increase/models/inbound_real_time_payments_transfer" diff --git a/lib/increase/models.rb b/lib/increase/models.rb index e4d41659..ed60b0b0 100644 --- a/lib/increase/models.rb +++ b/lib/increase/models.rb @@ -376,6 +376,8 @@ module Increase InboundMailItem = Increase::Models::InboundMailItem + InboundMailItemActionParams = Increase::Models::InboundMailItemActionParams + InboundMailItemListParams = Increase::Models::InboundMailItemListParams InboundMailItemRetrieveParams = Increase::Models::InboundMailItemRetrieveParams diff --git a/lib/increase/models/inbound_mail_item_action_params.rb b/lib/increase/models/inbound_mail_item_action_params.rb new file mode 100644 index 00000000..9295e2ec --- /dev/null +++ b/lib/increase/models/inbound_mail_item_action_params.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::InboundMailItems#action + class InboundMailItemActionParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute checks + # The actions to perform on the Inbound Mail Item. + # + # @return [Array] + required :checks, -> { Increase::Internal::Type::ArrayOf[Increase::InboundMailItemActionParams::Check] } + + # @!method initialize(checks:, request_options: {}) + # @param checks [Array] The actions to perform on the Inbound Mail Item. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + class Check < Increase::Internal::Type::BaseModel + # @!attribute action + # The action to perform on the Inbound Mail Item. + # + # @return [Symbol, Increase::Models::InboundMailItemActionParams::Check::Action] + required :action, enum: -> { Increase::InboundMailItemActionParams::Check::Action } + + # @!attribute account + # The identifier of the Account to deposit the check into. If not provided, the + # check will be deposited into the Account associated with the Lockbox. + # + # @return [String, nil] + optional :account, String + + # @!method initialize(action:, account: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::InboundMailItemActionParams::Check} for more details. + # + # @param action [Symbol, Increase::Models::InboundMailItemActionParams::Check::Action] The action to perform on the Inbound Mail Item. + # + # @param account [String] The identifier of the Account to deposit the check into. If not provided, the ch + + # The action to perform on the Inbound Mail Item. + # + # @see Increase::Models::InboundMailItemActionParams::Check#action + module Action + extend Increase::Internal::Type::Enum + + # The check will be deposited. + DEPOSIT = :deposit + + # The check will be ignored. + IGNORE = :ignore + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/increase/models/lockbox.rb b/lib/increase/models/lockbox.rb index 017720ed..496ac8e9 100644 --- a/lib/increase/models/lockbox.rb +++ b/lib/increase/models/lockbox.rb @@ -161,6 +161,9 @@ module CheckDepositBehavior # Checks mailed to this Lockbox will not be deposited. DISABLED = :disabled + # Checks mailed to this Lockbox will be pending until actioned. + PEND_FOR_PROCESSING = :pend_for_processing + # @!method self.values # @return [Array] end diff --git a/lib/increase/models/lockbox_update_params.rb b/lib/increase/models/lockbox_update_params.rb index 526f23f2..536fccbc 100644 --- a/lib/increase/models/lockbox_update_params.rb +++ b/lib/increase/models/lockbox_update_params.rb @@ -44,6 +44,9 @@ module CheckDepositBehavior # Checks mailed to this Lockbox will not be deposited. DISABLED = :disabled + # Checks mailed to this Lockbox will be pending until actioned. + PEND_FOR_PROCESSING = :pend_for_processing + # @!method self.values # @return [Array] end diff --git a/lib/increase/resources/inbound_mail_items.rb b/lib/increase/resources/inbound_mail_items.rb index e3a0f1b5..a045f001 100644 --- a/lib/increase/resources/inbound_mail_items.rb +++ b/lib/increase/resources/inbound_mail_items.rb @@ -55,6 +55,30 @@ def list(params = {}) ) end + # Action a Inbound Mail Item + # + # @overload action(inbound_mail_item_id, checks:, request_options: {}) + # + # @param inbound_mail_item_id [String] The identifier of the Inbound Mail Item to action. + # + # @param checks [Array] The actions to perform on the Inbound Mail Item. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::InboundMailItem] + # + # @see Increase::Models::InboundMailItemActionParams + def action(inbound_mail_item_id, params) + parsed, options = Increase::InboundMailItemActionParams.dump_request(params) + @client.request( + method: :post, + path: ["inbound_mail_items/%1$s/action", inbound_mail_item_id], + body: parsed, + model: Increase::InboundMailItem, + options: options + ) + end + # @api private # # @param client [Increase::Client] diff --git a/lib/increase/version.rb b/lib/increase/version.rb index c67f29a4..aa4d432c 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.139.0" + VERSION = "1.140.0" end diff --git a/rbi/increase/models.rbi b/rbi/increase/models.rbi index 24e802a2..d3f08fb1 100644 --- a/rbi/increase/models.rbi +++ b/rbi/increase/models.rbi @@ -380,6 +380,8 @@ module Increase InboundMailItem = Increase::Models::InboundMailItem + InboundMailItemActionParams = Increase::Models::InboundMailItemActionParams + InboundMailItemListParams = Increase::Models::InboundMailItemListParams InboundMailItemRetrieveParams = diff --git a/rbi/increase/models/inbound_mail_item_action_params.rbi b/rbi/increase/models/inbound_mail_item_action_params.rbi new file mode 100644 index 00000000..d49b69ac --- /dev/null +++ b/rbi/increase/models/inbound_mail_item_action_params.rbi @@ -0,0 +1,139 @@ +# typed: strong + +module Increase + module Models + class InboundMailItemActionParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::InboundMailItemActionParams, + Increase::Internal::AnyHash + ) + end + + # The actions to perform on the Inbound Mail Item. + sig { returns(T::Array[Increase::InboundMailItemActionParams::Check]) } + attr_accessor :checks + + sig do + params( + checks: + T::Array[Increase::InboundMailItemActionParams::Check::OrHash], + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The actions to perform on the Inbound Mail Item. + checks:, + request_options: {} + ) + end + + sig do + override.returns( + { + checks: T::Array[Increase::InboundMailItemActionParams::Check], + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + class Check < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::InboundMailItemActionParams::Check, + Increase::Internal::AnyHash + ) + end + + # The action to perform on the Inbound Mail Item. + sig do + returns( + Increase::InboundMailItemActionParams::Check::Action::OrSymbol + ) + end + attr_accessor :action + + # The identifier of the Account to deposit the check into. If not provided, the + # check will be deposited into the Account associated with the Lockbox. + sig { returns(T.nilable(String)) } + attr_reader :account + + sig { params(account: String).void } + attr_writer :account + + sig do + params( + action: + Increase::InboundMailItemActionParams::Check::Action::OrSymbol, + account: String + ).returns(T.attached_class) + end + def self.new( + # The action to perform on the Inbound Mail Item. + action:, + # The identifier of the Account to deposit the check into. If not provided, the + # check will be deposited into the Account associated with the Lockbox. + account: nil + ) + end + + sig do + override.returns( + { + action: + Increase::InboundMailItemActionParams::Check::Action::OrSymbol, + account: String + } + ) + end + def to_hash + end + + # The action to perform on the Inbound Mail Item. + module Action + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::InboundMailItemActionParams::Check::Action + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The check will be deposited. + DEPOSIT = + T.let( + :deposit, + Increase::InboundMailItemActionParams::Check::Action::TaggedSymbol + ) + + # The check will be ignored. + IGNORE = + T.let( + :ignore, + Increase::InboundMailItemActionParams::Check::Action::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::InboundMailItemActionParams::Check::Action::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/increase/models/lockbox.rbi b/rbi/increase/models/lockbox.rbi index 3455169c..d11fc4be 100644 --- a/rbi/increase/models/lockbox.rbi +++ b/rbi/increase/models/lockbox.rbi @@ -214,6 +214,13 @@ module Increase Increase::Lockbox::CheckDepositBehavior::TaggedSymbol ) + # Checks mailed to this Lockbox will be pending until actioned. + PEND_FOR_PROCESSING = + T.let( + :pend_for_processing, + Increase::Lockbox::CheckDepositBehavior::TaggedSymbol + ) + sig do override.returns( T::Array[Increase::Lockbox::CheckDepositBehavior::TaggedSymbol] diff --git a/rbi/increase/models/lockbox_update_params.rbi b/rbi/increase/models/lockbox_update_params.rbi index e7cc76cf..9f0d9e29 100644 --- a/rbi/increase/models/lockbox_update_params.rbi +++ b/rbi/increase/models/lockbox_update_params.rbi @@ -101,6 +101,13 @@ module Increase Increase::LockboxUpdateParams::CheckDepositBehavior::TaggedSymbol ) + # Checks mailed to this Lockbox will be pending until actioned. + PEND_FOR_PROCESSING = + T.let( + :pend_for_processing, + Increase::LockboxUpdateParams::CheckDepositBehavior::TaggedSymbol + ) + sig do override.returns( T::Array[ diff --git a/rbi/increase/resources/inbound_mail_items.rbi b/rbi/increase/resources/inbound_mail_items.rbi index ef0a890c..6d6736ee 100644 --- a/rbi/increase/resources/inbound_mail_items.rbi +++ b/rbi/increase/resources/inbound_mail_items.rbi @@ -40,6 +40,24 @@ module Increase ) end + # Action a Inbound Mail Item + sig do + params( + inbound_mail_item_id: String, + checks: + T::Array[Increase::InboundMailItemActionParams::Check::OrHash], + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::InboundMailItem) + end + def action( + # The identifier of the Inbound Mail Item to action. + inbound_mail_item_id, + # The actions to perform on the Inbound Mail Item. + checks:, + request_options: {} + ) + end + # @api private sig { params(client: Increase::Client).returns(T.attached_class) } def self.new(client:) diff --git a/sig/increase/models.rbs b/sig/increase/models.rbs index 6e77b08a..e3c1204e 100644 --- a/sig/increase/models.rbs +++ b/sig/increase/models.rbs @@ -335,6 +335,8 @@ module Increase class InboundMailItem = Increase::Models::InboundMailItem + class InboundMailItemActionParams = Increase::Models::InboundMailItemActionParams + class InboundMailItemListParams = Increase::Models::InboundMailItemListParams class InboundMailItemRetrieveParams = Increase::Models::InboundMailItemRetrieveParams diff --git a/sig/increase/models/inbound_mail_item_action_params.rbs b/sig/increase/models/inbound_mail_item_action_params.rbs new file mode 100644 index 00000000..d125aca4 --- /dev/null +++ b/sig/increase/models/inbound_mail_item_action_params.rbs @@ -0,0 +1,62 @@ +module Increase + module Models + type inbound_mail_item_action_params = + { checks: ::Array[Increase::InboundMailItemActionParams::Check] } + & Increase::Internal::Type::request_parameters + + class InboundMailItemActionParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_accessor checks: ::Array[Increase::InboundMailItemActionParams::Check] + + def initialize: ( + checks: ::Array[Increase::InboundMailItemActionParams::Check], + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + checks: ::Array[Increase::InboundMailItemActionParams::Check], + request_options: Increase::RequestOptions + } + + type check = + { + action: Increase::Models::InboundMailItemActionParams::Check::action, + account: String + } + + class Check < Increase::Internal::Type::BaseModel + attr_accessor action: Increase::Models::InboundMailItemActionParams::Check::action + + attr_reader account: String? + + def account=: (String) -> String + + def initialize: ( + action: Increase::Models::InboundMailItemActionParams::Check::action, + ?account: String + ) -> void + + def to_hash: -> { + action: Increase::Models::InboundMailItemActionParams::Check::action, + account: String + } + + type action = :deposit | :ignore + + module Action + extend Increase::Internal::Type::Enum + + # The check will be deposited. + DEPOSIT: :deposit + + # The check will be ignored. + IGNORE: :ignore + + def self?.values: -> ::Array[Increase::Models::InboundMailItemActionParams::Check::action] + end + end + end + end +end diff --git a/sig/increase/models/lockbox.rbs b/sig/increase/models/lockbox.rbs index 99638a55..857f844c 100644 --- a/sig/increase/models/lockbox.rbs +++ b/sig/increase/models/lockbox.rbs @@ -98,7 +98,7 @@ module Increase } end - type check_deposit_behavior = :enabled | :disabled + type check_deposit_behavior = :enabled | :disabled | :pend_for_processing module CheckDepositBehavior extend Increase::Internal::Type::Enum @@ -109,6 +109,9 @@ module Increase # Checks mailed to this Lockbox will not be deposited. DISABLED: :disabled + # Checks mailed to this Lockbox will be pending until actioned. + PEND_FOR_PROCESSING: :pend_for_processing + def self?.values: -> ::Array[Increase::Models::Lockbox::check_deposit_behavior] end diff --git a/sig/increase/models/lockbox_update_params.rbs b/sig/increase/models/lockbox_update_params.rbs index d52ebcb0..01fcc52c 100644 --- a/sig/increase/models/lockbox_update_params.rbs +++ b/sig/increase/models/lockbox_update_params.rbs @@ -40,7 +40,7 @@ module Increase request_options: Increase::RequestOptions } - type check_deposit_behavior = :enabled | :disabled + type check_deposit_behavior = :enabled | :disabled | :pend_for_processing module CheckDepositBehavior extend Increase::Internal::Type::Enum @@ -51,6 +51,9 @@ module Increase # Checks mailed to this Lockbox will not be deposited. DISABLED: :disabled + # Checks mailed to this Lockbox will be pending until actioned. + PEND_FOR_PROCESSING: :pend_for_processing + def self?.values: -> ::Array[Increase::Models::LockboxUpdateParams::check_deposit_behavior] end end diff --git a/sig/increase/resources/inbound_mail_items.rbs b/sig/increase/resources/inbound_mail_items.rbs index 8ac65623..fecac54c 100644 --- a/sig/increase/resources/inbound_mail_items.rbs +++ b/sig/increase/resources/inbound_mail_items.rbs @@ -14,6 +14,12 @@ module Increase ?request_options: Increase::request_opts ) -> Increase::Internal::Page[Increase::InboundMailItem] + def action: ( + String inbound_mail_item_id, + checks: ::Array[Increase::InboundMailItemActionParams::Check], + ?request_options: Increase::request_opts + ) -> Increase::InboundMailItem + def initialize: (client: Increase::Client) -> void end end diff --git a/test/increase/resources/inbound_mail_items_test.rb b/test/increase/resources/inbound_mail_items_test.rb index 336ce0a4..e5aa6a21 100644 --- a/test/increase/resources/inbound_mail_items_test.rb +++ b/test/increase/resources/inbound_mail_items_test.rb @@ -53,4 +53,30 @@ def test_list } end end + + def test_action_required_params + response = + @increase.inbound_mail_items.action( + "inbound_mail_item_q6rrg7mmqpplx80zceev", + checks: [{action: :deposit}, {action: :ignore}] + ) + + assert_pattern do + response => Increase::InboundMailItem + end + + assert_pattern do + response => { + id: String, + checks: ^(Increase::Internal::Type::ArrayOf[Increase::InboundMailItem::Check]), + created_at: Time, + file_id: String, + lockbox_id: String | nil, + recipient_name: String | nil, + rejection_reason: Increase::InboundMailItem::RejectionReason | nil, + status: Increase::InboundMailItem::Status, + type: Increase::InboundMailItem::Type + } + end + end end