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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.29"
".": "0.1.0-alpha.30"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 196
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-18c5248f747fed10c6251e99ce19ff8baf99aba8a660b97f3b2f0c956c3b68eb.yml
openapi_spec_hash: fee11521b46e6468507255ffead78f8e
config_hash: c4ca49f6bac6268578b0734a33a9d1fd
configured_endpoints: 197
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b9a610bb578b82c46d4222f4746d69c8e422f9cfad51a6d72d44c64f8746d709.yml
openapi_spec_hash: a63cc36300445b0201442108b6cc8530
config_hash: 85850cd9055db4b9e43bcc4aa1a2dcea
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.1.0-alpha.30 (2025-06-03)

Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)

### Features

* **api:** api update ([bb7f9d3](https://github.com/Increase/increase-ruby/commit/bb7f9d31c20555ba9391376680a6efdbb667e81d))
* **api:** api update ([6211a95](https://github.com/Increase/increase-ruby/commit/6211a959e8612d7974fcdbc0076f068bc1a90025))
* **api:** api update ([39d9b4c](https://github.com/Increase/increase-ruby/commit/39d9b4c8731658a5568bb974cd9334f07c83bb4f))
* **api:** api update ([4f9aad6](https://github.com/Increase/increase-ruby/commit/4f9aad6968a09f1549b32d98d19dddced537403f))


### Bug Fixes

* `to_sorbet_type` should not return branded types ([4dd5dff](https://github.com/Increase/increase-ruby/commit/4dd5dffdb9d333152cb5d759c763f4b0cfd15afd))

## 0.1.0-alpha.29 (2025-05-28)

Full Changelog: [v0.1.0-alpha.28...v0.1.0-alpha.29](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.28...v0.1.0-alpha.29)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
increase (0.1.0.pre.alpha.29)
increase (0.1.0.pre.alpha.30)
connection_pool

GEM
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "increase", "~> 0.1.0.pre.alpha.29"
gem "increase", "~> 0.1.0.pre.alpha.30"
```

<!-- x-release-please-end -->
Expand Down
1 change: 1 addition & 0 deletions lib/increase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
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"
Expand Down
9 changes: 6 additions & 3 deletions lib/increase/internal/type/enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ def coerce(value, state:)
#
# @return [Object]
def to_sorbet_type
case values
types = values.map { Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
case types
in []
T.noreturn
in [value, *_]
T.all(Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
in [type]
type
else
T.any(*types)
end
end

Expand Down
7 changes: 5 additions & 2 deletions lib/increase/internal/type/union.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,14 @@ def dump(value, state:)
#
# @return [Object]
def to_sorbet_type
case (v = variants)
types = variants.map { Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
case types
in []
T.noreturn
in [type]
type
else
T.any(*v.map { Increase::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
T.any(*types)
end
end

Expand Down
10 changes: 6 additions & 4 deletions lib/increase/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ module Increase
mod.constants.each do |name|
case mod.const_get(name)
in true | false
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
in Integer
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
in Float
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
in Symbol
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
else
end
Expand Down Expand Up @@ -211,6 +211,8 @@ module Increase

Document = Increase::Models::Document

DocumentCreateParams = Increase::Models::DocumentCreateParams

DocumentListParams = Increase::Models::DocumentListParams

DocumentRetrieveParams = Increase::Models::DocumentRetrieveParams
Expand Down
39 changes: 37 additions & 2 deletions lib/increase/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

module Increase
module Models
# @see Increase::Resources::Documents#retrieve
# @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.
#
Expand All @@ -35,14 +41,22 @@ class Document < Increase::Internal::Type::BaseModel
# @return [String]
required :file_id, String

# @!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:, category:, created_at:, entity_id:, file_id:, type:)
# @!method initialize(id:, account_verification_letter:, category:, created_at:, entity_id:, file_id:, idempotency_key:, type:)
# Some parameter documentations has been truncated, see
# {Increase::Models::Document} for more details.
#
Expand All @@ -51,6 +65,8 @@ class Document < Increase::Internal::Type::BaseModel
#
# @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
Expand All @@ -59,8 +75,24 @@ class Document < Increase::Internal::Type::BaseModel
#
# @param file_id [String] The identifier of the File containing the Document's contents.
#
# @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
Expand All @@ -79,6 +111,9 @@ module Category
# 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

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
62 changes: 62 additions & 0 deletions lib/increase/models/document_create_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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.
#
# @return [Increase::Models::DocumentCreateParams::AccountVerificationLetter, nil]
optional :account_verification_letter, -> { Increase::DocumentCreateParams::AccountVerificationLetter }

# @!method initialize(category:, account_verification_letter: 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.
#
# @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

# @!method self.values
# @return [Array<Symbol>]
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.
#
# @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
end
end
end
16 changes: 15 additions & 1 deletion lib/increase/models/document_list_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,23 @@ class DocumentListParams < Increase::Internal::Type::BaseModel
# @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, limit: nil, request_options: {})
# @!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.
#
Expand All @@ -48,6 +57,8 @@ class DocumentListParams < Increase::Internal::Type::BaseModel
#
# @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}]
Expand Down Expand Up @@ -84,6 +95,9 @@ module In
# 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

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ module Purpose
# A file containing additional evidence for a Proof of Authorization Request Submission.
PROOF_OF_AUTHORIZATION_REQUEST_SUBMISSION = :proof_of_authorization_request_submission

# An account verification letter.
ACCOUNT_VERIFICATION_LETTER = :account_verification_letter

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
3 changes: 3 additions & 0 deletions lib/increase/models/file_list_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ module In
# A file containing additional evidence for a Proof of Authorization Request Submission.
PROOF_OF_AUTHORIZATION_REQUEST_SUBMISSION = :proof_of_authorization_request_submission

# An account verification letter.
ACCOUNT_VERIFICATION_LETTER = :account_verification_letter

# @!method self.values
# @return [Array<Symbol>]
end
Expand Down
28 changes: 27 additions & 1 deletion lib/increase/resources/documents.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
module Increase
module Resources
class Documents
# Create a Document
#
# @overload create(category:, account_verification_letter: 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.
#
# @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: {})
Expand All @@ -28,7 +52,7 @@ def retrieve(document_id, params = {})
#
# List Documents
#
# @overload list(category: nil, created_at: nil, cursor: nil, entity_id: nil, limit: nil, request_options: {})
# @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]
#
Expand All @@ -38,6 +62,8 @@ def retrieve(document_id, params = {})
#
# @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]
Expand Down
Loading
Loading