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.15"
".": "0.1.0-alpha.16"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 195
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-16df305f7a47d8eea31d50e9afb8667a56e115ffd137c13b6d219f92e90a60fe.yml
openapi_spec_hash: 0973872d3a75e346faa27e30e228cdf3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-83756f4a82da617a4b41b72a78028e4ed15edad4019e54ec8802db67c04cb242.yml
openapi_spec_hash: 33ff739bdaeee562575bea13c7c5696c
config_hash: 1619155422217276e2489ae10ce63a25
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 0.1.0-alpha.16 (2025-05-06)

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

### Features

* **api:** api update ([33dfc93](https://github.com/Increase/increase-ruby/commit/33dfc9358d19c889fb6170b0edebe6e2017d4bd8))
* **api:** api update ([62c70eb](https://github.com/Increase/increase-ruby/commit/62c70eb08625d9a4396b58cd0dea4cf99e2deac6))


### Chores

* accept all nd-json mimetype variants ([a95607e](https://github.com/Increase/increase-ruby/commit/a95607ee17b41cf983cb98de4a12500aeb9a5924))
* **internal:** codegen related update ([bc632be](https://github.com/Increase/increase-ruby/commit/bc632bed68cf33328523a222c51d400b359a8912))


### Documentation

* illustrate environmental defaults for auth variables ([9373e3c](https://github.com/Increase/increase-ruby/commit/9373e3cac9df6b3838d036a8c495bcd737c66d50))

## 0.1.0-alpha.15 (2025-05-04)

Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
Expand Down
18 changes: 9 additions & 9 deletions 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.15)
increase (0.1.0.pre.alpha.16)
connection_pool

GEM
Expand Down Expand Up @@ -105,7 +105,7 @@ GEM
redcarpet (3.6.1)
regexp_parser (2.10.0)
rexml (3.4.1)
rubocop (1.75.4)
rubocop (1.75.5)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
Expand All @@ -121,13 +121,13 @@ GEM
prism (~> 1.4)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
sorbet (0.5.12059)
sorbet-static (= 0.5.12059)
sorbet-runtime (0.5.12059)
sorbet-static (0.5.12059-x86_64-linux)
sorbet-static-and-runtime (0.5.12059)
sorbet (= 0.5.12059)
sorbet-runtime (= 0.5.12059)
sorbet (0.5.12060)
sorbet-static (= 0.5.12060)
sorbet-runtime (0.5.12060)
sorbet-static (0.5.12060-x86_64-linux)
sorbet-static-and-runtime (0.5.12060)
sorbet (= 0.5.12060)
sorbet-runtime (= 0.5.12060)
spoom (1.6.1)
erubi (>= 1.10.0)
prism (>= 0.28.0)
Expand Down
4 changes: 2 additions & 2 deletions 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.15"
gem "increase", "~> 0.1.0.pre.alpha.16"
```

<!-- x-release-please-end -->
Expand All @@ -27,7 +27,7 @@ require "bundler/setup"
require "increase"

increase = Increase::Client.new(
api_key: "My API Key", # defaults to ENV["INCREASE_API_KEY"]
api_key: ENV["INCREASE_API_KEY"], # This is the default and can be omitted
environment: "sandbox" # defaults to "production"
)

Expand Down
4 changes: 2 additions & 2 deletions lib/increase/internal/transport/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,9 @@ def request(req)

decoded = Increase::Internal::Util.decode_content(response, stream: stream)
case req
in { stream: Class => st }
in {stream: Class => st}
st.new(model: model, url: url, status: status, response: response, stream: decoded)
in { page: Class => page }
in {page: Class => page}
page.new(client: self, req: req, headers: response, page_data: decoded)
else
unwrapped = Increase::Internal::Util.dig(decoded, req[:unwrap])
Expand Down
2 changes: 1 addition & 1 deletion lib/increase/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def writable_enum(&blk)
# @type [Regexp]
JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
# @type [Regexp]
JSONL_CONTENT = %r{^application/(?:x-)?jsonl}
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}

class << self
# @api private
Expand Down
10 changes: 5 additions & 5 deletions lib/increase/models/intrafi_account_enrollment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ class IntrafiAccountEnrollment < Increase::Internal::Type::BaseModel
#
# IntraFi is a
# [network of financial institutions](https://www.intrafi.com/network-banks) that
# allows Increase users to sweep funds to multiple banks, in addition to
# Increase's main bank partners. This enables accounts to become eligible for
# additional Federal Deposit Insurance Corporation (FDIC) insurance. An IntraFi
# Account Enrollment object represents the status of an account in the network.
# Sweeping an account to IntraFi doesn't affect funds availability.
# allows Increase users to sweep funds to multiple banks. This enables accounts to
# become eligible for additional Federal Deposit Insurance Corporation (FDIC)
# insurance. An IntraFi Account Enrollment object represents the status of an
# account in the network. Sweeping an account to IntraFi doesn't affect funds
# availability.
#
# @param id [String] The identifier of this enrollment at IntraFi.
#
Expand Down
4 changes: 2 additions & 2 deletions lib/increase/models/intrafi_balance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class IntrafiBalance < Increase::Internal::Type::BaseModel
# {Increase::Models::IntrafiBalance} for more details.
#
# When using IntraFi, each account's balance over the standard FDIC insurance
# amount are swept to various other institutions. Funds are rebalanced across
# banks as needed once per business day.
# amount is swept to various other institutions. Funds are rebalanced across banks
# as needed once per business day.
#
# @param id [String] The identifier of this balance.
#
Expand Down
12 changes: 11 additions & 1 deletion lib/increase/models/physical_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ class Tracking < Increase::Internal::Type::BaseModel
# @param updates [Array<Increase::Models::PhysicalCard::Shipment::Tracking::Update>] Tracking updates relating to the physical card's delivery.

class Update < Increase::Internal::Type::BaseModel
# @!attribute carrier_estimated_delivery_at
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the
# carrier expects the card to be delivered.
#
# @return [Time, nil]
required :carrier_estimated_delivery_at, Time, nil?: true

# @!attribute category
# The type of tracking event.
#
Expand Down Expand Up @@ -348,10 +355,13 @@ class Update < Increase::Internal::Type::BaseModel
# @return [String, nil]
required :state, String, nil?: true

# @!method initialize(category:, city:, created_at:, postal_code:, state:)
# @!method initialize(carrier_estimated_delivery_at:, category:, city:, created_at:, postal_code:, state:)
# Some parameter documentations has been truncated, see
# {Increase::Models::PhysicalCard::Shipment::Tracking::Update} for more details.
#
# @param carrier_estimated_delivery_at [Time, nil] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the ca
# ...
#
# @param category [Symbol, Increase::Models::PhysicalCard::Shipment::Tracking::Update::Category] The type of tracking event.
#
# @param city [String, nil] The city where the event took place.
Expand Down
4 changes: 3 additions & 1 deletion lib/increase/resources/intrafi_balances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
module Increase
module Resources
class IntrafiBalances
# Get IntraFi balances by bank
# Returns the IntraFi balance for the given account. IntraFi may sweep funds to
# multiple banks. This endpoint will include both the total balance and the amount
# swept to each institution.
#
# @overload intrafi_balance(account_id, request_options: {})
#
Expand Down
2 changes: 1 addition & 1 deletion lib/increase/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Increase
VERSION = "0.1.0.pre.alpha.15"
VERSION = "0.1.0.pre.alpha.16"
end
2 changes: 1 addition & 1 deletion rbi/increase/internal/util.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ module Increase
end

JSON_CONTENT = T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
JSONL_CONTENT = T.let(%r{^application/(?:x-)?jsonl}, Regexp)
JSONL_CONTENT = T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)

class << self
# @api private
Expand Down
10 changes: 5 additions & 5 deletions rbi/increase/models/intrafi_account_enrollment.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ module Increase

# IntraFi is a
# [network of financial institutions](https://www.intrafi.com/network-banks) that
# allows Increase users to sweep funds to multiple banks, in addition to
# Increase's main bank partners. This enables accounts to become eligible for
# additional Federal Deposit Insurance Corporation (FDIC) insurance. An IntraFi
# Account Enrollment object represents the status of an account in the network.
# Sweeping an account to IntraFi doesn't affect funds availability.
# allows Increase users to sweep funds to multiple banks. This enables accounts to
# become eligible for additional Federal Deposit Insurance Corporation (FDIC)
# insurance. An IntraFi Account Enrollment object represents the status of an
# account in the network. Sweeping an account to IntraFi doesn't affect funds
# availability.
sig do
params(
id: String,
Expand Down
4 changes: 2 additions & 2 deletions rbi/increase/models/intrafi_balance.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module Increase
attr_accessor :type

# When using IntraFi, each account's balance over the standard FDIC insurance
# amount are swept to various other institutions. Funds are rebalanced across
# banks as needed once per business day.
# amount is swept to various other institutions. Funds are rebalanced across banks
# as needed once per business day.
sig do
params(
id: String,
Expand Down
10 changes: 10 additions & 0 deletions rbi/increase/models/physical_card.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ module Increase
def to_hash; end

class Update < Increase::Internal::Type::BaseModel
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the
# carrier expects the card to be delivered.
sig { returns(T.nilable(Time)) }
attr_accessor :carrier_estimated_delivery_at

# The type of tracking event.
sig { returns(Increase::Models::PhysicalCard::Shipment::Tracking::Update::Category::TaggedSymbol) }
attr_accessor :category
Expand All @@ -408,6 +413,7 @@ module Increase

sig do
params(
carrier_estimated_delivery_at: T.nilable(Time),
category: Increase::Models::PhysicalCard::Shipment::Tracking::Update::Category::OrSymbol,
city: T.nilable(String),
created_at: Time,
Expand All @@ -417,6 +423,9 @@ module Increase
.returns(T.attached_class)
end
def self.new(
# The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the
# carrier expects the card to be delivered.
carrier_estimated_delivery_at:,
# The type of tracking event.
category:,
# The city where the event took place.
Expand All @@ -433,6 +442,7 @@ module Increase
override
.returns(
{
carrier_estimated_delivery_at: T.nilable(Time),
category: Increase::Models::PhysicalCard::Shipment::Tracking::Update::Category::TaggedSymbol,
city: T.nilable(String),
created_at: Time,
Expand Down
4 changes: 3 additions & 1 deletion rbi/increase/resources/intrafi_balances.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
module Increase
module Resources
class IntrafiBalances
# Get IntraFi balances by bank
# Returns the IntraFi balance for the given account. IntraFi may sweep funds to
# multiple banks. This endpoint will include both the total balance and the amount
# swept to each institution.
sig do
params(account_id: String, request_options: Increase::RequestOpts)
.returns(Increase::Models::IntrafiBalance)
Expand Down
4 changes: 4 additions & 0 deletions sig/increase/models/physical_card.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ module Increase

type update =
{
carrier_estimated_delivery_at: Time?,
category: Increase::Models::PhysicalCard::Shipment::Tracking::Update::category,
city: String?,
created_at: Time,
Expand All @@ -216,6 +217,8 @@ module Increase
}

class Update < Increase::Internal::Type::BaseModel
attr_accessor carrier_estimated_delivery_at: Time?

attr_accessor category: Increase::Models::PhysicalCard::Shipment::Tracking::Update::category

attr_accessor city: String?
Expand All @@ -227,6 +230,7 @@ module Increase
attr_accessor state: String?

def initialize: (
carrier_estimated_delivery_at: Time?,
category: Increase::Models::PhysicalCard::Shipment::Tracking::Update::category,
city: String?,
created_at: Time,
Expand Down
16 changes: 16 additions & 0 deletions test/increase/internal/util_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,22 @@ def test_json_content
end
end
end

def test_jsonl_content
cases = {
"application/x-ndjson" => true,
"application/x-ldjson" => true,
"application/jsonl" => true,
"application/x-jsonl" => true,
"application/json" => false,
"application/vnd.api+json" => false
}
cases.each do |header, verdict|
assert_pattern do
Increase::Internal::Util::JSONL_CONTENT.match?(header) => ^verdict
end
end
end
end

class Increase::Test::UtilFormDataEncodingTest < Minitest::Test
Expand Down