Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.13"
".": "0.1.0-alpha.14"
}
11 changes: 11 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "increase", "~> 0.1.0.pre.alpha.13"
gem "increase", "~> 0.1.0.pre.alpha.14"
```

<!-- x-release-please-end -->
Expand Down
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions lib/increase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
56 changes: 55 additions & 1 deletion lib/increase/models/inbound_wire_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand All @@ -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.
#
Expand Down Expand Up @@ -213,13 +220,60 @@ 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.
#
# @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<Symbol>]
end
end

# The status of the transfer.
#
# @see Increase::Models::InboundWireTransfer#status
Expand Down
36 changes: 36 additions & 0 deletions lib/increase/models/inbound_wire_transfer_reverse_params.rb
Original file line number Diff line number Diff line change
@@ -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<Symbol>]
end
end
end
end
24 changes: 24 additions & 0 deletions lib/increase/resources/inbound_wire_transfers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion lib/increase/version.rb
Original file line number Diff line number Diff line change
@@ -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
68 changes: 68 additions & 0 deletions rbi/increase/models/inbound_wire_transfer.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading
Loading