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.32"
".": "0.1.0-alpha.33"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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.32)
increase (0.1.0.pre.alpha.33)
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.32"
gem "increase", "~> 0.1.0.pre.alpha.33"
```

<!-- x-release-please-end -->
Expand Down
28 changes: 27 additions & 1 deletion lib/increase/models/pending_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
#
Expand All @@ -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
Expand All @@ -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<Symbol>]
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.
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.32"
VERSION = "0.1.0.pre.alpha.33"
end
45 changes: 45 additions & 0 deletions rbi/increase/models/pending_transaction.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -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)) }
Expand Down Expand Up @@ -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,
Expand All @@ -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:,
Expand Down Expand Up @@ -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,
Expand All @@ -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.
Expand Down
19 changes: 19 additions & 0 deletions sig/increase/models/pending_transaction.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/increase/resources/pending_transactions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
Loading