diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 000572ece..b0699969f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.13" + ".": "0.1.0-alpha.14" } \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml index b0ad29c38..77eaf4a10 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -64,11 +64,19 @@ Layout/MultilineMethodParameterLineBreaks: Layout/SpaceInsideHashLiteralBraces: EnforcedStyle: no_space +Lint/BooleanSymbol: + Enabled: false + # This option occasionally mangles identifier names Lint/DeprecatedConstants: Exclude: - "**/*.rbi" +# We use pattern assertion in tests to ensure correctness. +Lint/DuplicateMatchPattern: + Exclude: + - "test/**/*" + # Fairly useful in tests for pattern assertions. Lint/EmptyInPattern: Exclude: @@ -119,6 +127,9 @@ Metrics/ParameterLists: Metrics/PerceivedComplexity: Enabled: false +Naming/AccessorMethodName: + Enabled: false + # Need to preserve block identifier for documentation. Naming/BlockForwarding: Enabled: false diff --git a/.stats.yml b/.stats.yml index 90cd8584e..3b39bb0c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-58a2ee2ff5eb6f528503fbaae714862d76b1dc7c64dc6349e0358d4cac6cc9a4.yml -openapi_spec_hash: ff3a1961dead0bea92a692b13b6a96fb -config_hash: 6ae27f935d24d38237894dd4fd6bd749 +configured_endpoints: 195 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10e14c48dec1372ffe696cef97378055ec5009aa2921e346cf22b44c9a158380.yml +openapi_spec_hash: 4d0a40021d67f4424535e3dd65599ff4 +config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/CHANGELOG.md b/CHANGELOG.md index 590b99f74..470569084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.1.0-alpha.14 (2025-04-29) + +Full Changelog: [v0.1.0-alpha.13...v0.1.0-alpha.14](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.13...v0.1.0-alpha.14) + +### Features + +* **api:** api update ([0cd0cfd](https://github.com/Increase/increase-ruby/commit/0cd0cfdcbdbe39c7e9c530d8cfa4f5ccf523fef9)) + + +### Chores + +* loosen rubocop rules that don't always make sense ([1823b91](https://github.com/Increase/increase-ruby/commit/1823b91f3a55222a2b78c2df10b73e1949f134e4)) + ## 0.1.0-alpha.13 (2025-04-28) Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.12...v0.1.0-alpha.13) diff --git a/Gemfile.lock b/Gemfile.lock index ab2449fc3..0766a9f9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (0.1.0.pre.alpha.13) + increase (0.1.0.pre.alpha.14) connection_pool GEM diff --git a/README.md b/README.md index a7f7e44d9..2763ecee6 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.13" +gem "increase", "~> 0.1.0.pre.alpha.14" ``` diff --git a/Rakefile b/Rakefile index 2e5368f21..97b1805c1 100644 --- a/Rakefile +++ b/Rakefile @@ -39,7 +39,13 @@ xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --] desc("Lint `*.rb(i)`") multitask(:"lint:rubocop") do - lint = xargs + %w[rubocop --fail-level E] + (ENV.key?("CI") ? %w[--format github] : []) + rubocop = %w[rubocop --fail-level E] + rubocop += %w[--format github] if ENV.key?("CI") + + # some lines cannot be shortened + rubocop += %w[--except Lint/RedundantCopDisableDirective,Layout/LineLength] + + lint = xargs + rubocop sh("#{rubo_find.shelljoin} | #{lint.shelljoin}") end diff --git a/lib/increase.rb b/lib/increase.rb index 97d6296d4..16517c9e4 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -195,6 +195,7 @@ require_relative "increase/models/inbound_wire_transfer" require_relative "increase/models/inbound_wire_transfer_list_params" require_relative "increase/models/inbound_wire_transfer_retrieve_params" +require_relative "increase/models/inbound_wire_transfer_reverse_params" require_relative "increase/models/intrafi_account_enrollment" require_relative "increase/models/intrafi_account_enrollment_create_params" require_relative "increase/models/intrafi_account_enrollment_list_params" diff --git a/lib/increase/models/inbound_wire_transfer.rb b/lib/increase/models/inbound_wire_transfer.rb index 583b1e0bc..a0825c828 100644 --- a/lib/increase/models/inbound_wire_transfer.rb +++ b/lib/increase/models/inbound_wire_transfer.rb @@ -140,6 +140,13 @@ class InboundWireTransfer < Increase::Internal::Type::BaseModel # @return [String, nil] required :originator_to_beneficiary_information_line4, String, nil?: true + # @!attribute reversal + # Information about the reversal of the inbound wire transfer if it has been + # reversed. + # + # @return [Increase::Models::InboundWireTransfer::Reversal, nil] + required :reversal, -> { Increase::Models::InboundWireTransfer::Reversal }, nil?: true + # @!attribute sender_reference # The sending bank's reference number for the wire transfer. # @@ -159,7 +166,7 @@ class InboundWireTransfer < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::InboundWireTransfer::Type] required :type, enum: -> { Increase::Models::InboundWireTransfer::Type } - # @!method initialize(id:, account_id:, account_number_id:, amount:, beneficiary_address_line1:, beneficiary_address_line2:, beneficiary_address_line3:, beneficiary_name:, beneficiary_reference:, created_at:, description:, input_message_accountability_data:, originator_address_line1:, originator_address_line2:, originator_address_line3:, originator_name:, originator_routing_number:, originator_to_beneficiary_information:, originator_to_beneficiary_information_line1:, originator_to_beneficiary_information_line2:, originator_to_beneficiary_information_line3:, originator_to_beneficiary_information_line4:, sender_reference:, status:, type:) + # @!method initialize(id:, account_id:, account_number_id:, amount:, beneficiary_address_line1:, beneficiary_address_line2:, beneficiary_address_line3:, beneficiary_name:, beneficiary_reference:, created_at:, description:, input_message_accountability_data:, originator_address_line1:, originator_address_line2:, originator_address_line3:, originator_name:, originator_routing_number:, originator_to_beneficiary_information:, originator_to_beneficiary_information_line1:, originator_to_beneficiary_information_line2:, originator_to_beneficiary_information_line3:, originator_to_beneficiary_information_line4:, reversal:, sender_reference:, status:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::InboundWireTransfer} for more details. # @@ -213,6 +220,9 @@ class InboundWireTransfer < Increase::Internal::Type::BaseModel # # @param originator_to_beneficiary_information_line4 [String, nil] A free-form message set by the wire originator. # + # @param reversal [Increase::Models::InboundWireTransfer::Reversal, nil] Information about the reversal of the inbound wire transfer if it has been rever + # ... + # # @param sender_reference [String, nil] The sending bank's reference number for the wire transfer. # # @param status [Symbol, Increase::Models::InboundWireTransfer::Status] The status of the transfer. @@ -220,6 +230,50 @@ class InboundWireTransfer < Increase::Internal::Type::BaseModel # @param type [Symbol, Increase::Models::InboundWireTransfer::Type] A constant representing the object's type. For this resource it will always be ` # ... + # @see Increase::Models::InboundWireTransfer#reversal + class Reversal < Increase::Internal::Type::BaseModel + # @!attribute reason + # The reason for the reversal. + # + # @return [Symbol, Increase::Models::InboundWireTransfer::Reversal::Reason] + required :reason, enum: -> { Increase::Models::InboundWireTransfer::Reversal::Reason } + + # @!attribute reversed_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was reversed. + # + # @return [Time] + required :reversed_at, Time + + # @!method initialize(reason:, reversed_at:) + # Some parameter documentations has been truncated, see + # {Increase::Models::InboundWireTransfer::Reversal} for more details. + # + # Information about the reversal of the inbound wire transfer if it has been + # reversed. + # + # @param reason [Symbol, Increase::Models::InboundWireTransfer::Reversal::Reason] The reason for the reversal. + # + # @param reversed_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # ... + + # The reason for the reversal. + # + # @see Increase::Models::InboundWireTransfer::Reversal#reason + module Reason + extend Increase::Internal::Type::Enum + + # The inbound wire transfer was a duplicate. + DUPLICATE = :duplicate + + # The recipient of the wire transfer requested the funds be returned to the sender. + CREDITOR_REQUEST = :creditor_request + + # @!method self.values + # @return [Array] + end + end + # The status of the transfer. # # @see Increase::Models::InboundWireTransfer#status diff --git a/lib/increase/models/inbound_wire_transfer_reverse_params.rb b/lib/increase/models/inbound_wire_transfer_reverse_params.rb new file mode 100644 index 000000000..e78cb3b7e --- /dev/null +++ b/lib/increase/models/inbound_wire_transfer_reverse_params.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true + +module Increase + module Models + # @see Increase::Resources::InboundWireTransfers#reverse + class InboundWireTransferReverseParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute reason + # Reason for the reversal. + # + # @return [Symbol, Increase::Models::InboundWireTransferReverseParams::Reason] + required :reason, enum: -> { Increase::Models::InboundWireTransferReverseParams::Reason } + + # @!method initialize(reason:, request_options: {}) + # @param reason [Symbol, Increase::Models::InboundWireTransferReverseParams::Reason] Reason for the reversal. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + # Reason for the reversal. + module Reason + extend Increase::Internal::Type::Enum + + # The inbound wire transfer was a duplicate. + DUPLICATE = :duplicate + + # The recipient of the wire transfer requested the funds be returned to the sender. + CREDITOR_REQUEST = :creditor_request + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/increase/resources/inbound_wire_transfers.rb b/lib/increase/resources/inbound_wire_transfers.rb index 266461b2e..44bfb087a 100644 --- a/lib/increase/resources/inbound_wire_transfers.rb +++ b/lib/increase/resources/inbound_wire_transfers.rb @@ -61,6 +61,30 @@ def list(params = {}) ) end + # Reverse an Inbound Wire Transfer + # + # @overload reverse(inbound_wire_transfer_id, reason:, request_options: {}) + # + # @param inbound_wire_transfer_id [String] The identifier of the Inbound Wire Transfer to reverse. + # + # @param reason [Symbol, Increase::Models::InboundWireTransferReverseParams::Reason] Reason for the reversal. + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::InboundWireTransfer] + # + # @see Increase::Models::InboundWireTransferReverseParams + def reverse(inbound_wire_transfer_id, params) + parsed, options = Increase::Models::InboundWireTransferReverseParams.dump_request(params) + @client.request( + method: :post, + path: ["inbound_wire_transfers/%1$s/reverse", inbound_wire_transfer_id], + body: parsed, + model: Increase::Models::InboundWireTransfer, + options: options + ) + end + # @api private # # @param client [Increase::Client] diff --git a/lib/increase/version.rb b/lib/increase/version.rb index f8d26d2a1..9121a8582 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.13" + VERSION = "0.1.0.pre.alpha.14" end diff --git a/rbi/increase/models/inbound_wire_transfer.rbi b/rbi/increase/models/inbound_wire_transfer.rbi index f9afef8b1..51d3e924f 100644 --- a/rbi/increase/models/inbound_wire_transfer.rbi +++ b/rbi/increase/models/inbound_wire_transfer.rbi @@ -95,6 +95,19 @@ module Increase sig { returns(T.nilable(String)) } attr_accessor :originator_to_beneficiary_information_line4 + # Information about the reversal of the inbound wire transfer if it has been + # reversed. + sig { returns(T.nilable(Increase::Models::InboundWireTransfer::Reversal)) } + attr_reader :reversal + + sig do + params( + reversal: T.nilable(T.any(Increase::Models::InboundWireTransfer::Reversal, Increase::Internal::AnyHash)) + ) + .void + end + attr_writer :reversal + # The sending bank's reference number for the wire transfer. sig { returns(T.nilable(String)) } attr_accessor :sender_reference @@ -134,6 +147,7 @@ module Increase originator_to_beneficiary_information_line2: T.nilable(String), originator_to_beneficiary_information_line3: T.nilable(String), originator_to_beneficiary_information_line4: T.nilable(String), + reversal: T.nilable(T.any(Increase::Models::InboundWireTransfer::Reversal, Increase::Internal::AnyHash)), sender_reference: T.nilable(String), status: Increase::Models::InboundWireTransfer::Status::OrSymbol, type: Increase::Models::InboundWireTransfer::Type::OrSymbol @@ -189,6 +203,9 @@ module Increase originator_to_beneficiary_information_line3:, # A free-form message set by the wire originator. originator_to_beneficiary_information_line4:, + # Information about the reversal of the inbound wire transfer if it has been + # reversed. + reversal:, # The sending bank's reference number for the wire transfer. sender_reference:, # The status of the transfer. @@ -223,6 +240,7 @@ module Increase originator_to_beneficiary_information_line2: T.nilable(String), originator_to_beneficiary_information_line3: T.nilable(String), originator_to_beneficiary_information_line4: T.nilable(String), + reversal: T.nilable(Increase::Models::InboundWireTransfer::Reversal), sender_reference: T.nilable(String), status: Increase::Models::InboundWireTransfer::Status::TaggedSymbol, type: Increase::Models::InboundWireTransfer::Type::TaggedSymbol @@ -231,6 +249,56 @@ module Increase end def to_hash; end + class Reversal < Increase::Internal::Type::BaseModel + # The reason for the reversal. + sig { returns(Increase::Models::InboundWireTransfer::Reversal::Reason::TaggedSymbol) } + attr_accessor :reason + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was reversed. + sig { returns(Time) } + attr_accessor :reversed_at + + # Information about the reversal of the inbound wire transfer if it has been + # reversed. + sig do + params(reason: Increase::Models::InboundWireTransfer::Reversal::Reason::OrSymbol, reversed_at: Time) + .returns(T.attached_class) + end + def self.new( + # The reason for the reversal. + reason:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the transfer was reversed. + reversed_at: + ); end + sig do + override + .returns( + {reason: Increase::Models::InboundWireTransfer::Reversal::Reason::TaggedSymbol, reversed_at: Time} + ) + end + def to_hash; end + + # The reason for the reversal. + module Reason + extend Increase::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Increase::Models::InboundWireTransfer::Reversal::Reason) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The inbound wire transfer was a duplicate. + DUPLICATE = T.let(:duplicate, Increase::Models::InboundWireTransfer::Reversal::Reason::TaggedSymbol) + + # The recipient of the wire transfer requested the funds be returned to the sender. + CREDITOR_REQUEST = + T.let(:creditor_request, Increase::Models::InboundWireTransfer::Reversal::Reason::TaggedSymbol) + + sig { override.returns(T::Array[Increase::Models::InboundWireTransfer::Reversal::Reason::TaggedSymbol]) } + def self.values; end + end + end + # The status of the transfer. module Status extend Increase::Internal::Type::Enum diff --git a/rbi/increase/models/inbound_wire_transfer_reverse_params.rbi b/rbi/increase/models/inbound_wire_transfer_reverse_params.rbi new file mode 100644 index 000000000..5fd980d71 --- /dev/null +++ b/rbi/increase/models/inbound_wire_transfer_reverse_params.rbi @@ -0,0 +1,55 @@ +# typed: strong + +module Increase + module Models + class InboundWireTransferReverseParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # Reason for the reversal. + sig { returns(Increase::Models::InboundWireTransferReverseParams::Reason::OrSymbol) } + attr_accessor :reason + + sig do + params( + reason: Increase::Models::InboundWireTransferReverseParams::Reason::OrSymbol, + request_options: T.any(Increase::RequestOptions, Increase::Internal::AnyHash) + ) + .returns(T.attached_class) + end + def self.new( + # Reason for the reversal. + reason:, + request_options: {} + ); end + sig do + override + .returns( + { + reason: Increase::Models::InboundWireTransferReverseParams::Reason::OrSymbol, + request_options: Increase::RequestOptions + } + ) + end + def to_hash; end + + # Reason for the reversal. + module Reason + extend Increase::Internal::Type::Enum + + TaggedSymbol = T.type_alias { T.all(Symbol, Increase::Models::InboundWireTransferReverseParams::Reason) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The inbound wire transfer was a duplicate. + DUPLICATE = T.let(:duplicate, Increase::Models::InboundWireTransferReverseParams::Reason::TaggedSymbol) + + # The recipient of the wire transfer requested the funds be returned to the sender. + CREDITOR_REQUEST = + T.let(:creditor_request, Increase::Models::InboundWireTransferReverseParams::Reason::TaggedSymbol) + + sig { override.returns(T::Array[Increase::Models::InboundWireTransferReverseParams::Reason::TaggedSymbol]) } + def self.values; end + end + end + end +end diff --git a/rbi/increase/resources/inbound_wire_transfers.rbi b/rbi/increase/resources/inbound_wire_transfers.rbi index 965d5198e..d360c079b 100644 --- a/rbi/increase/resources/inbound_wire_transfers.rbi +++ b/rbi/increase/resources/inbound_wire_transfers.rbi @@ -40,6 +40,22 @@ module Increase status: nil, request_options: {} ); end + # Reverse an Inbound Wire Transfer + sig do + params( + inbound_wire_transfer_id: String, + reason: Increase::Models::InboundWireTransferReverseParams::Reason::OrSymbol, + request_options: Increase::RequestOpts + ) + .returns(Increase::Models::InboundWireTransfer) + end + def reverse( + # The identifier of the Inbound Wire Transfer to reverse. + inbound_wire_transfer_id, + # Reason for the reversal. + reason:, + request_options: {} + ); end # @api private sig { params(client: Increase::Client).returns(T.attached_class) } def self.new(client:); end diff --git a/sig/increase/models/inbound_wire_transfer.rbs b/sig/increase/models/inbound_wire_transfer.rbs index f793021e7..55c98954f 100644 --- a/sig/increase/models/inbound_wire_transfer.rbs +++ b/sig/increase/models/inbound_wire_transfer.rbs @@ -24,6 +24,7 @@ module Increase :originator_to_beneficiary_information_line2 => String?, :originator_to_beneficiary_information_line3 => String?, :originator_to_beneficiary_information_line4 => String?, + reversal: Increase::Models::InboundWireTransfer::Reversal?, sender_reference: String?, status: Increase::Models::InboundWireTransfer::status, type: Increase::Models::InboundWireTransfer::type_ @@ -74,6 +75,8 @@ module Increase attr_accessor originator_to_beneficiary_information_line4: String? + attr_accessor reversal: Increase::Models::InboundWireTransfer::Reversal? + attr_accessor sender_reference: String? attr_accessor status: Increase::Models::InboundWireTransfer::status @@ -103,6 +106,7 @@ module Increase originator_to_beneficiary_information_line2: String?, originator_to_beneficiary_information_line3: String?, originator_to_beneficiary_information_line4: String?, + reversal: Increase::Models::InboundWireTransfer::Reversal?, sender_reference: String?, status: Increase::Models::InboundWireTransfer::status, type: Increase::Models::InboundWireTransfer::type_ @@ -110,6 +114,39 @@ module Increase def to_hash: -> Increase::Models::inbound_wire_transfer + type reversal = + { + reason: Increase::Models::InboundWireTransfer::Reversal::reason, + reversed_at: Time + } + + class Reversal < Increase::Internal::Type::BaseModel + attr_accessor reason: Increase::Models::InboundWireTransfer::Reversal::reason + + attr_accessor reversed_at: Time + + def initialize: ( + reason: Increase::Models::InboundWireTransfer::Reversal::reason, + reversed_at: Time + ) -> void + + def to_hash: -> Increase::Models::InboundWireTransfer::reversal + + type reason = :duplicate | :creditor_request + + module Reason + extend Increase::Internal::Type::Enum + + # The inbound wire transfer was a duplicate. + DUPLICATE: :duplicate + + # The recipient of the wire transfer requested the funds be returned to the sender. + CREDITOR_REQUEST: :creditor_request + + def self?.values: -> ::Array[Increase::Models::InboundWireTransfer::Reversal::reason] + end + end + type status = :pending | :accepted | :declined | :reversed module Status diff --git a/sig/increase/models/inbound_wire_transfer_reverse_params.rbs b/sig/increase/models/inbound_wire_transfer_reverse_params.rbs new file mode 100644 index 000000000..cb84995d8 --- /dev/null +++ b/sig/increase/models/inbound_wire_transfer_reverse_params.rbs @@ -0,0 +1,35 @@ +module Increase + module Models + type inbound_wire_transfer_reverse_params = + { reason: Increase::Models::InboundWireTransferReverseParams::reason } + & Increase::Internal::Type::request_parameters + + class InboundWireTransferReverseParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_accessor reason: Increase::Models::InboundWireTransferReverseParams::reason + + def initialize: ( + reason: Increase::Models::InboundWireTransferReverseParams::reason, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> Increase::Models::inbound_wire_transfer_reverse_params + + type reason = :duplicate | :creditor_request + + module Reason + extend Increase::Internal::Type::Enum + + # The inbound wire transfer was a duplicate. + DUPLICATE: :duplicate + + # The recipient of the wire transfer requested the funds be returned to the sender. + CREDITOR_REQUEST: :creditor_request + + def self?.values: -> ::Array[Increase::Models::InboundWireTransferReverseParams::reason] + end + end + end +end diff --git a/sig/increase/resources/inbound_wire_transfers.rbs b/sig/increase/resources/inbound_wire_transfers.rbs index 3d7a6acb2..94ec3d140 100644 --- a/sig/increase/resources/inbound_wire_transfers.rbs +++ b/sig/increase/resources/inbound_wire_transfers.rbs @@ -16,6 +16,12 @@ module Increase ?request_options: Increase::request_opts ) -> Increase::Internal::Page[Increase::Models::InboundWireTransfer] + def reverse: ( + String inbound_wire_transfer_id, + reason: Increase::Models::InboundWireTransferReverseParams::reason, + ?request_options: Increase::request_opts + ) -> Increase::Models::InboundWireTransfer + def initialize: (client: Increase::Client) -> void end end diff --git a/test/increase/internal/type/base_model_test.rb b/test/increase/internal/type/base_model_test.rb index 5adab9f8e..fcc31a56e 100644 --- a/test/increase/internal/type/base_model_test.rb +++ b/test/increase/internal/type/base_model_test.rb @@ -194,11 +194,9 @@ def test_coerce [E0.new(:one), "one"] => [{yes: 1}, :one], [E0.new(:two), "one"] => [{maybe: 1}, "one"], - # rubocop:disable Lint/BooleanSymbol [E1, true] => [{yes: 1}, true], [E1, false] => [{no: 1}, false], [E1, :true] => [{no: 1}, :true], - # rubocop:enable Lint/BooleanSymbol [E2, 1] => [{yes: 1}, 1], [E2, 1.0] => [{yes: 1}, 1], diff --git a/test/increase/resources/inbound_wire_transfers_test.rb b/test/increase/resources/inbound_wire_transfers_test.rb index ed1cd98ad..abab4dead 100644 --- a/test/increase/resources/inbound_wire_transfers_test.rb +++ b/test/increase/resources/inbound_wire_transfers_test.rb @@ -34,6 +34,7 @@ def test_retrieve originator_to_beneficiary_information_line2: String | nil, originator_to_beneficiary_information_line3: String | nil, originator_to_beneficiary_information_line4: String | nil, + reversal: Increase::Models::InboundWireTransfer::Reversal | nil, sender_reference: String | nil, status: Increase::Models::InboundWireTransfer::Status, type: Increase::Models::InboundWireTransfer::Type @@ -79,6 +80,47 @@ def test_list originator_to_beneficiary_information_line2: String | nil, originator_to_beneficiary_information_line3: String | nil, originator_to_beneficiary_information_line4: String | nil, + reversal: Increase::Models::InboundWireTransfer::Reversal | nil, + sender_reference: String | nil, + status: Increase::Models::InboundWireTransfer::Status, + type: Increase::Models::InboundWireTransfer::Type + } + end + end + + def test_reverse_required_params + response = + @increase.inbound_wire_transfers.reverse("inbound_wire_transfer_id", reason: :creditor_request) + + assert_pattern do + response => Increase::Models::InboundWireTransfer + end + + assert_pattern do + response => { + id: String, + account_id: String, + account_number_id: String, + amount: Integer, + beneficiary_address_line1: String | nil, + beneficiary_address_line2: String | nil, + beneficiary_address_line3: String | nil, + beneficiary_name: String | nil, + beneficiary_reference: String | nil, + created_at: Time, + description: String, + input_message_accountability_data: String | nil, + originator_address_line1: String | nil, + originator_address_line2: String | nil, + originator_address_line3: String | nil, + originator_name: String | nil, + originator_routing_number: String | nil, + originator_to_beneficiary_information: String | nil, + originator_to_beneficiary_information_line1: String | nil, + originator_to_beneficiary_information_line2: String | nil, + originator_to_beneficiary_information_line3: String | nil, + originator_to_beneficiary_information_line4: String | nil, + reversal: Increase::Models::InboundWireTransfer::Reversal | nil, sender_reference: String | nil, status: Increase::Models::InboundWireTransfer::Status, type: Increase::Models::InboundWireTransfer::Type diff --git a/test/increase/resources/simulations/inbound_wire_transfers_test.rb b/test/increase/resources/simulations/inbound_wire_transfers_test.rb index f9e9254f4..1f5662b4c 100644 --- a/test/increase/resources/simulations/inbound_wire_transfers_test.rb +++ b/test/increase/resources/simulations/inbound_wire_transfers_test.rb @@ -38,6 +38,7 @@ def test_create_required_params originator_to_beneficiary_information_line2: String | nil, originator_to_beneficiary_information_line3: String | nil, originator_to_beneficiary_information_line4: String | nil, + reversal: Increase::Models::InboundWireTransfer::Reversal | nil, sender_reference: String | nil, status: Increase::Models::InboundWireTransfer::Status, type: Increase::Models::InboundWireTransfer::Type