diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33a65d75c..21621582f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.77.0" + ".": "1.78.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index c27c54482..018fcf798 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e81b9b39563d895c47a1eceb9fd7cac6bc3f8e6f21c57c1d01ae2cdf360b73ce.yml -openapi_spec_hash: 9eee6e29a9d53623d380e8afae9ef482 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d19e08b9b1b9aa23a3a0c86db6eb3500b3a4aaf2d9f549a0177c5bebe67d098.yml +openapi_spec_hash: eec4190f1aca04351de8891c6a9b37da config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fc8f02e5..d32fa1c48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.78.0 (2025-09-16) + +Full Changelog: [v1.77.0...v1.78.0](https://github.com/Increase/increase-ruby/compare/v1.77.0...v1.78.0) + +### Features + +* **api:** api update ([a643e15](https://github.com/Increase/increase-ruby/commit/a643e1536b7cdfb7e311d9f6cfd18eaef9a4db7d)) + ## 1.77.0 (2025-09-16) Full Changelog: [v1.76.0...v1.77.0](https://github.com/Increase/increase-ruby/compare/v1.76.0...v1.77.0) diff --git a/Gemfile.lock b/Gemfile.lock index a39db1b77..c566e5233 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.77.0) + increase (1.78.0) connection_pool GEM diff --git a/README.md b/README.md index e85cf247d..eefa3fb1b 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.77.0" +gem "increase", "~> 1.78.0" ``` diff --git a/lib/increase/models/wire_transfer.rb b/lib/increase/models/wire_transfer.rb index 4919eac63..d1e02f331 100644 --- a/lib/increase/models/wire_transfer.rb +++ b/lib/increase/models/wire_transfer.rb @@ -110,8 +110,8 @@ class WireTransfer < Increase::Internal::Type::BaseModel # @!attribute message_to_recipient # The message that will show on the recipient's bank statement. # - # @return [String, nil] - required :message_to_recipient, String, nil?: true + # @return [String] + required :message_to_recipient, String # @!attribute network # The transfer's network. @@ -152,6 +152,12 @@ class WireTransfer < Increase::Internal::Type::BaseModel # @return [String, nil] required :pending_transaction_id, String, nil?: true + # @!attribute remittance + # Remittance information sent with the wire transfer. + # + # @return [Increase::Models::WireTransfer::Remittance, nil] + required :remittance, -> { Increase::WireTransfer::Remittance }, nil?: true + # @!attribute reversal # If your transfer is reversed, this will contain details of the reversal. # @@ -196,7 +202,7 @@ class WireTransfer < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::WireTransfer::Type] required :type, enum: -> { Increase::WireTransfer::Type } - # @!method initialize(id:, account_id:, account_number:, amount:, approval:, beneficiary_address_line1:, beneficiary_address_line2:, beneficiary_address_line3:, beneficiary_name:, cancellation:, created_at:, created_by:, currency:, external_account_id:, idempotency_key:, inbound_wire_drawdown_request_id:, message_to_recipient:, network:, originator_address_line1:, originator_address_line2:, originator_address_line3:, originator_name:, pending_transaction_id:, reversal:, routing_number:, source_account_number_id:, status:, submission:, transaction_id:, type:) + # @!method initialize(id:, account_id:, account_number:, amount:, approval:, beneficiary_address_line1:, beneficiary_address_line2:, beneficiary_address_line3:, beneficiary_name:, cancellation:, created_at:, created_by:, currency:, external_account_id:, idempotency_key:, inbound_wire_drawdown_request_id:, message_to_recipient:, network:, originator_address_line1:, originator_address_line2:, originator_address_line3:, originator_name:, pending_transaction_id:, remittance:, reversal:, routing_number:, source_account_number_id:, status:, submission:, transaction_id:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::WireTransfer} for more details. # @@ -235,7 +241,7 @@ class WireTransfer < Increase::Internal::Type::BaseModel # # @param inbound_wire_drawdown_request_id [String, nil] The ID of an Inbound Wire Drawdown Request in response to which this transfer wa # - # @param message_to_recipient [String, nil] The message that will show on the recipient's bank statement. + # @param message_to_recipient [String] The message that will show on the recipient's bank statement. # # @param network [Symbol, Increase::Models::WireTransfer::Network] The transfer's network. # @@ -249,6 +255,8 @@ class WireTransfer < Increase::Internal::Type::BaseModel # # @param pending_transaction_id [String, nil] The ID for the pending transaction representing the transfer. A pending transact # + # @param remittance [Increase::Models::WireTransfer::Remittance, nil] Remittance information sent with the wire transfer. + # # @param reversal [Increase::Models::WireTransfer::Reversal, nil] If your transfer is reversed, this will contain details of the reversal. # # @param routing_number [String] The American Bankers' Association (ABA) Routing Transit Number (RTN). @@ -459,6 +467,108 @@ module Network # @return [Array] end + # @see Increase::Models::WireTransfer#remittance + class Remittance < Increase::Internal::Type::BaseModel + # @!attribute category + # The type of remittance information being passed. + # + # @return [Symbol, Increase::Models::WireTransfer::Remittance::Category] + required :category, enum: -> { Increase::WireTransfer::Remittance::Category } + + # @!attribute tax + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + # + # @return [Increase::Models::WireTransfer::Remittance::Tax, nil] + required :tax, -> { Increase::WireTransfer::Remittance::Tax }, nil?: true + + # @!attribute unstructured + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + # + # @return [Increase::Models::WireTransfer::Remittance::Unstructured, nil] + required :unstructured, -> { Increase::WireTransfer::Remittance::Unstructured }, nil?: true + + # @!method initialize(category:, tax:, unstructured:) + # Some parameter documentations has been truncated, see + # {Increase::Models::WireTransfer::Remittance} for more details. + # + # Remittance information sent with the wire transfer. + # + # @param category [Symbol, Increase::Models::WireTransfer::Remittance::Category] The type of remittance information being passed. + # + # @param tax [Increase::Models::WireTransfer::Remittance::Tax, nil] Internal Revenue Service (IRS) tax repayment information. Required if `category` + # + # @param unstructured [Increase::Models::WireTransfer::Remittance::Unstructured, nil] Unstructured remittance information. Required if `category` is equal to `unstruc + + # The type of remittance information being passed. + # + # @see Increase::Models::WireTransfer::Remittance#category + module Category + extend Increase::Internal::Type::Enum + + # The wire transfer contains unstructured remittance information. + UNSTRUCTURED = :unstructured + + # The wire transfer is for tax payment purposes to the Internal Revenue Service (IRS). + TAX = :tax + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::WireTransfer::Remittance#tax + class Tax < Increase::Internal::Type::BaseModel + # @!attribute date + # The month and year the tax payment is for, in YYYY-MM-DD format. The day is + # ignored. + # + # @return [Date] + required :date, Date + + # @!attribute identification_number + # The 9-digit Tax Identification Number (TIN) or Employer Identification Number + # (EIN). + # + # @return [String] + required :identification_number, String + + # @!attribute type_code + # The 5-character tax type code. + # + # @return [String] + required :type_code, String + + # @!method initialize(date:, identification_number:, type_code:) + # Some parameter documentations has been truncated, see + # {Increase::Models::WireTransfer::Remittance::Tax} for more details. + # + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + # + # @param date [Date] The month and year the tax payment is for, in YYYY-MM-DD format. The day is igno + # + # @param identification_number [String] The 9-digit Tax Identification Number (TIN) or Employer Identification Number (E + # + # @param type_code [String] The 5-character tax type code. + end + + # @see Increase::Models::WireTransfer::Remittance#unstructured + class Unstructured < Increase::Internal::Type::BaseModel + # @!attribute message + # The message to the beneficiary. + # + # @return [String] + required :message, String + + # @!method initialize(message:) + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + # + # @param message [String] The message to the beneficiary. + end + end + # @see Increase::Models::WireTransfer#reversal class Reversal < Increase::Internal::Type::BaseModel # @!attribute amount diff --git a/lib/increase/models/wire_transfer_create_params.rb b/lib/increase/models/wire_transfer_create_params.rb index 1619c1f9f..5ce176d5b 100644 --- a/lib/increase/models/wire_transfer_create_params.rb +++ b/lib/increase/models/wire_transfer_create_params.rb @@ -25,12 +25,6 @@ class WireTransferCreateParams < Increase::Internal::Type::BaseModel # @return [String] required :beneficiary_name, String - # @!attribute message_to_recipient - # The message that will show on the recipient's bank statement. - # - # @return [String] - required :message_to_recipient, String - # @!attribute account_number # The account number for the destination account. # @@ -97,6 +91,12 @@ class WireTransferCreateParams < Increase::Internal::Type::BaseModel # @return [String, nil] optional :originator_name, String + # @!attribute remittance + # Additional remittance information related to the wire transfer. + # + # @return [Increase::Models::WireTransferCreateParams::Remittance, nil] + optional :remittance, -> { Increase::WireTransferCreateParams::Remittance } + # @!attribute require_approval # Whether the transfer requires explicit approval via the dashboard or API. # @@ -116,7 +116,7 @@ class WireTransferCreateParams < Increase::Internal::Type::BaseModel # @return [String, nil] optional :source_account_number_id, String - # @!method initialize(account_id:, amount:, beneficiary_name:, message_to_recipient:, account_number: nil, beneficiary_address_line1: nil, beneficiary_address_line2: nil, beneficiary_address_line3: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, originator_address_line1: nil, originator_address_line2: nil, originator_address_line3: nil, originator_name: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) + # @!method initialize(account_id:, amount:, beneficiary_name:, account_number: nil, beneficiary_address_line1: nil, beneficiary_address_line2: nil, beneficiary_address_line3: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, originator_address_line1: nil, originator_address_line2: nil, originator_address_line3: nil, originator_name: nil, remittance: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Increase::Models::WireTransferCreateParams} for more details. # @@ -126,8 +126,6 @@ class WireTransferCreateParams < Increase::Internal::Type::BaseModel # # @param beneficiary_name [String] The beneficiary's name. # - # @param message_to_recipient [String] The message that will show on the recipient's bank statement. - # # @param account_number [String] The account number for the destination account. # # @param beneficiary_address_line1 [String] The beneficiary's address line 1. @@ -148,6 +146,8 @@ class WireTransferCreateParams < Increase::Internal::Type::BaseModel # # @param originator_name [String] The originator's name. This is only necessary if you're transferring from a comm # + # @param remittance [Increase::Models::WireTransferCreateParams::Remittance] Additional remittance information related to the wire transfer. + # # @param require_approval [Boolean] Whether the transfer requires explicit approval via the dashboard or API. # # @param routing_number [String] The American Bankers' Association (ABA) Routing Transit Number (RTN) for the des @@ -155,6 +155,107 @@ class WireTransferCreateParams < Increase::Internal::Type::BaseModel # @param source_account_number_id [String] The ID of an Account Number that will be passed to the wire's recipient # # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + class Remittance < Increase::Internal::Type::BaseModel + # @!attribute category + # The type of remittance information being passed. + # + # @return [Symbol, Increase::Models::WireTransferCreateParams::Remittance::Category] + required :category, enum: -> { Increase::WireTransferCreateParams::Remittance::Category } + + # @!attribute tax + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + # + # @return [Increase::Models::WireTransferCreateParams::Remittance::Tax, nil] + optional :tax, -> { Increase::WireTransferCreateParams::Remittance::Tax } + + # @!attribute unstructured + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + # + # @return [Increase::Models::WireTransferCreateParams::Remittance::Unstructured, nil] + optional :unstructured, -> { Increase::WireTransferCreateParams::Remittance::Unstructured } + + # @!method initialize(category:, tax: nil, unstructured: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::WireTransferCreateParams::Remittance} for more details. + # + # Additional remittance information related to the wire transfer. + # + # @param category [Symbol, Increase::Models::WireTransferCreateParams::Remittance::Category] The type of remittance information being passed. + # + # @param tax [Increase::Models::WireTransferCreateParams::Remittance::Tax] Internal Revenue Service (IRS) tax repayment information. Required if `category` + # + # @param unstructured [Increase::Models::WireTransferCreateParams::Remittance::Unstructured] Unstructured remittance information. Required if `category` is equal to `unstruc + + # The type of remittance information being passed. + # + # @see Increase::Models::WireTransferCreateParams::Remittance#category + module Category + extend Increase::Internal::Type::Enum + + # The wire transfer contains unstructured remittance information. + UNSTRUCTURED = :unstructured + + # The wire transfer is for tax payment purposes to the Internal Revenue Service (IRS). + TAX = :tax + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::WireTransferCreateParams::Remittance#tax + class Tax < Increase::Internal::Type::BaseModel + # @!attribute date + # The month and year the tax payment is for, in YYYY-MM-DD format. The day is + # ignored. + # + # @return [Date] + required :date, Date + + # @!attribute identification_number + # The 9-digit Tax Identification Number (TIN) or Employer Identification Number + # (EIN). + # + # @return [String] + required :identification_number, String + + # @!attribute type_code + # The 5-character tax type code. + # + # @return [String] + required :type_code, String + + # @!method initialize(date:, identification_number:, type_code:) + # Some parameter documentations has been truncated, see + # {Increase::Models::WireTransferCreateParams::Remittance::Tax} for more details. + # + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + # + # @param date [Date] The month and year the tax payment is for, in YYYY-MM-DD format. The day is igno + # + # @param identification_number [String] The 9-digit Tax Identification Number (TIN) or Employer Identification Number (E + # + # @param type_code [String] The 5-character tax type code. + end + + # @see Increase::Models::WireTransferCreateParams::Remittance#unstructured + class Unstructured < Increase::Internal::Type::BaseModel + # @!attribute message + # The message to the beneficiary. + # + # @return [String] + required :message, String + + # @!method initialize(message:) + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + # + # @param message [String] The message to the beneficiary. + end + end end end end diff --git a/lib/increase/resources/wire_transfers.rb b/lib/increase/resources/wire_transfers.rb index eee134424..9941c7ac7 100644 --- a/lib/increase/resources/wire_transfers.rb +++ b/lib/increase/resources/wire_transfers.rb @@ -8,7 +8,7 @@ class WireTransfers # # Create a Wire Transfer # - # @overload create(account_id:, amount:, beneficiary_name:, message_to_recipient:, account_number: nil, beneficiary_address_line1: nil, beneficiary_address_line2: nil, beneficiary_address_line3: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, originator_address_line1: nil, originator_address_line2: nil, originator_address_line3: nil, originator_name: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) + # @overload create(account_id:, amount:, beneficiary_name:, account_number: nil, beneficiary_address_line1: nil, beneficiary_address_line2: nil, beneficiary_address_line3: nil, external_account_id: nil, inbound_wire_drawdown_request_id: nil, originator_address_line1: nil, originator_address_line2: nil, originator_address_line3: nil, originator_name: nil, remittance: nil, require_approval: nil, routing_number: nil, source_account_number_id: nil, request_options: {}) # # @param account_id [String] The identifier for the account that will send the transfer. # @@ -16,8 +16,6 @@ class WireTransfers # # @param beneficiary_name [String] The beneficiary's name. # - # @param message_to_recipient [String] The message that will show on the recipient's bank statement. - # # @param account_number [String] The account number for the destination account. # # @param beneficiary_address_line1 [String] The beneficiary's address line 1. @@ -38,6 +36,8 @@ class WireTransfers # # @param originator_name [String] The originator's name. This is only necessary if you're transferring from a comm # + # @param remittance [Increase::Models::WireTransferCreateParams::Remittance] Additional remittance information related to the wire transfer. + # # @param require_approval [Boolean] Whether the transfer requires explicit approval via the dashboard or API. # # @param routing_number [String] The American Bankers' Association (ABA) Routing Transit Number (RTN) for the des diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 735a1ff71..9ad91b759 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.77.0" + VERSION = "1.78.0" end diff --git a/rbi/increase/models/wire_transfer.rbi b/rbi/increase/models/wire_transfer.rbi index 7c79978ee..f7174ae3a 100644 --- a/rbi/increase/models/wire_transfer.rbi +++ b/rbi/increase/models/wire_transfer.rbi @@ -101,7 +101,7 @@ module Increase attr_accessor :inbound_wire_drawdown_request_id # The message that will show on the recipient's bank statement. - sig { returns(T.nilable(String)) } + sig { returns(String) } attr_accessor :message_to_recipient # The transfer's network. @@ -131,6 +131,17 @@ module Increase sig { returns(T.nilable(String)) } attr_accessor :pending_transaction_id + # Remittance information sent with the wire transfer. + sig { returns(T.nilable(Increase::WireTransfer::Remittance)) } + attr_reader :remittance + + sig do + params( + remittance: T.nilable(Increase::WireTransfer::Remittance::OrHash) + ).void + end + attr_writer :remittance + # If your transfer is reversed, this will contain details of the reversal. sig { returns(T.nilable(Increase::WireTransfer::Reversal)) } attr_reader :reversal @@ -195,13 +206,14 @@ module Increase external_account_id: T.nilable(String), idempotency_key: T.nilable(String), inbound_wire_drawdown_request_id: T.nilable(String), - message_to_recipient: T.nilable(String), + message_to_recipient: String, network: Increase::WireTransfer::Network::OrSymbol, originator_address_line1: T.nilable(String), originator_address_line2: T.nilable(String), originator_address_line3: T.nilable(String), originator_name: T.nilable(String), pending_transaction_id: T.nilable(String), + remittance: T.nilable(Increase::WireTransfer::Remittance::OrHash), reversal: T.nilable(Increase::WireTransfer::Reversal::OrHash), routing_number: String, source_account_number_id: T.nilable(String), @@ -268,6 +280,8 @@ module Increase # [requires approval](https://increase.com/documentation/transfer-approvals#transfer-approvals) # by someone else in your organization. pending_transaction_id:, + # Remittance information sent with the wire transfer. + remittance:, # If your transfer is reversed, this will contain details of the reversal. reversal:, # The American Bankers' Association (ABA) Routing Transit Number (RTN). @@ -306,13 +320,14 @@ module Increase external_account_id: T.nilable(String), idempotency_key: T.nilable(String), inbound_wire_drawdown_request_id: T.nilable(String), - message_to_recipient: T.nilable(String), + message_to_recipient: String, network: Increase::WireTransfer::Network::TaggedSymbol, originator_address_line1: T.nilable(String), originator_address_line2: T.nilable(String), originator_address_line3: T.nilable(String), originator_name: T.nilable(String), pending_transaction_id: T.nilable(String), + remittance: T.nilable(Increase::WireTransfer::Remittance), reversal: T.nilable(Increase::WireTransfer::Reversal), routing_number: String, source_account_number_id: T.nilable(String), @@ -687,6 +702,203 @@ module Increase end end + class Remittance < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::WireTransfer::Remittance, + Increase::Internal::AnyHash + ) + end + + # The type of remittance information being passed. + sig do + returns(Increase::WireTransfer::Remittance::Category::TaggedSymbol) + end + attr_accessor :category + + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + sig { returns(T.nilable(Increase::WireTransfer::Remittance::Tax)) } + attr_reader :tax + + sig do + params( + tax: T.nilable(Increase::WireTransfer::Remittance::Tax::OrHash) + ).void + end + attr_writer :tax + + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + sig do + returns(T.nilable(Increase::WireTransfer::Remittance::Unstructured)) + end + attr_reader :unstructured + + sig do + params( + unstructured: + T.nilable( + Increase::WireTransfer::Remittance::Unstructured::OrHash + ) + ).void + end + attr_writer :unstructured + + # Remittance information sent with the wire transfer. + sig do + params( + category: Increase::WireTransfer::Remittance::Category::OrSymbol, + tax: T.nilable(Increase::WireTransfer::Remittance::Tax::OrHash), + unstructured: + T.nilable( + Increase::WireTransfer::Remittance::Unstructured::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The type of remittance information being passed. + category:, + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + tax:, + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + unstructured: + ) + end + + sig do + override.returns( + { + category: + Increase::WireTransfer::Remittance::Category::TaggedSymbol, + tax: T.nilable(Increase::WireTransfer::Remittance::Tax), + unstructured: + T.nilable(Increase::WireTransfer::Remittance::Unstructured) + } + ) + end + def to_hash + end + + # The type of remittance information being passed. + module Category + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::WireTransfer::Remittance::Category) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The wire transfer contains unstructured remittance information. + UNSTRUCTURED = + T.let( + :unstructured, + Increase::WireTransfer::Remittance::Category::TaggedSymbol + ) + + # The wire transfer is for tax payment purposes to the Internal Revenue Service (IRS). + TAX = + T.let( + :tax, + Increase::WireTransfer::Remittance::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::WireTransfer::Remittance::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Tax < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::WireTransfer::Remittance::Tax, + Increase::Internal::AnyHash + ) + end + + # The month and year the tax payment is for, in YYYY-MM-DD format. The day is + # ignored. + sig { returns(Date) } + attr_accessor :date + + # The 9-digit Tax Identification Number (TIN) or Employer Identification Number + # (EIN). + sig { returns(String) } + attr_accessor :identification_number + + # The 5-character tax type code. + sig { returns(String) } + attr_accessor :type_code + + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + sig do + params( + date: Date, + identification_number: String, + type_code: String + ).returns(T.attached_class) + end + def self.new( + # The month and year the tax payment is for, in YYYY-MM-DD format. The day is + # ignored. + date:, + # The 9-digit Tax Identification Number (TIN) or Employer Identification Number + # (EIN). + identification_number:, + # The 5-character tax type code. + type_code: + ) + end + + sig do + override.returns( + { date: Date, identification_number: String, type_code: String } + ) + end + def to_hash + end + end + + class Unstructured < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::WireTransfer::Remittance::Unstructured, + Increase::Internal::AnyHash + ) + end + + # The message to the beneficiary. + sig { returns(String) } + attr_accessor :message + + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + sig { params(message: String).returns(T.attached_class) } + def self.new( + # The message to the beneficiary. + message: + ) + end + + sig { override.returns({ message: String }) } + def to_hash + end + end + end + class Reversal < Increase::Internal::Type::BaseModel OrHash = T.type_alias do diff --git a/rbi/increase/models/wire_transfer_create_params.rbi b/rbi/increase/models/wire_transfer_create_params.rbi index 2947a1e0d..375094138 100644 --- a/rbi/increase/models/wire_transfer_create_params.rbi +++ b/rbi/increase/models/wire_transfer_create_params.rbi @@ -23,10 +23,6 @@ module Increase sig { returns(String) } attr_accessor :beneficiary_name - # The message that will show on the recipient's bank statement. - sig { returns(String) } - attr_accessor :message_to_recipient - # The account number for the destination account. sig { returns(T.nilable(String)) } attr_reader :account_number @@ -103,6 +99,17 @@ module Increase sig { params(originator_name: String).void } attr_writer :originator_name + # Additional remittance information related to the wire transfer. + sig { returns(T.nilable(Increase::WireTransferCreateParams::Remittance)) } + attr_reader :remittance + + sig do + params( + remittance: Increase::WireTransferCreateParams::Remittance::OrHash + ).void + end + attr_writer :remittance + # Whether the transfer requires explicit approval via the dashboard or API. sig { returns(T.nilable(T::Boolean)) } attr_reader :require_approval @@ -130,7 +137,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, account_number: String, beneficiary_address_line1: String, beneficiary_address_line2: String, @@ -141,6 +147,7 @@ module Increase originator_address_line2: String, originator_address_line3: String, originator_name: String, + remittance: Increase::WireTransferCreateParams::Remittance::OrHash, require_approval: T::Boolean, routing_number: String, source_account_number_id: String, @@ -154,8 +161,6 @@ module Increase amount:, # The beneficiary's name. beneficiary_name:, - # The message that will show on the recipient's bank statement. - message_to_recipient:, # The account number for the destination account. account_number: nil, # The beneficiary's address line 1. @@ -182,6 +187,8 @@ module Increase # The originator's name. This is only necessary if you're transferring from a # commingled account. Otherwise, we'll use the associated entity's details. originator_name: nil, + # Additional remittance information related to the wire transfer. + remittance: nil, # Whether the transfer requires explicit approval via the dashboard or API. require_approval: nil, # The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -199,7 +206,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, account_number: String, beneficiary_address_line1: String, beneficiary_address_line2: String, @@ -210,6 +216,7 @@ module Increase originator_address_line2: String, originator_address_line3: String, originator_name: String, + remittance: Increase::WireTransferCreateParams::Remittance, require_approval: T::Boolean, routing_number: String, source_account_number_id: String, @@ -219,6 +226,213 @@ module Increase end def to_hash end + + class Remittance < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::WireTransferCreateParams::Remittance, + Increase::Internal::AnyHash + ) + end + + # The type of remittance information being passed. + sig do + returns( + Increase::WireTransferCreateParams::Remittance::Category::OrSymbol + ) + end + attr_accessor :category + + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + sig do + returns( + T.nilable(Increase::WireTransferCreateParams::Remittance::Tax) + ) + end + attr_reader :tax + + sig do + params( + tax: Increase::WireTransferCreateParams::Remittance::Tax::OrHash + ).void + end + attr_writer :tax + + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + sig do + returns( + T.nilable( + Increase::WireTransferCreateParams::Remittance::Unstructured + ) + ) + end + attr_reader :unstructured + + sig do + params( + unstructured: + Increase::WireTransferCreateParams::Remittance::Unstructured::OrHash + ).void + end + attr_writer :unstructured + + # Additional remittance information related to the wire transfer. + sig do + params( + category: + Increase::WireTransferCreateParams::Remittance::Category::OrSymbol, + tax: Increase::WireTransferCreateParams::Remittance::Tax::OrHash, + unstructured: + Increase::WireTransferCreateParams::Remittance::Unstructured::OrHash + ).returns(T.attached_class) + end + def self.new( + # The type of remittance information being passed. + category:, + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + tax: nil, + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + unstructured: nil + ) + end + + sig do + override.returns( + { + category: + Increase::WireTransferCreateParams::Remittance::Category::OrSymbol, + tax: Increase::WireTransferCreateParams::Remittance::Tax, + unstructured: + Increase::WireTransferCreateParams::Remittance::Unstructured + } + ) + end + def to_hash + end + + # The type of remittance information being passed. + module Category + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::WireTransferCreateParams::Remittance::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The wire transfer contains unstructured remittance information. + UNSTRUCTURED = + T.let( + :unstructured, + Increase::WireTransferCreateParams::Remittance::Category::TaggedSymbol + ) + + # The wire transfer is for tax payment purposes to the Internal Revenue Service (IRS). + TAX = + T.let( + :tax, + Increase::WireTransferCreateParams::Remittance::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::WireTransferCreateParams::Remittance::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Tax < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::WireTransferCreateParams::Remittance::Tax, + Increase::Internal::AnyHash + ) + end + + # The month and year the tax payment is for, in YYYY-MM-DD format. The day is + # ignored. + sig { returns(Date) } + attr_accessor :date + + # The 9-digit Tax Identification Number (TIN) or Employer Identification Number + # (EIN). + sig { returns(String) } + attr_accessor :identification_number + + # The 5-character tax type code. + sig { returns(String) } + attr_accessor :type_code + + # Internal Revenue Service (IRS) tax repayment information. Required if `category` + # is equal to `tax`. + sig do + params( + date: Date, + identification_number: String, + type_code: String + ).returns(T.attached_class) + end + def self.new( + # The month and year the tax payment is for, in YYYY-MM-DD format. The day is + # ignored. + date:, + # The 9-digit Tax Identification Number (TIN) or Employer Identification Number + # (EIN). + identification_number:, + # The 5-character tax type code. + type_code: + ) + end + + sig do + override.returns( + { date: Date, identification_number: String, type_code: String } + ) + end + def to_hash + end + end + + class Unstructured < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::WireTransferCreateParams::Remittance::Unstructured, + Increase::Internal::AnyHash + ) + end + + # The message to the beneficiary. + sig { returns(String) } + attr_accessor :message + + # Unstructured remittance information. Required if `category` is equal to + # `unstructured`. + sig { params(message: String).returns(T.attached_class) } + def self.new( + # The message to the beneficiary. + message: + ) + end + + sig { override.returns({ message: String }) } + def to_hash + end + end + end end end end diff --git a/rbi/increase/resources/wire_transfers.rbi b/rbi/increase/resources/wire_transfers.rbi index d2c7f37e5..329c01322 100644 --- a/rbi/increase/resources/wire_transfers.rbi +++ b/rbi/increase/resources/wire_transfers.rbi @@ -9,7 +9,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, account_number: String, beneficiary_address_line1: String, beneficiary_address_line2: String, @@ -20,6 +19,7 @@ module Increase originator_address_line2: String, originator_address_line3: String, originator_name: String, + remittance: Increase::WireTransferCreateParams::Remittance::OrHash, require_approval: T::Boolean, routing_number: String, source_account_number_id: String, @@ -33,8 +33,6 @@ module Increase amount:, # The beneficiary's name. beneficiary_name:, - # The message that will show on the recipient's bank statement. - message_to_recipient:, # The account number for the destination account. account_number: nil, # The beneficiary's address line 1. @@ -61,6 +59,8 @@ module Increase # The originator's name. This is only necessary if you're transferring from a # commingled account. Otherwise, we'll use the associated entity's details. originator_name: nil, + # Additional remittance information related to the wire transfer. + remittance: nil, # Whether the transfer requires explicit approval via the dashboard or API. require_approval: nil, # The American Bankers' Association (ABA) Routing Transit Number (RTN) for the diff --git a/sig/increase/models/wire_transfer.rbs b/sig/increase/models/wire_transfer.rbs index 5c8c67920..2d2f12d0e 100644 --- a/sig/increase/models/wire_transfer.rbs +++ b/sig/increase/models/wire_transfer.rbs @@ -18,13 +18,14 @@ module Increase external_account_id: String?, idempotency_key: String?, inbound_wire_drawdown_request_id: String?, - message_to_recipient: String?, + message_to_recipient: String, network: Increase::Models::WireTransfer::network, :originator_address_line1 => String?, :originator_address_line2 => String?, :originator_address_line3 => String?, originator_name: String?, pending_transaction_id: String?, + remittance: Increase::WireTransfer::Remittance?, reversal: Increase::WireTransfer::Reversal?, routing_number: String, source_account_number_id: String?, @@ -67,7 +68,7 @@ module Increase attr_accessor inbound_wire_drawdown_request_id: String? - attr_accessor message_to_recipient: String? + attr_accessor message_to_recipient: String attr_accessor network: Increase::Models::WireTransfer::network @@ -81,6 +82,8 @@ module Increase attr_accessor pending_transaction_id: String? + attr_accessor remittance: Increase::WireTransfer::Remittance? + attr_accessor reversal: Increase::WireTransfer::Reversal? attr_accessor routing_number: String @@ -112,13 +115,14 @@ module Increase external_account_id: String?, idempotency_key: String?, inbound_wire_drawdown_request_id: String?, - message_to_recipient: String?, + message_to_recipient: String, network: Increase::Models::WireTransfer::network, originator_address_line1: String?, originator_address_line2: String?, originator_address_line3: String?, originator_name: String?, pending_transaction_id: String?, + remittance: Increase::WireTransfer::Remittance?, reversal: Increase::WireTransfer::Reversal?, routing_number: String, source_account_number_id: String?, @@ -145,13 +149,14 @@ module Increase external_account_id: String?, idempotency_key: String?, inbound_wire_drawdown_request_id: String?, - message_to_recipient: String?, + message_to_recipient: String, network: Increase::Models::WireTransfer::network, :originator_address_line1 => String?, :originator_address_line2 => String?, :originator_address_line3 => String?, originator_name: String?, pending_transaction_id: String?, + remittance: Increase::WireTransfer::Remittance?, reversal: Increase::WireTransfer::Reversal?, routing_number: String, source_account_number_id: String?, @@ -300,6 +305,80 @@ module Increase def self?.values: -> ::Array[Increase::Models::WireTransfer::network] end + type remittance = + { + category: Increase::Models::WireTransfer::Remittance::category, + tax: Increase::WireTransfer::Remittance::Tax?, + unstructured: Increase::WireTransfer::Remittance::Unstructured? + } + + class Remittance < Increase::Internal::Type::BaseModel + attr_accessor category: Increase::Models::WireTransfer::Remittance::category + + attr_accessor tax: Increase::WireTransfer::Remittance::Tax? + + attr_accessor unstructured: Increase::WireTransfer::Remittance::Unstructured? + + def initialize: ( + category: Increase::Models::WireTransfer::Remittance::category, + tax: Increase::WireTransfer::Remittance::Tax?, + unstructured: Increase::WireTransfer::Remittance::Unstructured? + ) -> void + + def to_hash: -> { + category: Increase::Models::WireTransfer::Remittance::category, + tax: Increase::WireTransfer::Remittance::Tax?, + unstructured: Increase::WireTransfer::Remittance::Unstructured? + } + + type category = :unstructured | :tax + + module Category + extend Increase::Internal::Type::Enum + + # The wire transfer contains unstructured remittance information. + UNSTRUCTURED: :unstructured + + # The wire transfer is for tax payment purposes to the Internal Revenue Service (IRS). + TAX: :tax + + def self?.values: -> ::Array[Increase::Models::WireTransfer::Remittance::category] + end + + type tax = + { date: Date, identification_number: String, type_code: String } + + class Tax < Increase::Internal::Type::BaseModel + attr_accessor date: Date + + attr_accessor identification_number: String + + attr_accessor type_code: String + + def initialize: ( + date: Date, + identification_number: String, + type_code: String + ) -> void + + def to_hash: -> { + date: Date, + identification_number: String, + type_code: String + } + end + + type unstructured = { message: String } + + class Unstructured < Increase::Internal::Type::BaseModel + attr_accessor message: String + + def initialize: (message: String) -> void + + def to_hash: -> { message: String } + end + end + type reversal = { amount: Integer, diff --git a/sig/increase/models/wire_transfer_create_params.rbs b/sig/increase/models/wire_transfer_create_params.rbs index 06c760065..ae7b176a1 100644 --- a/sig/increase/models/wire_transfer_create_params.rbs +++ b/sig/increase/models/wire_transfer_create_params.rbs @@ -5,7 +5,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, account_number: String, :beneficiary_address_line1 => String, :beneficiary_address_line2 => String, @@ -16,6 +15,7 @@ module Increase :originator_address_line2 => String, :originator_address_line3 => String, originator_name: String, + remittance: Increase::WireTransferCreateParams::Remittance, require_approval: bool, routing_number: String, source_account_number_id: String @@ -32,8 +32,6 @@ module Increase attr_accessor beneficiary_name: String - attr_accessor message_to_recipient: String - attr_reader account_number: String? def account_number=: (String) -> String @@ -74,6 +72,12 @@ module Increase def originator_name=: (String) -> String + attr_reader remittance: Increase::WireTransferCreateParams::Remittance? + + def remittance=: ( + Increase::WireTransferCreateParams::Remittance + ) -> Increase::WireTransferCreateParams::Remittance + attr_reader require_approval: bool? def require_approval=: (bool) -> bool @@ -90,7 +94,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, ?account_number: String, ?beneficiary_address_line1: String, ?beneficiary_address_line2: String, @@ -101,6 +104,7 @@ module Increase ?originator_address_line2: String, ?originator_address_line3: String, ?originator_name: String, + ?remittance: Increase::WireTransferCreateParams::Remittance, ?require_approval: bool, ?routing_number: String, ?source_account_number_id: String, @@ -111,7 +115,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, account_number: String, :beneficiary_address_line1 => String, :beneficiary_address_line2 => String, @@ -122,11 +125,94 @@ module Increase :originator_address_line2 => String, :originator_address_line3 => String, originator_name: String, + remittance: Increase::WireTransferCreateParams::Remittance, require_approval: bool, routing_number: String, source_account_number_id: String, request_options: Increase::RequestOptions } + + type remittance = + { + category: Increase::Models::WireTransferCreateParams::Remittance::category, + tax: Increase::WireTransferCreateParams::Remittance::Tax, + unstructured: Increase::WireTransferCreateParams::Remittance::Unstructured + } + + class Remittance < Increase::Internal::Type::BaseModel + attr_accessor category: Increase::Models::WireTransferCreateParams::Remittance::category + + attr_reader tax: Increase::WireTransferCreateParams::Remittance::Tax? + + def tax=: ( + Increase::WireTransferCreateParams::Remittance::Tax + ) -> Increase::WireTransferCreateParams::Remittance::Tax + + attr_reader unstructured: Increase::WireTransferCreateParams::Remittance::Unstructured? + + def unstructured=: ( + Increase::WireTransferCreateParams::Remittance::Unstructured + ) -> Increase::WireTransferCreateParams::Remittance::Unstructured + + def initialize: ( + category: Increase::Models::WireTransferCreateParams::Remittance::category, + ?tax: Increase::WireTransferCreateParams::Remittance::Tax, + ?unstructured: Increase::WireTransferCreateParams::Remittance::Unstructured + ) -> void + + def to_hash: -> { + category: Increase::Models::WireTransferCreateParams::Remittance::category, + tax: Increase::WireTransferCreateParams::Remittance::Tax, + unstructured: Increase::WireTransferCreateParams::Remittance::Unstructured + } + + type category = :unstructured | :tax + + module Category + extend Increase::Internal::Type::Enum + + # The wire transfer contains unstructured remittance information. + UNSTRUCTURED: :unstructured + + # The wire transfer is for tax payment purposes to the Internal Revenue Service (IRS). + TAX: :tax + + def self?.values: -> ::Array[Increase::Models::WireTransferCreateParams::Remittance::category] + end + + type tax = + { date: Date, identification_number: String, type_code: String } + + class Tax < Increase::Internal::Type::BaseModel + attr_accessor date: Date + + attr_accessor identification_number: String + + attr_accessor type_code: String + + def initialize: ( + date: Date, + identification_number: String, + type_code: String + ) -> void + + def to_hash: -> { + date: Date, + identification_number: String, + type_code: String + } + end + + type unstructured = { message: String } + + class Unstructured < Increase::Internal::Type::BaseModel + attr_accessor message: String + + def initialize: (message: String) -> void + + def to_hash: -> { message: String } + end + end end end end diff --git a/sig/increase/resources/wire_transfers.rbs b/sig/increase/resources/wire_transfers.rbs index 239073f86..bc65b379c 100644 --- a/sig/increase/resources/wire_transfers.rbs +++ b/sig/increase/resources/wire_transfers.rbs @@ -5,7 +5,6 @@ module Increase account_id: String, amount: Integer, beneficiary_name: String, - message_to_recipient: String, ?account_number: String, ?beneficiary_address_line1: String, ?beneficiary_address_line2: String, @@ -16,6 +15,7 @@ module Increase ?originator_address_line2: String, ?originator_address_line3: String, ?originator_name: String, + ?remittance: Increase::WireTransferCreateParams::Remittance, ?require_approval: bool, ?routing_number: String, ?source_account_number_id: String, diff --git a/test/increase/resources/simulations/wire_transfers_test.rb b/test/increase/resources/simulations/wire_transfers_test.rb index c1c414c2d..170c3b7e8 100644 --- a/test/increase/resources/simulations/wire_transfers_test.rb +++ b/test/increase/resources/simulations/wire_transfers_test.rb @@ -28,13 +28,14 @@ def test_reverse external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil, @@ -71,13 +72,14 @@ def test_submit external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil, diff --git a/test/increase/resources/wire_transfers_test.rb b/test/increase/resources/wire_transfers_test.rb index 52e41c846..e5d906815 100644 --- a/test/increase/resources/wire_transfers_test.rb +++ b/test/increase/resources/wire_transfers_test.rb @@ -8,8 +8,7 @@ def test_create_required_params @increase.wire_transfers.create( account_id: "account_in71c4amph0vgo2qllky", amount: 100, - beneficiary_name: "Ian Crease", - message_to_recipient: "New account transfer" + beneficiary_name: "Ian Crease" ) assert_pattern do @@ -34,13 +33,14 @@ def test_create_required_params external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil, @@ -77,13 +77,14 @@ def test_retrieve external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil, @@ -127,13 +128,14 @@ def test_list external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil, @@ -170,13 +172,14 @@ def test_approve external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil, @@ -213,13 +216,14 @@ def test_cancel external_account_id: String | nil, idempotency_key: String | nil, inbound_wire_drawdown_request_id: String | nil, - message_to_recipient: String | nil, + message_to_recipient: String, network: Increase::WireTransfer::Network, originator_address_line1: String | nil, originator_address_line2: String | nil, originator_address_line3: String | nil, originator_name: String | nil, pending_transaction_id: String | nil, + remittance: Increase::WireTransfer::Remittance | nil, reversal: Increase::WireTransfer::Reversal | nil, routing_number: String, source_account_number_id: String | nil,