diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 89bf56eb..64314dc2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.167.0" + ".": "1.168.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index bc6173cc..4bf821de 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 231 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2304a782c25d2a6b9586de2f6e2b536b5abbf62735f9c18ed0551607f134b714.yml -openapi_spec_hash: 67d6de7181215abe88dcc3da557a1e0d -config_hash: 5a0bf28bf735edf93f36c6c808711847 +configured_endpoints: 227 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-60f9bca532c8805735c227730bbb14858faa64bfd5f83a1a78640f0119a3f99c.yml +openapi_spec_hash: 17ddd87efe6c029f2fa660c8781ccfaf +config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/CHANGELOG.md b/CHANGELOG.md index c0c85875..901dc383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.168.0 (2025-12-18) + +Full Changelog: [v1.167.0...v1.168.0](https://github.com/Increase/increase-ruby/compare/v1.167.0...v1.168.0) + +### Features + +* **api:** api update ([f4ce01f](https://github.com/Increase/increase-ruby/commit/f4ce01fb3e3b0c52bf5079921ab01f3979de944f)) + ## 1.167.0 (2025-12-18) Full Changelog: [v1.166.1...v1.167.0](https://github.com/Increase/increase-ruby/compare/v1.166.1...v1.167.0) diff --git a/Gemfile.lock b/Gemfile.lock index cc0de556..f045ad0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.167.0) + increase (1.168.0) connection_pool GEM diff --git a/README.md b/README.md index ed736e80..a6ed81a0 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.167.0" +gem "increase", "~> 1.168.0" ``` diff --git a/lib/increase.rb b/lib/increase.rb index ea74fd30..d4b29f3f 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -158,10 +158,6 @@ require_relative "increase/models/digital_wallet_token" require_relative "increase/models/digital_wallet_token_list_params" require_relative "increase/models/digital_wallet_token_retrieve_params" -require_relative "increase/models/document" -require_relative "increase/models/document_create_params" -require_relative "increase/models/document_list_params" -require_relative "increase/models/document_retrieve_params" require_relative "increase/models/entity" require_relative "increase/models/entity_archive_beneficial_owner_params" require_relative "increase/models/entity_archive_params" @@ -313,7 +309,6 @@ require_relative "increase/models/simulations/check_transfer_mail_params" require_relative "increase/models/simulations/digital_wallet_token_request_create_params" require_relative "increase/models/simulations/digital_wallet_token_request_create_response" -require_relative "increase/models/simulations/document_create_params" require_relative "increase/models/simulations/export_create_params" require_relative "increase/models/simulations/inbound_ach_transfer_create_params" require_relative "increase/models/simulations/inbound_check_deposit_create_params" @@ -369,7 +364,6 @@ require_relative "increase/resources/declined_transactions" require_relative "increase/resources/digital_card_profiles" require_relative "increase/resources/digital_wallet_tokens" -require_relative "increase/resources/documents" require_relative "increase/resources/entities" require_relative "increase/resources/events" require_relative "increase/resources/event_subscriptions" @@ -417,7 +411,6 @@ require_relative "increase/resources/simulations/check_deposits" require_relative "increase/resources/simulations/check_transfers" require_relative "increase/resources/simulations/digital_wallet_token_requests" -require_relative "increase/resources/simulations/documents" require_relative "increase/resources/simulations/exports" require_relative "increase/resources/simulations/inbound_ach_transfers" require_relative "increase/resources/simulations/inbound_check_deposits" diff --git a/lib/increase/client.rb b/lib/increase/client.rb index 200da4e0..2eea37d6 100644 --- a/lib/increase/client.rb +++ b/lib/increase/client.rb @@ -137,9 +137,6 @@ class Client < Increase::Internal::Transport::BaseClient # @return [Increase::Resources::FileLinks] attr_reader :file_links - # @return [Increase::Resources::Documents] - attr_reader :documents - # @return [Increase::Resources::Exports] attr_reader :exports @@ -295,7 +292,6 @@ def initialize( @account_statements = Increase::Resources::AccountStatements.new(client: self) @files = Increase::Resources::Files.new(client: self) @file_links = Increase::Resources::FileLinks.new(client: self) - @documents = Increase::Resources::Documents.new(client: self) @exports = Increase::Resources::Exports.new(client: self) @events = Increase::Resources::Events.new(client: self) @event_subscriptions = Increase::Resources::EventSubscriptions.new(client: self) diff --git a/lib/increase/models.rb b/lib/increase/models.rb index ed60b0b0..3daab376 100644 --- a/lib/increase/models.rb +++ b/lib/increase/models.rb @@ -249,14 +249,6 @@ module Increase DigitalWalletTokenRetrieveParams = Increase::Models::DigitalWalletTokenRetrieveParams - Document = Increase::Models::Document - - DocumentCreateParams = Increase::Models::DocumentCreateParams - - DocumentListParams = Increase::Models::DocumentListParams - - DocumentRetrieveParams = Increase::Models::DocumentRetrieveParams - Entity = Increase::Models::Entity EntityArchiveBeneficialOwnerParams = Increase::Models::EntityArchiveBeneficialOwnerParams diff --git a/lib/increase/models/document.rb b/lib/increase/models/document.rb deleted file mode 100644 index 208b0da8..00000000 --- a/lib/increase/models/document.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - # @see Increase::Resources::Documents#create - class Document < Increase::Internal::Type::BaseModel - # @!attribute id - # The Document identifier. - # - # @return [String] - required :id, String - - # @!attribute account_verification_letter - # Properties of an account verification letter document. - # - # @return [Increase::Models::Document::AccountVerificationLetter, nil] - required :account_verification_letter, -> { Increase::Document::AccountVerificationLetter }, nil?: true - - # @!attribute category - # The type of document. - # - # @return [Symbol, Increase::Models::Document::Category] - required :category, enum: -> { Increase::Document::Category } - - # @!attribute created_at - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the - # Document was created. - # - # @return [Time] - required :created_at, Time - - # @!attribute entity_id - # The identifier of the Entity the document was generated for. - # - # @return [String, nil] - required :entity_id, String, nil?: true - - # @!attribute file_id - # The identifier of the File containing the Document's contents. - # - # @return [String] - required :file_id, String - - # @!attribute funding_instructions - # Properties of a funding instructions document. - # - # @return [Increase::Models::Document::FundingInstructions, nil] - required :funding_instructions, -> { Increase::Document::FundingInstructions }, nil?: true - - # @!attribute idempotency_key - # The idempotency key you chose for this object. This value is unique across - # Increase and is used to ensure that a request is only processed once. Learn more - # about [idempotency](https://increase.com/documentation/idempotency-keys). - # - # @return [String, nil] - required :idempotency_key, String, nil?: true - - # @!attribute type - # A constant representing the object's type. For this resource it will always be - # `document`. - # - # @return [Symbol, Increase::Models::Document::Type] - required :type, enum: -> { Increase::Document::Type } - - # @!method initialize(id:, account_verification_letter:, category:, created_at:, entity_id:, file_id:, funding_instructions:, idempotency_key:, type:) - # Some parameter documentations has been truncated, see - # {Increase::Models::Document} for more details. - # - # Increase generates certain documents / forms automatically for your application; - # they can be listed here. - # - # @param id [String] The Document identifier. - # - # @param account_verification_letter [Increase::Models::Document::AccountVerificationLetter, nil] Properties of an account verification letter document. - # - # @param category [Symbol, Increase::Models::Document::Category] The type of document. - # - # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Documen - # - # @param entity_id [String, nil] The identifier of the Entity the document was generated for. - # - # @param file_id [String] The identifier of the File containing the Document's contents. - # - # @param funding_instructions [Increase::Models::Document::FundingInstructions, nil] Properties of a funding instructions document. - # - # @param idempotency_key [String, nil] The idempotency key you chose for this object. This value is unique across Incre - # - # @param type [Symbol, Increase::Models::Document::Type] A constant representing the object's type. For this resource it will always be ` - - # @see Increase::Models::Document#account_verification_letter - class AccountVerificationLetter < Increase::Internal::Type::BaseModel - # @!attribute account_number_id - # The identifier of the Account Number the document was generated for. - # - # @return [String] - required :account_number_id, String - - # @!method initialize(account_number_id:) - # Properties of an account verification letter document. - # - # @param account_number_id [String] The identifier of the Account Number the document was generated for. - end - - # The type of document. - # - # @see Increase::Models::Document#category - module Category - extend Increase::Internal::Type::Enum - - # Internal Revenue Service Form 1099-INT. - FORM_1099_INT = :form_1099_int - - # Internal Revenue Service Form 1099-MISC. - FORM_1099_MISC = :form_1099_misc - - # A document submitted in response to a proof of authorization request for an ACH transfer. - PROOF_OF_AUTHORIZATION = :proof_of_authorization - - # Company information, such a policies or procedures, typically submitted during our due diligence process. - COMPANY_INFORMATION = :company_information - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER = :account_verification_letter - - # Funding instructions. - FUNDING_INSTRUCTIONS = :funding_instructions - - # @!method self.values - # @return [Array] - end - - # @see Increase::Models::Document#funding_instructions - class FundingInstructions < Increase::Internal::Type::BaseModel - # @!attribute account_number_id - # The identifier of the Account Number the document was generated for. - # - # @return [String] - required :account_number_id, String - - # @!method initialize(account_number_id:) - # Properties of a funding instructions document. - # - # @param account_number_id [String] The identifier of the Account Number the document was generated for. - end - - # A constant representing the object's type. For this resource it will always be - # `document`. - # - # @see Increase::Models::Document#type - module Type - extend Increase::Internal::Type::Enum - - DOCUMENT = :document - - # @!method self.values - # @return [Array] - end - end - end -end diff --git a/lib/increase/models/document_create_params.rb b/lib/increase/models/document_create_params.rb deleted file mode 100644 index 6cf5c68b..00000000 --- a/lib/increase/models/document_create_params.rb +++ /dev/null @@ -1,93 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - # @see Increase::Resources::Documents#create - class DocumentCreateParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - # @!attribute category - # The type of document to create. - # - # @return [Symbol, Increase::Models::DocumentCreateParams::Category] - required :category, enum: -> { Increase::DocumentCreateParams::Category } - - # @!attribute account_verification_letter - # An account verification letter. Required if and only if `category` is - # `account_verification_letter`. - # - # @return [Increase::Models::DocumentCreateParams::AccountVerificationLetter, nil] - optional :account_verification_letter, -> { Increase::DocumentCreateParams::AccountVerificationLetter } - - # @!attribute funding_instructions - # Funding instructions. Required if and only if `category` is - # `funding_instructions`. - # - # @return [Increase::Models::DocumentCreateParams::FundingInstructions, nil] - optional :funding_instructions, -> { Increase::DocumentCreateParams::FundingInstructions } - - # @!method initialize(category:, account_verification_letter: nil, funding_instructions: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {Increase::Models::DocumentCreateParams} for more details. - # - # @param category [Symbol, Increase::Models::DocumentCreateParams::Category] The type of document to create. - # - # @param account_verification_letter [Increase::Models::DocumentCreateParams::AccountVerificationLetter] An account verification letter. Required if and only if `category` is `account_v - # - # @param funding_instructions [Increase::Models::DocumentCreateParams::FundingInstructions] Funding instructions. Required if and only if `category` is `funding_instruction - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] - - # The type of document to create. - module Category - extend Increase::Internal::Type::Enum - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER = :account_verification_letter - - # Funding instructions. - FUNDING_INSTRUCTIONS = :funding_instructions - - # @!method self.values - # @return [Array] - end - - class AccountVerificationLetter < Increase::Internal::Type::BaseModel - # @!attribute account_number_id - # The Account Number the bank letter should be generated for. - # - # @return [String] - required :account_number_id, String - - # @!attribute balance_date - # If provided, the letter will include the Account's balance as of the date. - # - # @return [Date, nil] - optional :balance_date, Date - - # @!method initialize(account_number_id:, balance_date: nil) - # An account verification letter. Required if and only if `category` is - # `account_verification_letter`. - # - # @param account_number_id [String] The Account Number the bank letter should be generated for. - # - # @param balance_date [Date] If provided, the letter will include the Account's balance as of the date. - end - - class FundingInstructions < Increase::Internal::Type::BaseModel - # @!attribute account_number_id - # The Account Number the funding instructions should be generated for. - # - # @return [String] - required :account_number_id, String - - # @!method initialize(account_number_id:) - # Funding instructions. Required if and only if `category` is - # `funding_instructions`. - # - # @param account_number_id [String] The Account Number the funding instructions should be generated for. - end - end - end -end diff --git a/lib/increase/models/document_list_params.rb b/lib/increase/models/document_list_params.rb deleted file mode 100644 index ac5ceec5..00000000 --- a/lib/increase/models/document_list_params.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - # @see Increase::Resources::Documents#list - class DocumentListParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - # @!attribute category - # - # @return [Increase::Models::DocumentListParams::Category, nil] - optional :category, -> { Increase::DocumentListParams::Category } - - # @!attribute created_at - # - # @return [Increase::Models::DocumentListParams::CreatedAt, nil] - optional :created_at, -> { Increase::DocumentListParams::CreatedAt } - - # @!attribute cursor - # Return the page of entries after this one. - # - # @return [String, nil] - optional :cursor, String - - # @!attribute entity_id - # Filter Documents to ones belonging to the specified Entity. - # - # @return [String, nil] - optional :entity_id, String - - # @!attribute idempotency_key - # Filter records to the one with the specified `idempotency_key` you chose for - # that object. This value is unique across Increase and is used to ensure that a - # request is only processed once. Learn more about - # [idempotency](https://increase.com/documentation/idempotency-keys). - # - # @return [String, nil] - optional :idempotency_key, String - - # @!attribute limit - # Limit the size of the list that is returned. The default (and maximum) is 100 - # objects. - # - # @return [Integer, nil] - optional :limit, Integer - - # @!method initialize(category: nil, created_at: nil, cursor: nil, entity_id: nil, idempotency_key: nil, limit: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {Increase::Models::DocumentListParams} for more details. - # - # @param category [Increase::Models::DocumentListParams::Category] - # - # @param created_at [Increase::Models::DocumentListParams::CreatedAt] - # - # @param cursor [String] Return the page of entries after this one. - # - # @param entity_id [String] Filter Documents to ones belonging to the specified Entity. - # - # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha - # - # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] - - class Category < Increase::Internal::Type::BaseModel - # @!attribute in_ - # Filter Documents for those with the specified category or categories. For GET - # requests, this should be encoded as a comma-delimited string, such as - # `?in=one,two,three`. - # - # @return [Array, nil] - optional :in_, - -> { Increase::Internal::Type::ArrayOf[enum: Increase::DocumentListParams::Category::In] }, - api_name: :in - - # @!method initialize(in_: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::DocumentListParams::Category} for more details. - # - # @param in_ [Array] Filter Documents for those with the specified category or categories. For GET re - - module In - extend Increase::Internal::Type::Enum - - # Internal Revenue Service Form 1099-INT. - FORM_1099_INT = :form_1099_int - - # Internal Revenue Service Form 1099-MISC. - FORM_1099_MISC = :form_1099_misc - - # A document submitted in response to a proof of authorization request for an ACH transfer. - PROOF_OF_AUTHORIZATION = :proof_of_authorization - - # Company information, such a policies or procedures, typically submitted during our due diligence process. - COMPANY_INFORMATION = :company_information - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER = :account_verification_letter - - # Funding instructions. - FUNDING_INSTRUCTIONS = :funding_instructions - - # @!method self.values - # @return [Array] - end - end - - class CreatedAt < Increase::Internal::Type::BaseModel - # @!attribute after - # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - # timestamp. - # - # @return [Time, nil] - optional :after, Time - - # @!attribute before - # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - # timestamp. - # - # @return [Time, nil] - optional :before, Time - - # @!attribute on_or_after - # Return results on or after this - # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - # - # @return [Time, nil] - optional :on_or_after, Time - - # @!attribute on_or_before - # Return results on or before this - # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - # - # @return [Time, nil] - optional :on_or_before, Time - - # @!method initialize(after: nil, before: nil, on_or_after: nil, on_or_before: nil) - # Some parameter documentations has been truncated, see - # {Increase::Models::DocumentListParams::CreatedAt} for more details. - # - # @param after [Time] Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) tim - # - # @param before [Time] Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ti - # - # @param on_or_after [Time] Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_860 - # - # @param on_or_before [Time] Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_86 - end - end - end -end diff --git a/lib/increase/models/document_retrieve_params.rb b/lib/increase/models/document_retrieve_params.rb deleted file mode 100644 index 2c21dc0e..00000000 --- a/lib/increase/models/document_retrieve_params.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - # @see Increase::Resources::Documents#retrieve - class DocumentRetrieveParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - # @!method initialize(request_options: {}) - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] - end - end -end diff --git a/lib/increase/models/simulations/document_create_params.rb b/lib/increase/models/simulations/document_create_params.rb deleted file mode 100644 index a72769ae..00000000 --- a/lib/increase/models/simulations/document_create_params.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Models - module Simulations - # @see Increase::Resources::Simulations::Documents#create - class DocumentCreateParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - # @!attribute account_id - # The identifier of the Account the tax document is for. - # - # @return [String] - required :account_id, String - - # @!method initialize(account_id:, request_options: {}) - # @param account_id [String] The identifier of the Account the tax document is for. - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] - end - end - end -end diff --git a/lib/increase/resources/documents.rb b/lib/increase/resources/documents.rb deleted file mode 100644 index 7085de4f..00000000 --- a/lib/increase/resources/documents.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Resources - class Documents - # Some parameter documentations has been truncated, see - # {Increase::Models::DocumentCreateParams} for more details. - # - # Create a Document - # - # @overload create(category:, account_verification_letter: nil, funding_instructions: nil, request_options: {}) - # - # @param category [Symbol, Increase::Models::DocumentCreateParams::Category] The type of document to create. - # - # @param account_verification_letter [Increase::Models::DocumentCreateParams::AccountVerificationLetter] An account verification letter. Required if and only if `category` is `account_v - # - # @param funding_instructions [Increase::Models::DocumentCreateParams::FundingInstructions] Funding instructions. Required if and only if `category` is `funding_instruction - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [Increase::Models::Document] - # - # @see Increase::Models::DocumentCreateParams - def create(params) - parsed, options = Increase::DocumentCreateParams.dump_request(params) - @client.request( - method: :post, - path: "documents", - body: parsed, - model: Increase::Document, - options: options - ) - end - - # Retrieve a Document - # - # @overload retrieve(document_id, request_options: {}) - # - # @param document_id [String] The identifier of the Document to retrieve. - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [Increase::Models::Document] - # - # @see Increase::Models::DocumentRetrieveParams - def retrieve(document_id, params = {}) - @client.request( - method: :get, - path: ["documents/%1$s", document_id], - model: Increase::Document, - options: params[:request_options] - ) - end - - # Some parameter documentations has been truncated, see - # {Increase::Models::DocumentListParams} for more details. - # - # List Documents - # - # @overload list(category: nil, created_at: nil, cursor: nil, entity_id: nil, idempotency_key: nil, limit: nil, request_options: {}) - # - # @param category [Increase::Models::DocumentListParams::Category] - # - # @param created_at [Increase::Models::DocumentListParams::CreatedAt] - # - # @param cursor [String] Return the page of entries after this one. - # - # @param entity_id [String] Filter Documents to ones belonging to the specified Entity. - # - # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha - # - # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [Increase::Internal::Page] - # - # @see Increase::Models::DocumentListParams - def list(params = {}) - parsed, options = Increase::DocumentListParams.dump_request(params) - @client.request( - method: :get, - path: "documents", - query: parsed, - page: Increase::Internal::Page, - model: Increase::Document, - options: options - ) - end - - # @api private - # - # @param client [Increase::Client] - def initialize(client:) - @client = client - end - end - end -end diff --git a/lib/increase/resources/simulations.rb b/lib/increase/resources/simulations.rb index f3b5460a..e82d75da 100644 --- a/lib/increase/resources/simulations.rb +++ b/lib/increase/resources/simulations.rb @@ -90,9 +90,6 @@ class Simulations # @return [Increase::Resources::Simulations::AccountStatements] attr_reader :account_statements - # @return [Increase::Resources::Simulations::Documents] - attr_reader :documents - # @return [Increase::Resources::Simulations::Exports] attr_reader :exports @@ -138,7 +135,6 @@ def initialize(client:) @inbound_mail_items = Increase::Resources::Simulations::InboundMailItems.new(client: client) @programs = Increase::Resources::Simulations::Programs.new(client: client) @account_statements = Increase::Resources::Simulations::AccountStatements.new(client: client) - @documents = Increase::Resources::Simulations::Documents.new(client: client) @exports = Increase::Resources::Simulations::Exports.new(client: client) @card_tokens = Increase::Resources::Simulations::CardTokens.new(client: client) end diff --git a/lib/increase/resources/simulations/documents.rb b/lib/increase/resources/simulations/documents.rb deleted file mode 100644 index 4f4f9d21..00000000 --- a/lib/increase/resources/simulations/documents.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -module Increase - module Resources - class Simulations - class Documents - # Simulates an tax document being created for an account. - # - # @overload create(account_id:, request_options: {}) - # - # @param account_id [String] The identifier of the Account the tax document is for. - # - # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [Increase::Models::Document] - # - # @see Increase::Models::Simulations::DocumentCreateParams - def create(params) - parsed, options = Increase::Simulations::DocumentCreateParams.dump_request(params) - @client.request( - method: :post, - path: "simulations/documents", - body: parsed, - model: Increase::Document, - options: options - ) - end - - # @api private - # - # @param client [Increase::Client] - def initialize(client:) - @client = client - end - end - end - end -end diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 1e14221a..1b80fc23 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.167.0" + VERSION = "1.168.0" end diff --git a/rbi/increase/client.rbi b/rbi/increase/client.rbi index bcad4c48..b283376d 100644 --- a/rbi/increase/client.rbi +++ b/rbi/increase/client.rbi @@ -136,9 +136,6 @@ module Increase sig { returns(Increase::Resources::FileLinks) } attr_reader :file_links - sig { returns(Increase::Resources::Documents) } - attr_reader :documents - sig { returns(Increase::Resources::Exports) } attr_reader :exports diff --git a/rbi/increase/models.rbi b/rbi/increase/models.rbi index d3f08fb1..0ffd8d52 100644 --- a/rbi/increase/models.rbi +++ b/rbi/increase/models.rbi @@ -236,14 +236,6 @@ module Increase DigitalWalletTokenRetrieveParams = Increase::Models::DigitalWalletTokenRetrieveParams - Document = Increase::Models::Document - - DocumentCreateParams = Increase::Models::DocumentCreateParams - - DocumentListParams = Increase::Models::DocumentListParams - - DocumentRetrieveParams = Increase::Models::DocumentRetrieveParams - Entity = Increase::Models::Entity EntityArchiveBeneficialOwnerParams = diff --git a/rbi/increase/models/document.rbi b/rbi/increase/models/document.rbi deleted file mode 100644 index 106efe06..00000000 --- a/rbi/increase/models/document.rbi +++ /dev/null @@ -1,249 +0,0 @@ -# typed: strong - -module Increase - module Models - class Document < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias { T.any(Increase::Document, Increase::Internal::AnyHash) } - - # The Document identifier. - sig { returns(String) } - attr_accessor :id - - # Properties of an account verification letter document. - sig { returns(T.nilable(Increase::Document::AccountVerificationLetter)) } - attr_reader :account_verification_letter - - sig do - params( - account_verification_letter: - T.nilable(Increase::Document::AccountVerificationLetter::OrHash) - ).void - end - attr_writer :account_verification_letter - - # The type of document. - sig { returns(Increase::Document::Category::TaggedSymbol) } - attr_accessor :category - - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the - # Document was created. - sig { returns(Time) } - attr_accessor :created_at - - # The identifier of the Entity the document was generated for. - sig { returns(T.nilable(String)) } - attr_accessor :entity_id - - # The identifier of the File containing the Document's contents. - sig { returns(String) } - attr_accessor :file_id - - # Properties of a funding instructions document. - sig { returns(T.nilable(Increase::Document::FundingInstructions)) } - attr_reader :funding_instructions - - sig do - params( - funding_instructions: - T.nilable(Increase::Document::FundingInstructions::OrHash) - ).void - end - attr_writer :funding_instructions - - # The idempotency key you chose for this object. This value is unique across - # Increase and is used to ensure that a request is only processed once. Learn more - # about [idempotency](https://increase.com/documentation/idempotency-keys). - sig { returns(T.nilable(String)) } - attr_accessor :idempotency_key - - # A constant representing the object's type. For this resource it will always be - # `document`. - sig { returns(Increase::Document::Type::TaggedSymbol) } - attr_accessor :type - - # Increase generates certain documents / forms automatically for your application; - # they can be listed here. - sig do - params( - id: String, - account_verification_letter: - T.nilable(Increase::Document::AccountVerificationLetter::OrHash), - category: Increase::Document::Category::OrSymbol, - created_at: Time, - entity_id: T.nilable(String), - file_id: String, - funding_instructions: - T.nilable(Increase::Document::FundingInstructions::OrHash), - idempotency_key: T.nilable(String), - type: Increase::Document::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The Document identifier. - id:, - # Properties of an account verification letter document. - account_verification_letter:, - # The type of document. - category:, - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the - # Document was created. - created_at:, - # The identifier of the Entity the document was generated for. - entity_id:, - # The identifier of the File containing the Document's contents. - file_id:, - # Properties of a funding instructions document. - funding_instructions:, - # The idempotency key you chose for this object. This value is unique across - # Increase and is used to ensure that a request is only processed once. Learn more - # about [idempotency](https://increase.com/documentation/idempotency-keys). - idempotency_key:, - # A constant representing the object's type. For this resource it will always be - # `document`. - type: - ) - end - - sig do - override.returns( - { - id: String, - account_verification_letter: - T.nilable(Increase::Document::AccountVerificationLetter), - category: Increase::Document::Category::TaggedSymbol, - created_at: Time, - entity_id: T.nilable(String), - file_id: String, - funding_instructions: - T.nilable(Increase::Document::FundingInstructions), - idempotency_key: T.nilable(String), - type: Increase::Document::Type::TaggedSymbol - } - ) - end - def to_hash - end - - class AccountVerificationLetter < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::Document::AccountVerificationLetter, - Increase::Internal::AnyHash - ) - end - - # The identifier of the Account Number the document was generated for. - sig { returns(String) } - attr_accessor :account_number_id - - # Properties of an account verification letter document. - sig { params(account_number_id: String).returns(T.attached_class) } - def self.new( - # The identifier of the Account Number the document was generated for. - account_number_id: - ) - end - - sig { override.returns({ account_number_id: String }) } - def to_hash - end - end - - # The type of document. - module Category - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, Increase::Document::Category) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Internal Revenue Service Form 1099-INT. - FORM_1099_INT = - T.let(:form_1099_int, Increase::Document::Category::TaggedSymbol) - - # Internal Revenue Service Form 1099-MISC. - FORM_1099_MISC = - T.let(:form_1099_misc, Increase::Document::Category::TaggedSymbol) - - # A document submitted in response to a proof of authorization request for an ACH transfer. - PROOF_OF_AUTHORIZATION = - T.let( - :proof_of_authorization, - Increase::Document::Category::TaggedSymbol - ) - - # Company information, such a policies or procedures, typically submitted during our due diligence process. - COMPANY_INFORMATION = - T.let( - :company_information, - Increase::Document::Category::TaggedSymbol - ) - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER = - T.let( - :account_verification_letter, - Increase::Document::Category::TaggedSymbol - ) - - # Funding instructions. - FUNDING_INSTRUCTIONS = - T.let( - :funding_instructions, - Increase::Document::Category::TaggedSymbol - ) - - sig do - override.returns(T::Array[Increase::Document::Category::TaggedSymbol]) - end - def self.values - end - end - - class FundingInstructions < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::Document::FundingInstructions, - Increase::Internal::AnyHash - ) - end - - # The identifier of the Account Number the document was generated for. - sig { returns(String) } - attr_accessor :account_number_id - - # Properties of a funding instructions document. - sig { params(account_number_id: String).returns(T.attached_class) } - def self.new( - # The identifier of the Account Number the document was generated for. - account_number_id: - ) - end - - sig { override.returns({ account_number_id: String }) } - def to_hash - end - end - - # A constant representing the object's type. For this resource it will always be - # `document`. - module Type - extend Increase::Internal::Type::Enum - - TaggedSymbol = T.type_alias { T.all(Symbol, Increase::Document::Type) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - DOCUMENT = T.let(:document, Increase::Document::Type::TaggedSymbol) - - sig do - override.returns(T::Array[Increase::Document::Type::TaggedSymbol]) - end - def self.values - end - end - end - end -end diff --git a/rbi/increase/models/document_create_params.rbi b/rbi/increase/models/document_create_params.rbi deleted file mode 100644 index 47e254d2..00000000 --- a/rbi/increase/models/document_create_params.rbi +++ /dev/null @@ -1,191 +0,0 @@ -# typed: strong - -module Increase - module Models - class DocumentCreateParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any(Increase::DocumentCreateParams, Increase::Internal::AnyHash) - end - - # The type of document to create. - sig { returns(Increase::DocumentCreateParams::Category::OrSymbol) } - attr_accessor :category - - # An account verification letter. Required if and only if `category` is - # `account_verification_letter`. - sig do - returns( - T.nilable(Increase::DocumentCreateParams::AccountVerificationLetter) - ) - end - attr_reader :account_verification_letter - - sig do - params( - account_verification_letter: - Increase::DocumentCreateParams::AccountVerificationLetter::OrHash - ).void - end - attr_writer :account_verification_letter - - # Funding instructions. Required if and only if `category` is - # `funding_instructions`. - sig do - returns(T.nilable(Increase::DocumentCreateParams::FundingInstructions)) - end - attr_reader :funding_instructions - - sig do - params( - funding_instructions: - Increase::DocumentCreateParams::FundingInstructions::OrHash - ).void - end - attr_writer :funding_instructions - - sig do - params( - category: Increase::DocumentCreateParams::Category::OrSymbol, - account_verification_letter: - Increase::DocumentCreateParams::AccountVerificationLetter::OrHash, - funding_instructions: - Increase::DocumentCreateParams::FundingInstructions::OrHash, - request_options: Increase::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - # The type of document to create. - category:, - # An account verification letter. Required if and only if `category` is - # `account_verification_letter`. - account_verification_letter: nil, - # Funding instructions. Required if and only if `category` is - # `funding_instructions`. - funding_instructions: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - category: Increase::DocumentCreateParams::Category::OrSymbol, - account_verification_letter: - Increase::DocumentCreateParams::AccountVerificationLetter, - funding_instructions: - Increase::DocumentCreateParams::FundingInstructions, - request_options: Increase::RequestOptions - } - ) - end - def to_hash - end - - # The type of document to create. - module Category - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Increase::DocumentCreateParams::Category) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER = - T.let( - :account_verification_letter, - Increase::DocumentCreateParams::Category::TaggedSymbol - ) - - # Funding instructions. - FUNDING_INSTRUCTIONS = - T.let( - :funding_instructions, - Increase::DocumentCreateParams::Category::TaggedSymbol - ) - - sig do - override.returns( - T::Array[Increase::DocumentCreateParams::Category::TaggedSymbol] - ) - end - def self.values - end - end - - class AccountVerificationLetter < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::DocumentCreateParams::AccountVerificationLetter, - Increase::Internal::AnyHash - ) - end - - # The Account Number the bank letter should be generated for. - sig { returns(String) } - attr_accessor :account_number_id - - # If provided, the letter will include the Account's balance as of the date. - sig { returns(T.nilable(Date)) } - attr_reader :balance_date - - sig { params(balance_date: Date).void } - attr_writer :balance_date - - # An account verification letter. Required if and only if `category` is - # `account_verification_letter`. - sig do - params(account_number_id: String, balance_date: Date).returns( - T.attached_class - ) - end - def self.new( - # The Account Number the bank letter should be generated for. - account_number_id:, - # If provided, the letter will include the Account's balance as of the date. - balance_date: nil - ) - end - - sig do - override.returns({ account_number_id: String, balance_date: Date }) - end - def to_hash - end - end - - class FundingInstructions < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::DocumentCreateParams::FundingInstructions, - Increase::Internal::AnyHash - ) - end - - # The Account Number the funding instructions should be generated for. - sig { returns(String) } - attr_accessor :account_number_id - - # Funding instructions. Required if and only if `category` is - # `funding_instructions`. - sig { params(account_number_id: String).returns(T.attached_class) } - def self.new( - # The Account Number the funding instructions should be generated for. - account_number_id: - ) - end - - sig { override.returns({ account_number_id: String }) } - def to_hash - end - end - end - end -end diff --git a/rbi/increase/models/document_list_params.rbi b/rbi/increase/models/document_list_params.rbi deleted file mode 100644 index 652bc94b..00000000 --- a/rbi/increase/models/document_list_params.rbi +++ /dev/null @@ -1,296 +0,0 @@ -# typed: strong - -module Increase - module Models - class DocumentListParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any(Increase::DocumentListParams, Increase::Internal::AnyHash) - end - - sig { returns(T.nilable(Increase::DocumentListParams::Category)) } - attr_reader :category - - sig do - params(category: Increase::DocumentListParams::Category::OrHash).void - end - attr_writer :category - - sig { returns(T.nilable(Increase::DocumentListParams::CreatedAt)) } - attr_reader :created_at - - sig do - params(created_at: Increase::DocumentListParams::CreatedAt::OrHash).void - end - attr_writer :created_at - - # Return the page of entries after this one. - sig { returns(T.nilable(String)) } - attr_reader :cursor - - sig { params(cursor: String).void } - attr_writer :cursor - - # Filter Documents to ones belonging to the specified Entity. - sig { returns(T.nilable(String)) } - attr_reader :entity_id - - sig { params(entity_id: String).void } - attr_writer :entity_id - - # Filter records to the one with the specified `idempotency_key` you chose for - # that object. This value is unique across Increase and is used to ensure that a - # request is only processed once. Learn more about - # [idempotency](https://increase.com/documentation/idempotency-keys). - sig { returns(T.nilable(String)) } - attr_reader :idempotency_key - - sig { params(idempotency_key: String).void } - attr_writer :idempotency_key - - # Limit the size of the list that is returned. The default (and maximum) is 100 - # objects. - sig { returns(T.nilable(Integer)) } - attr_reader :limit - - sig { params(limit: Integer).void } - attr_writer :limit - - sig do - params( - category: Increase::DocumentListParams::Category::OrHash, - created_at: Increase::DocumentListParams::CreatedAt::OrHash, - cursor: String, - entity_id: String, - idempotency_key: String, - limit: Integer, - request_options: Increase::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - category: nil, - created_at: nil, - # Return the page of entries after this one. - cursor: nil, - # Filter Documents to ones belonging to the specified Entity. - entity_id: nil, - # Filter records to the one with the specified `idempotency_key` you chose for - # that object. This value is unique across Increase and is used to ensure that a - # request is only processed once. Learn more about - # [idempotency](https://increase.com/documentation/idempotency-keys). - idempotency_key: nil, - # Limit the size of the list that is returned. The default (and maximum) is 100 - # objects. - limit: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - category: Increase::DocumentListParams::Category, - created_at: Increase::DocumentListParams::CreatedAt, - cursor: String, - entity_id: String, - idempotency_key: String, - limit: Integer, - request_options: Increase::RequestOptions - } - ) - end - def to_hash - end - - class Category < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::DocumentListParams::Category, - Increase::Internal::AnyHash - ) - end - - # Filter Documents for those with the specified category or categories. For GET - # requests, this should be encoded as a comma-delimited string, such as - # `?in=one,two,three`. - sig do - returns( - T.nilable( - T::Array[Increase::DocumentListParams::Category::In::OrSymbol] - ) - ) - end - attr_reader :in_ - - sig do - params( - in_: T::Array[Increase::DocumentListParams::Category::In::OrSymbol] - ).void - end - attr_writer :in_ - - sig do - params( - in_: T::Array[Increase::DocumentListParams::Category::In::OrSymbol] - ).returns(T.attached_class) - end - def self.new( - # Filter Documents for those with the specified category or categories. For GET - # requests, this should be encoded as a comma-delimited string, such as - # `?in=one,two,three`. - in_: nil - ) - end - - sig do - override.returns( - { - in_: - T::Array[Increase::DocumentListParams::Category::In::OrSymbol] - } - ) - end - def to_hash - end - - module In - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, Increase::DocumentListParams::Category::In) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Internal Revenue Service Form 1099-INT. - FORM_1099_INT = - T.let( - :form_1099_int, - Increase::DocumentListParams::Category::In::TaggedSymbol - ) - - # Internal Revenue Service Form 1099-MISC. - FORM_1099_MISC = - T.let( - :form_1099_misc, - Increase::DocumentListParams::Category::In::TaggedSymbol - ) - - # A document submitted in response to a proof of authorization request for an ACH transfer. - PROOF_OF_AUTHORIZATION = - T.let( - :proof_of_authorization, - Increase::DocumentListParams::Category::In::TaggedSymbol - ) - - # Company information, such a policies or procedures, typically submitted during our due diligence process. - COMPANY_INFORMATION = - T.let( - :company_information, - Increase::DocumentListParams::Category::In::TaggedSymbol - ) - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER = - T.let( - :account_verification_letter, - Increase::DocumentListParams::Category::In::TaggedSymbol - ) - - # Funding instructions. - FUNDING_INSTRUCTIONS = - T.let( - :funding_instructions, - Increase::DocumentListParams::Category::In::TaggedSymbol - ) - - sig do - override.returns( - T::Array[Increase::DocumentListParams::Category::In::TaggedSymbol] - ) - end - def self.values - end - end - end - - class CreatedAt < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::DocumentListParams::CreatedAt, - Increase::Internal::AnyHash - ) - end - - # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - # timestamp. - sig { returns(T.nilable(Time)) } - attr_reader :after - - sig { params(after: Time).void } - attr_writer :after - - # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - # timestamp. - sig { returns(T.nilable(Time)) } - attr_reader :before - - sig { params(before: Time).void } - attr_writer :before - - # Return results on or after this - # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - sig { returns(T.nilable(Time)) } - attr_reader :on_or_after - - sig { params(on_or_after: Time).void } - attr_writer :on_or_after - - # Return results on or before this - # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - sig { returns(T.nilable(Time)) } - attr_reader :on_or_before - - sig { params(on_or_before: Time).void } - attr_writer :on_or_before - - sig do - params( - after: Time, - before: Time, - on_or_after: Time, - on_or_before: Time - ).returns(T.attached_class) - end - def self.new( - # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - # timestamp. - after: nil, - # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - # timestamp. - before: nil, - # Return results on or after this - # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - on_or_after: nil, - # Return results on or before this - # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - on_or_before: nil - ) - end - - sig do - override.returns( - { after: Time, before: Time, on_or_after: Time, on_or_before: Time } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/increase/models/document_retrieve_params.rbi b/rbi/increase/models/document_retrieve_params.rbi deleted file mode 100644 index 690e24b0..00000000 --- a/rbi/increase/models/document_retrieve_params.rbi +++ /dev/null @@ -1,27 +0,0 @@ -# typed: strong - -module Increase - module Models - class DocumentRetrieveParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any(Increase::DocumentRetrieveParams, Increase::Internal::AnyHash) - end - - sig do - params(request_options: Increase::RequestOptions::OrHash).returns( - T.attached_class - ) - end - def self.new(request_options: {}) - end - - sig { override.returns({ request_options: Increase::RequestOptions }) } - def to_hash - end - end - end -end diff --git a/rbi/increase/models/simulations/document_create_params.rbi b/rbi/increase/models/simulations/document_create_params.rbi deleted file mode 100644 index e8e4cdb8..00000000 --- a/rbi/increase/models/simulations/document_create_params.rbi +++ /dev/null @@ -1,45 +0,0 @@ -# typed: strong - -module Increase - module Models - module Simulations - class DocumentCreateParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - Increase::Simulations::DocumentCreateParams, - Increase::Internal::AnyHash - ) - end - - # The identifier of the Account the tax document is for. - sig { returns(String) } - attr_accessor :account_id - - sig do - params( - account_id: String, - request_options: Increase::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - # The identifier of the Account the tax document is for. - account_id:, - request_options: {} - ) - end - - sig do - override.returns( - { account_id: String, request_options: Increase::RequestOptions } - ) - end - def to_hash - end - end - end - end -end diff --git a/rbi/increase/resources/documents.rbi b/rbi/increase/resources/documents.rbi deleted file mode 100644 index 3fe02254..00000000 --- a/rbi/increase/resources/documents.rbi +++ /dev/null @@ -1,81 +0,0 @@ -# typed: strong - -module Increase - module Resources - class Documents - # Create a Document - sig do - params( - category: Increase::DocumentCreateParams::Category::OrSymbol, - account_verification_letter: - Increase::DocumentCreateParams::AccountVerificationLetter::OrHash, - funding_instructions: - Increase::DocumentCreateParams::FundingInstructions::OrHash, - request_options: Increase::RequestOptions::OrHash - ).returns(Increase::Document) - end - def create( - # The type of document to create. - category:, - # An account verification letter. Required if and only if `category` is - # `account_verification_letter`. - account_verification_letter: nil, - # Funding instructions. Required if and only if `category` is - # `funding_instructions`. - funding_instructions: nil, - request_options: {} - ) - end - - # Retrieve a Document - sig do - params( - document_id: String, - request_options: Increase::RequestOptions::OrHash - ).returns(Increase::Document) - end - def retrieve( - # The identifier of the Document to retrieve. - document_id, - request_options: {} - ) - end - - # List Documents - sig do - params( - category: Increase::DocumentListParams::Category::OrHash, - created_at: Increase::DocumentListParams::CreatedAt::OrHash, - cursor: String, - entity_id: String, - idempotency_key: String, - limit: Integer, - request_options: Increase::RequestOptions::OrHash - ).returns(Increase::Internal::Page[Increase::Document]) - end - def list( - category: nil, - created_at: nil, - # Return the page of entries after this one. - cursor: nil, - # Filter Documents to ones belonging to the specified Entity. - entity_id: nil, - # Filter records to the one with the specified `idempotency_key` you chose for - # that object. This value is unique across Increase and is used to ensure that a - # request is only processed once. Learn more about - # [idempotency](https://increase.com/documentation/idempotency-keys). - idempotency_key: nil, - # Limit the size of the list that is returned. The default (and maximum) is 100 - # objects. - limit: nil, - request_options: {} - ) - end - - # @api private - sig { params(client: Increase::Client).returns(T.attached_class) } - def self.new(client:) - end - end - end -end diff --git a/rbi/increase/resources/simulations.rbi b/rbi/increase/resources/simulations.rbi index 6650b46c..512a316b 100644 --- a/rbi/increase/resources/simulations.rbi +++ b/rbi/increase/resources/simulations.rbi @@ -102,9 +102,6 @@ module Increase sig { returns(Increase::Resources::Simulations::AccountStatements) } attr_reader :account_statements - sig { returns(Increase::Resources::Simulations::Documents) } - attr_reader :documents - sig { returns(Increase::Resources::Simulations::Exports) } attr_reader :exports diff --git a/rbi/increase/resources/simulations/documents.rbi b/rbi/increase/resources/simulations/documents.rbi deleted file mode 100644 index 2293e6ee..00000000 --- a/rbi/increase/resources/simulations/documents.rbi +++ /dev/null @@ -1,28 +0,0 @@ -# typed: strong - -module Increase - module Resources - class Simulations - class Documents - # Simulates an tax document being created for an account. - sig do - params( - account_id: String, - request_options: Increase::RequestOptions::OrHash - ).returns(Increase::Document) - end - def create( - # The identifier of the Account the tax document is for. - account_id:, - request_options: {} - ) - end - - # @api private - sig { params(client: Increase::Client).returns(T.attached_class) } - def self.new(client:) - end - end - end - end -end diff --git a/sig/increase/client.rbs b/sig/increase/client.rbs index ebf9ec2d..39316192 100644 --- a/sig/increase/client.rbs +++ b/sig/increase/client.rbs @@ -91,8 +91,6 @@ module Increase attr_reader file_links: Increase::Resources::FileLinks - attr_reader documents: Increase::Resources::Documents - attr_reader exports: Increase::Resources::Exports attr_reader events: Increase::Resources::Events diff --git a/sig/increase/models.rbs b/sig/increase/models.rbs index e3c1204e..7b0f5d3d 100644 --- a/sig/increase/models.rbs +++ b/sig/increase/models.rbs @@ -209,14 +209,6 @@ module Increase class DigitalWalletTokenRetrieveParams = Increase::Models::DigitalWalletTokenRetrieveParams - class Document = Increase::Models::Document - - class DocumentCreateParams = Increase::Models::DocumentCreateParams - - class DocumentListParams = Increase::Models::DocumentListParams - - class DocumentRetrieveParams = Increase::Models::DocumentRetrieveParams - class Entity = Increase::Models::Entity class EntityArchiveBeneficialOwnerParams = Increase::Models::EntityArchiveBeneficialOwnerParams diff --git a/sig/increase/models/document.rbs b/sig/increase/models/document.rbs deleted file mode 100644 index e20981d8..00000000 --- a/sig/increase/models/document.rbs +++ /dev/null @@ -1,122 +0,0 @@ -module Increase - module Models - type document = - { - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter?, - category: Increase::Models::Document::category, - created_at: Time, - entity_id: String?, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions?, - idempotency_key: String?, - type: Increase::Models::Document::type_ - } - - class Document < Increase::Internal::Type::BaseModel - attr_accessor id: String - - attr_accessor account_verification_letter: Increase::Document::AccountVerificationLetter? - - attr_accessor category: Increase::Models::Document::category - - attr_accessor created_at: Time - - attr_accessor entity_id: String? - - attr_accessor file_id: String - - attr_accessor funding_instructions: Increase::Document::FundingInstructions? - - attr_accessor idempotency_key: String? - - attr_accessor type: Increase::Models::Document::type_ - - def initialize: ( - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter?, - category: Increase::Models::Document::category, - created_at: Time, - entity_id: String?, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions?, - idempotency_key: String?, - type: Increase::Models::Document::type_ - ) -> void - - def to_hash: -> { - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter?, - category: Increase::Models::Document::category, - created_at: Time, - entity_id: String?, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions?, - idempotency_key: String?, - type: Increase::Models::Document::type_ - } - - type account_verification_letter = { account_number_id: String } - - class AccountVerificationLetter < Increase::Internal::Type::BaseModel - attr_accessor account_number_id: String - - def initialize: (account_number_id: String) -> void - - def to_hash: -> { account_number_id: String } - end - - type category = - :form_1099_int - | :form_1099_misc - | :proof_of_authorization - | :company_information - | :account_verification_letter - | :funding_instructions - - module Category - extend Increase::Internal::Type::Enum - - # Internal Revenue Service Form 1099-INT. - FORM_1099_INT: :form_1099_int - - # Internal Revenue Service Form 1099-MISC. - FORM_1099_MISC: :form_1099_misc - - # A document submitted in response to a proof of authorization request for an ACH transfer. - PROOF_OF_AUTHORIZATION: :proof_of_authorization - - # Company information, such a policies or procedures, typically submitted during our due diligence process. - COMPANY_INFORMATION: :company_information - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER: :account_verification_letter - - # Funding instructions. - FUNDING_INSTRUCTIONS: :funding_instructions - - def self?.values: -> ::Array[Increase::Models::Document::category] - end - - type funding_instructions = { account_number_id: String } - - class FundingInstructions < Increase::Internal::Type::BaseModel - attr_accessor account_number_id: String - - def initialize: (account_number_id: String) -> void - - def to_hash: -> { account_number_id: String } - end - - type type_ = :document - - module Type - extend Increase::Internal::Type::Enum - - DOCUMENT: :document - - def self?.values: -> ::Array[Increase::Models::Document::type_] - end - end - end -end diff --git a/sig/increase/models/document_create_params.rbs b/sig/increase/models/document_create_params.rbs deleted file mode 100644 index f3761ea1..00000000 --- a/sig/increase/models/document_create_params.rbs +++ /dev/null @@ -1,83 +0,0 @@ -module Increase - module Models - type document_create_params = - { - category: Increase::Models::DocumentCreateParams::category, - account_verification_letter: Increase::DocumentCreateParams::AccountVerificationLetter, - funding_instructions: Increase::DocumentCreateParams::FundingInstructions - } - & Increase::Internal::Type::request_parameters - - class DocumentCreateParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - attr_accessor category: Increase::Models::DocumentCreateParams::category - - attr_reader account_verification_letter: Increase::DocumentCreateParams::AccountVerificationLetter? - - def account_verification_letter=: ( - Increase::DocumentCreateParams::AccountVerificationLetter - ) -> Increase::DocumentCreateParams::AccountVerificationLetter - - attr_reader funding_instructions: Increase::DocumentCreateParams::FundingInstructions? - - def funding_instructions=: ( - Increase::DocumentCreateParams::FundingInstructions - ) -> Increase::DocumentCreateParams::FundingInstructions - - def initialize: ( - category: Increase::Models::DocumentCreateParams::category, - ?account_verification_letter: Increase::DocumentCreateParams::AccountVerificationLetter, - ?funding_instructions: Increase::DocumentCreateParams::FundingInstructions, - ?request_options: Increase::request_opts - ) -> void - - def to_hash: -> { - category: Increase::Models::DocumentCreateParams::category, - account_verification_letter: Increase::DocumentCreateParams::AccountVerificationLetter, - funding_instructions: Increase::DocumentCreateParams::FundingInstructions, - request_options: Increase::RequestOptions - } - - type category = :account_verification_letter | :funding_instructions - - module Category - extend Increase::Internal::Type::Enum - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER: :account_verification_letter - - # Funding instructions. - FUNDING_INSTRUCTIONS: :funding_instructions - - def self?.values: -> ::Array[Increase::Models::DocumentCreateParams::category] - end - - type account_verification_letter = - { account_number_id: String, balance_date: Date } - - class AccountVerificationLetter < Increase::Internal::Type::BaseModel - attr_accessor account_number_id: String - - attr_reader balance_date: Date? - - def balance_date=: (Date) -> Date - - def initialize: (account_number_id: String, ?balance_date: Date) -> void - - def to_hash: -> { account_number_id: String, balance_date: Date } - end - - type funding_instructions = { account_number_id: String } - - class FundingInstructions < Increase::Internal::Type::BaseModel - attr_accessor account_number_id: String - - def initialize: (account_number_id: String) -> void - - def to_hash: -> { account_number_id: String } - end - end - end -end diff --git a/sig/increase/models/document_list_params.rbs b/sig/increase/models/document_list_params.rbs deleted file mode 100644 index a25e3928..00000000 --- a/sig/increase/models/document_list_params.rbs +++ /dev/null @@ -1,153 +0,0 @@ -module Increase - module Models - type document_list_params = - { - category: Increase::DocumentListParams::Category, - created_at: Increase::DocumentListParams::CreatedAt, - cursor: String, - entity_id: String, - idempotency_key: String, - limit: Integer - } - & Increase::Internal::Type::request_parameters - - class DocumentListParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - attr_reader category: Increase::DocumentListParams::Category? - - def category=: ( - Increase::DocumentListParams::Category - ) -> Increase::DocumentListParams::Category - - attr_reader created_at: Increase::DocumentListParams::CreatedAt? - - def created_at=: ( - Increase::DocumentListParams::CreatedAt - ) -> Increase::DocumentListParams::CreatedAt - - attr_reader cursor: String? - - def cursor=: (String) -> String - - attr_reader entity_id: String? - - def entity_id=: (String) -> String - - attr_reader idempotency_key: String? - - def idempotency_key=: (String) -> String - - attr_reader limit: Integer? - - def limit=: (Integer) -> Integer - - def initialize: ( - ?category: Increase::DocumentListParams::Category, - ?created_at: Increase::DocumentListParams::CreatedAt, - ?cursor: String, - ?entity_id: String, - ?idempotency_key: String, - ?limit: Integer, - ?request_options: Increase::request_opts - ) -> void - - def to_hash: -> { - category: Increase::DocumentListParams::Category, - created_at: Increase::DocumentListParams::CreatedAt, - cursor: String, - entity_id: String, - idempotency_key: String, - limit: Integer, - request_options: Increase::RequestOptions - } - - type category = - { in_: ::Array[Increase::Models::DocumentListParams::Category::in_] } - - class Category < Increase::Internal::Type::BaseModel - attr_reader in_: ::Array[Increase::Models::DocumentListParams::Category::in_]? - - def in_=: ( - ::Array[Increase::Models::DocumentListParams::Category::in_] - ) -> ::Array[Increase::Models::DocumentListParams::Category::in_] - - def initialize: ( - ?in_: ::Array[Increase::Models::DocumentListParams::Category::in_] - ) -> void - - def to_hash: -> { - in_: ::Array[Increase::Models::DocumentListParams::Category::in_] - } - - type in_ = - :form_1099_int - | :form_1099_misc - | :proof_of_authorization - | :company_information - | :account_verification_letter - | :funding_instructions - - module In - extend Increase::Internal::Type::Enum - - # Internal Revenue Service Form 1099-INT. - FORM_1099_INT: :form_1099_int - - # Internal Revenue Service Form 1099-MISC. - FORM_1099_MISC: :form_1099_misc - - # A document submitted in response to a proof of authorization request for an ACH transfer. - PROOF_OF_AUTHORIZATION: :proof_of_authorization - - # Company information, such a policies or procedures, typically submitted during our due diligence process. - COMPANY_INFORMATION: :company_information - - # An account verification letter. - ACCOUNT_VERIFICATION_LETTER: :account_verification_letter - - # Funding instructions. - FUNDING_INSTRUCTIONS: :funding_instructions - - def self?.values: -> ::Array[Increase::Models::DocumentListParams::Category::in_] - end - end - - type created_at = - { after: Time, before: Time, on_or_after: Time, on_or_before: Time } - - class CreatedAt < Increase::Internal::Type::BaseModel - attr_reader after: Time? - - def after=: (Time) -> Time - - attr_reader before: Time? - - def before=: (Time) -> Time - - attr_reader on_or_after: Time? - - def on_or_after=: (Time) -> Time - - attr_reader on_or_before: Time? - - def on_or_before=: (Time) -> Time - - def initialize: ( - ?after: Time, - ?before: Time, - ?on_or_after: Time, - ?on_or_before: Time - ) -> void - - def to_hash: -> { - after: Time, - before: Time, - on_or_after: Time, - on_or_before: Time - } - end - end - end -end diff --git a/sig/increase/models/document_retrieve_params.rbs b/sig/increase/models/document_retrieve_params.rbs deleted file mode 100644 index 3b32b940..00000000 --- a/sig/increase/models/document_retrieve_params.rbs +++ /dev/null @@ -1,15 +0,0 @@ -module Increase - module Models - type document_retrieve_params = - { } & Increase::Internal::Type::request_parameters - - class DocumentRetrieveParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - def initialize: (?request_options: Increase::request_opts) -> void - - def to_hash: -> { request_options: Increase::RequestOptions } - end - end -end diff --git a/sig/increase/models/simulations/document_create_params.rbs b/sig/increase/models/simulations/document_create_params.rbs deleted file mode 100644 index f99eff6c..00000000 --- a/sig/increase/models/simulations/document_create_params.rbs +++ /dev/null @@ -1,25 +0,0 @@ -module Increase - module Models - module Simulations - type document_create_params = - { account_id: String } & Increase::Internal::Type::request_parameters - - class DocumentCreateParams < Increase::Internal::Type::BaseModel - extend Increase::Internal::Type::RequestParameters::Converter - include Increase::Internal::Type::RequestParameters - - attr_accessor account_id: String - - def initialize: ( - account_id: String, - ?request_options: Increase::request_opts - ) -> void - - def to_hash: -> { - account_id: String, - request_options: Increase::RequestOptions - } - end - end - end -end diff --git a/sig/increase/resources/documents.rbs b/sig/increase/resources/documents.rbs deleted file mode 100644 index 487696f9..00000000 --- a/sig/increase/resources/documents.rbs +++ /dev/null @@ -1,29 +0,0 @@ -module Increase - module Resources - class Documents - def create: ( - category: Increase::Models::DocumentCreateParams::category, - ?account_verification_letter: Increase::DocumentCreateParams::AccountVerificationLetter, - ?funding_instructions: Increase::DocumentCreateParams::FundingInstructions, - ?request_options: Increase::request_opts - ) -> Increase::Document - - def retrieve: ( - String document_id, - ?request_options: Increase::request_opts - ) -> Increase::Document - - def list: ( - ?category: Increase::DocumentListParams::Category, - ?created_at: Increase::DocumentListParams::CreatedAt, - ?cursor: String, - ?entity_id: String, - ?idempotency_key: String, - ?limit: Integer, - ?request_options: Increase::request_opts - ) -> Increase::Internal::Page[Increase::Document] - - def initialize: (client: Increase::Client) -> void - end - end -end diff --git a/sig/increase/resources/simulations.rbs b/sig/increase/resources/simulations.rbs index bc7ba023..a0d122f0 100644 --- a/sig/increase/resources/simulations.rbs +++ b/sig/increase/resources/simulations.rbs @@ -59,8 +59,6 @@ module Increase attr_reader account_statements: Increase::Resources::Simulations::AccountStatements - attr_reader documents: Increase::Resources::Simulations::Documents - attr_reader exports: Increase::Resources::Simulations::Exports attr_reader card_tokens: Increase::Resources::Simulations::CardTokens diff --git a/sig/increase/resources/simulations/documents.rbs b/sig/increase/resources/simulations/documents.rbs deleted file mode 100644 index 644d816c..00000000 --- a/sig/increase/resources/simulations/documents.rbs +++ /dev/null @@ -1,14 +0,0 @@ -module Increase - module Resources - class Simulations - class Documents - def create: ( - account_id: String, - ?request_options: Increase::request_opts - ) -> Increase::Document - - def initialize: (client: Increase::Client) -> void - end - end - end -end diff --git a/test/increase/resources/documents_test.rb b/test/increase/resources/documents_test.rb deleted file mode 100644 index 95cfc33e..00000000 --- a/test/increase/resources/documents_test.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -require_relative "../test_helper" - -class Increase::Test::Resources::DocumentsTest < Increase::Test::ResourceTest - def test_create_required_params - response = @increase.documents.create(category: :account_verification_letter) - - assert_pattern do - response => Increase::Document - end - - assert_pattern do - response => { - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter | nil, - category: Increase::Document::Category, - created_at: Time, - entity_id: String | nil, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions | nil, - idempotency_key: String | nil, - type: Increase::Document::Type - } - end - end - - def test_retrieve - response = @increase.documents.retrieve("document_qjtqc6s4c14ve2q89izm") - - assert_pattern do - response => Increase::Document - end - - assert_pattern do - response => { - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter | nil, - category: Increase::Document::Category, - created_at: Time, - entity_id: String | nil, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions | nil, - idempotency_key: String | nil, - type: Increase::Document::Type - } - end - end - - def test_list - response = @increase.documents.list - - assert_pattern do - response => Increase::Internal::Page - end - - row = response.to_enum.first - return if row.nil? - - assert_pattern do - row => Increase::Document - end - - assert_pattern do - row => { - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter | nil, - category: Increase::Document::Category, - created_at: Time, - entity_id: String | nil, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions | nil, - idempotency_key: String | nil, - type: Increase::Document::Type - } - end - end -end diff --git a/test/increase/resources/simulations/documents_test.rb b/test/increase/resources/simulations/documents_test.rb deleted file mode 100644 index 4cacdb40..00000000 --- a/test/increase/resources/simulations/documents_test.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -require_relative "../../test_helper" - -class Increase::Test::Resources::Simulations::DocumentsTest < Increase::Test::ResourceTest - def test_create_required_params - response = @increase.simulations.documents.create(account_id: "account_in71c4amph0vgo2qllky") - - assert_pattern do - response => Increase::Document - end - - assert_pattern do - response => { - id: String, - account_verification_letter: Increase::Document::AccountVerificationLetter | nil, - category: Increase::Document::Category, - created_at: Time, - entity_id: String | nil, - file_id: String, - funding_instructions: Increase::Document::FundingInstructions | nil, - idempotency_key: String | nil, - type: Increase::Document::Type - } - end - end -end