From 68187fce49e249a80b2e0c6246ff80d176c9a399 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 03:51:37 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- lib/increase/models/pending_transaction.rb | 28 +++++++++++- rbi/increase/models/pending_transaction.rbi | 45 +++++++++++++++++++ sig/increase/models/pending_transaction.rbs | 19 ++++++++ .../resources/pending_transactions_test.rb | 4 ++ 5 files changed, 97 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a78c7eb65..c20d72427 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-101cab80ae65141fb306c316367abab195616ae8f2ce61d87e0d66e3caa4ef2f.yml -openapi_spec_hash: 9338ab9453d1a0f426e9998e574bff67 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c62370ab61731722fddc5be1652ccfd9188ae052be44fae639b4a7920afc3b3.yml +openapi_spec_hash: aefdd344388757e80e1fea0ad0506be8 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/lib/increase/models/pending_transaction.rb b/lib/increase/models/pending_transaction.rb index a4f60dd3f..f362130d3 100644 --- a/lib/increase/models/pending_transaction.rb +++ b/lib/increase/models/pending_transaction.rb @@ -23,6 +23,13 @@ class PendingTransaction < Increase::Internal::Type::BaseModel # @return [Integer] required :amount, Integer + # @!attribute balance_impact + # How the Pending Transaction affects the balance of its Account while its status + # is `pending`. + # + # @return [Symbol, Increase::Models::PendingTransaction::BalanceImpact] + required :balance_impact, enum: -> { Increase::PendingTransaction::BalanceImpact } + # @!attribute completed_at # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending # Transaction was completed. @@ -88,7 +95,7 @@ class PendingTransaction < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::PendingTransaction::Type] required :type, enum: -> { Increase::PendingTransaction::Type } - # @!method initialize(id:, account_id:, amount:, completed_at:, created_at:, currency:, description:, route_id:, route_type:, source:, status:, type:) + # @!method initialize(id:, account_id:, amount:, balance_impact:, completed_at:, created_at:, currency:, description:, route_id:, route_type:, source:, status:, type:) # Some parameter documentations has been truncated, see # {Increase::Models::PendingTransaction} for more details. # @@ -101,6 +108,8 @@ class PendingTransaction < Increase::Internal::Type::BaseModel # # @param amount [Integer] The Pending Transaction amount in the minor unit of its currency. For dollars, f # + # @param balance_impact [Symbol, Increase::Models::PendingTransaction::BalanceImpact] How the Pending Transaction affects the balance of its Account while its status + # # @param completed_at [Time, nil] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending # # @param created_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending @@ -119,6 +128,23 @@ class PendingTransaction < Increase::Internal::Type::BaseModel # # @param type [Symbol, Increase::Models::PendingTransaction::Type] A constant representing the object's type. For this resource it will always be ` + # How the Pending Transaction affects the balance of its Account while its status + # is `pending`. + # + # @see Increase::Models::PendingTransaction#balance_impact + module BalanceImpact + extend Increase::Internal::Type::Enum + + # This Pending Transaction will decrement the available balance on the Account while its status is `pending`. + AFFECTS_AVAILABLE_BALANCE = :affects_available_balance + + # This Pending Transaction does not affect the available balance on the Account. + NONE = :none + + # @!method self.values + # @return [Array] + end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending # Transaction's currency. This will match the currency on the Pending # Transaction's Account. diff --git a/rbi/increase/models/pending_transaction.rbi b/rbi/increase/models/pending_transaction.rbi index 7e0fc3a5c..8a26d6fa0 100644 --- a/rbi/increase/models/pending_transaction.rbi +++ b/rbi/increase/models/pending_transaction.rbi @@ -21,6 +21,11 @@ module Increase sig { returns(Integer) } attr_accessor :amount + # How the Pending Transaction affects the balance of its Account while its status + # is `pending`. + sig { returns(Increase::PendingTransaction::BalanceImpact::TaggedSymbol) } + attr_accessor :balance_impact + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending # Transaction was completed. sig { returns(T.nilable(Time)) } @@ -82,6 +87,7 @@ module Increase id: String, account_id: String, amount: Integer, + balance_impact: Increase::PendingTransaction::BalanceImpact::OrSymbol, completed_at: T.nilable(Time), created_at: Time, currency: Increase::PendingTransaction::Currency::OrSymbol, @@ -102,6 +108,9 @@ module Increase # The Pending Transaction amount in the minor unit of its currency. For dollars, # for example, this is cents. amount:, + # How the Pending Transaction affects the balance of its Account while its status + # is `pending`. + balance_impact:, # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending # Transaction was completed. completed_at:, @@ -140,6 +149,8 @@ module Increase id: String, account_id: String, amount: Integer, + balance_impact: + Increase::PendingTransaction::BalanceImpact::TaggedSymbol, completed_at: T.nilable(Time), created_at: Time, currency: Increase::PendingTransaction::Currency::TaggedSymbol, @@ -156,6 +167,40 @@ module Increase def to_hash end + # How the Pending Transaction affects the balance of its Account while its status + # is `pending`. + module BalanceImpact + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::PendingTransaction::BalanceImpact) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # This Pending Transaction will decrement the available balance on the Account while its status is `pending`. + AFFECTS_AVAILABLE_BALANCE = + T.let( + :affects_available_balance, + Increase::PendingTransaction::BalanceImpact::TaggedSymbol + ) + + # This Pending Transaction does not affect the available balance on the Account. + NONE = + T.let( + :none, + Increase::PendingTransaction::BalanceImpact::TaggedSymbol + ) + + sig do + override.returns( + T::Array[Increase::PendingTransaction::BalanceImpact::TaggedSymbol] + ) + end + def self.values + end + end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending # Transaction's currency. This will match the currency on the Pending # Transaction's Account. diff --git a/sig/increase/models/pending_transaction.rbs b/sig/increase/models/pending_transaction.rbs index d6121cec3..c027de9e9 100644 --- a/sig/increase/models/pending_transaction.rbs +++ b/sig/increase/models/pending_transaction.rbs @@ -5,6 +5,7 @@ module Increase id: String, account_id: String, amount: Integer, + balance_impact: Increase::Models::PendingTransaction::balance_impact, completed_at: Time?, created_at: Time, currency: Increase::Models::PendingTransaction::currency, @@ -23,6 +24,8 @@ module Increase attr_accessor amount: Integer + attr_accessor balance_impact: Increase::Models::PendingTransaction::balance_impact + attr_accessor completed_at: Time? attr_accessor created_at: Time @@ -45,6 +48,7 @@ module Increase id: String, account_id: String, amount: Integer, + balance_impact: Increase::Models::PendingTransaction::balance_impact, completed_at: Time?, created_at: Time, currency: Increase::Models::PendingTransaction::currency, @@ -60,6 +64,7 @@ module Increase id: String, account_id: String, amount: Integer, + balance_impact: Increase::Models::PendingTransaction::balance_impact, completed_at: Time?, created_at: Time, currency: Increase::Models::PendingTransaction::currency, @@ -71,6 +76,20 @@ module Increase type: Increase::Models::PendingTransaction::type_ } + type balance_impact = :affects_available_balance | :none + + module BalanceImpact + extend Increase::Internal::Type::Enum + + # This Pending Transaction will decrement the available balance on the Account while its status is `pending`. + AFFECTS_AVAILABLE_BALANCE: :affects_available_balance + + # This Pending Transaction does not affect the available balance on the Account. + NONE: :none + + def self?.values: -> ::Array[Increase::Models::PendingTransaction::balance_impact] + end + type currency = :CAD | :CHF | :EUR | :GBP | :JPY | :USD module Currency diff --git a/test/increase/resources/pending_transactions_test.rb b/test/increase/resources/pending_transactions_test.rb index be00cd4e9..7b6bc6f41 100644 --- a/test/increase/resources/pending_transactions_test.rb +++ b/test/increase/resources/pending_transactions_test.rb @@ -16,6 +16,7 @@ def test_create_required_params id: String, account_id: String, amount: Integer, + balance_impact: Increase::PendingTransaction::BalanceImpact, completed_at: Time | nil, created_at: Time, currency: Increase::PendingTransaction::Currency, @@ -41,6 +42,7 @@ def test_retrieve id: String, account_id: String, amount: Integer, + balance_impact: Increase::PendingTransaction::BalanceImpact, completed_at: Time | nil, created_at: Time, currency: Increase::PendingTransaction::Currency, @@ -73,6 +75,7 @@ def test_list id: String, account_id: String, amount: Integer, + balance_impact: Increase::PendingTransaction::BalanceImpact, completed_at: Time | nil, created_at: Time, currency: Increase::PendingTransaction::Currency, @@ -98,6 +101,7 @@ def test_release id: String, account_id: String, amount: Integer, + balance_impact: Increase::PendingTransaction::BalanceImpact, completed_at: Time | nil, created_at: Time, currency: Increase::PendingTransaction::Currency, From 51e2bd3f226e76194f0e4e894dd24d2bf046c276 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 03:52:02 +0000 Subject: [PATCH 2/2] release: 0.1.0-alpha.33 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/increase/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ce25feca..ff4f9a504 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.32" + ".": "0.1.0-alpha.33" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dc88d304..b2402a5aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.33 (2025-06-12) + +Full Changelog: [v0.1.0-alpha.32...v0.1.0-alpha.33](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.32...v0.1.0-alpha.33) + +### Features + +* **api:** api update ([68187fc](https://github.com/Increase/increase-ruby/commit/68187fce49e249a80b2e0c6246ff80d176c9a399)) + ## 0.1.0-alpha.32 (2025-06-11) Full Changelog: [v0.1.0-alpha.31...v0.1.0-alpha.32](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.31...v0.1.0-alpha.32) diff --git a/Gemfile.lock b/Gemfile.lock index af5e012bb..5b2bd2a68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (0.1.0.pre.alpha.32) + increase (0.1.0.pre.alpha.33) connection_pool GEM diff --git a/README.md b/README.md index b969e8c1d..dfbc2fff9 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.32" +gem "increase", "~> 0.1.0.pre.alpha.33" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 086c3fa93..f6a07b531 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.32" + VERSION = "0.1.0.pre.alpha.33" end