From bc632bed68cf33328523a222c51d400b359a8912 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 08:28:12 +0000 Subject: [PATCH 1/6] chore(internal): codegen related update --- Gemfile.lock | 16 ++++++++-------- lib/increase/internal/transport/base_client.rb | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 89cd596f6..05be25b05 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) diff --git a/lib/increase/internal/transport/base_client.rb b/lib/increase/internal/transport/base_client.rb index 5d75756a7..96202fc2e 100644 --- a/lib/increase/internal/transport/base_client.rb +++ b/lib/increase/internal/transport/base_client.rb @@ -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]) From 9373e3cac9df6b3838d036a8c495bcd737c66d50 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 15:30:55 +0000 Subject: [PATCH 2/6] docs: illustrate environmental defaults for auth variables --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a286a58c..73c55b441 100644 --- a/README.md +++ b/README.md @@ -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" ) From a95607ee17b41cf983cb98de4a12500aeb9a5924 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 21:45:35 +0000 Subject: [PATCH 3/6] chore: accept all nd-json mimetype variants --- lib/increase/internal/util.rb | 2 +- rbi/increase/internal/util.rbi | 2 +- test/increase/internal/util_test.rb | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/increase/internal/util.rb b/lib/increase/internal/util.rb index 95be6e4e0..5947a2e70 100644 --- a/lib/increase/internal/util.rb +++ b/lib/increase/internal/util.rb @@ -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 diff --git a/rbi/increase/internal/util.rbi b/rbi/increase/internal/util.rbi index fdcef1ca9..93536072d 100644 --- a/rbi/increase/internal/util.rbi +++ b/rbi/increase/internal/util.rbi @@ -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 diff --git a/test/increase/internal/util_test.rb b/test/increase/internal/util_test.rb index 9ae247e67..4c28f4fb7 100644 --- a/test/increase/internal/util_test.rb +++ b/test/increase/internal/util_test.rb @@ -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 From 62c70eb08625d9a4396b58cd0dea4cf99e2deac6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 22:03:03 +0000 Subject: [PATCH 4/6] feat(api): api update --- .stats.yml | 4 ++-- lib/increase/models/intrafi_account_enrollment.rb | 10 +++++----- lib/increase/models/intrafi_balance.rb | 4 ++-- lib/increase/resources/intrafi_balances.rb | 4 +++- rbi/increase/models/intrafi_account_enrollment.rbi | 10 +++++----- rbi/increase/models/intrafi_balance.rbi | 4 ++-- rbi/increase/resources/intrafi_balances.rbi | 4 +++- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index c4df4d7a0..fcab57af4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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-2c3638e748a658e68e6e4cd2b63cbbaf83ed0799919b2ab8bd5833f549984106.yml +openapi_spec_hash: 69558e21d0e0671eb3f10dd541c75346 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/lib/increase/models/intrafi_account_enrollment.rb b/lib/increase/models/intrafi_account_enrollment.rb index d999b8609..a23693c5c 100644 --- a/lib/increase/models/intrafi_account_enrollment.rb +++ b/lib/increase/models/intrafi_account_enrollment.rb @@ -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. # diff --git a/lib/increase/models/intrafi_balance.rb b/lib/increase/models/intrafi_balance.rb index c41758d7d..c024ae890 100644 --- a/lib/increase/models/intrafi_balance.rb +++ b/lib/increase/models/intrafi_balance.rb @@ -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. # diff --git a/lib/increase/resources/intrafi_balances.rb b/lib/increase/resources/intrafi_balances.rb index 15f44195a..6148025b5 100644 --- a/lib/increase/resources/intrafi_balances.rb +++ b/lib/increase/resources/intrafi_balances.rb @@ -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: {}) # diff --git a/rbi/increase/models/intrafi_account_enrollment.rbi b/rbi/increase/models/intrafi_account_enrollment.rbi index 04fb93c7d..dcc2ddc6a 100644 --- a/rbi/increase/models/intrafi_account_enrollment.rbi +++ b/rbi/increase/models/intrafi_account_enrollment.rbi @@ -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, diff --git a/rbi/increase/models/intrafi_balance.rbi b/rbi/increase/models/intrafi_balance.rbi index 9d709db19..ddeb6653d 100644 --- a/rbi/increase/models/intrafi_balance.rbi +++ b/rbi/increase/models/intrafi_balance.rbi @@ -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, diff --git a/rbi/increase/resources/intrafi_balances.rbi b/rbi/increase/resources/intrafi_balances.rbi index c051f5b3b..3fb6d0cb0 100644 --- a/rbi/increase/resources/intrafi_balances.rbi +++ b/rbi/increase/resources/intrafi_balances.rbi @@ -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) From 33dfc9358d19c889fb6170b0edebe6e2017d4bd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 04:07:01 +0000 Subject: [PATCH 5/6] feat(api): api update --- .stats.yml | 4 ++-- lib/increase/models/physical_card.rb | 12 +++++++++++- rbi/increase/models/physical_card.rbi | 10 ++++++++++ sig/increase/models/physical_card.rbs | 4 ++++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index fcab57af4..852d2b7b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c3638e748a658e68e6e4cd2b63cbbaf83ed0799919b2ab8bd5833f549984106.yml -openapi_spec_hash: 69558e21d0e0671eb3f10dd541c75346 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-83756f4a82da617a4b41b72a78028e4ed15edad4019e54ec8802db67c04cb242.yml +openapi_spec_hash: 33ff739bdaeee562575bea13c7c5696c config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/lib/increase/models/physical_card.rb b/lib/increase/models/physical_card.rb index b83a9a069..306369d65 100644 --- a/lib/increase/models/physical_card.rb +++ b/lib/increase/models/physical_card.rb @@ -317,6 +317,13 @@ class Tracking < Increase::Internal::Type::BaseModel # @param updates [Array] 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. # @@ -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. diff --git a/rbi/increase/models/physical_card.rbi b/rbi/increase/models/physical_card.rbi index cc4bcd408..b3fd5fe82 100644 --- a/rbi/increase/models/physical_card.rbi +++ b/rbi/increase/models/physical_card.rbi @@ -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 @@ -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, @@ -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. @@ -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, diff --git a/sig/increase/models/physical_card.rbs b/sig/increase/models/physical_card.rbs index d865d2e51..ed5276968 100644 --- a/sig/increase/models/physical_card.rbs +++ b/sig/increase/models/physical_card.rbs @@ -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, @@ -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? @@ -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, From b7d3f742a7e591450c7fa182492aac295a7797a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 04:07:23 +0000 Subject: [PATCH 6/6] release: 0.1.0-alpha.16 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 20 ++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/increase/version.rb | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 08e82c45c..7e56fe29a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.15" + ".": "0.1.0-alpha.16" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1aa7e10c4..11413bc84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock index 05be25b05..fcfa22d89 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/README.md b/README.md index 73c55b441..6eab6daa9 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", "~> 0.1.0.pre.alpha.15" +gem "increase", "~> 0.1.0.pre.alpha.16" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index dba26864d..bdaac4e3c 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -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