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 .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to rubygems.org in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/Increase/increase-python/actions/workflows/publish-gem.yml
# You can run this workflow by navigating to https://www.github.com/Increase/increase-ruby/actions/workflows/publish-gem.yml
name: Publish Gem
on:
workflow_dispatch:
Expand Down
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.31"
".": "0.1.0-alpha.32"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 199
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0ecd4933d3a1f2e6363dc40b619d296a033732ec245018effd3e5f687f60bb04.yml
openapi_spec_hash: 41f0a23615d13ed80758208130da6abd
config_hash: 0c284b69f3dccb22b24877f61d0d8a9a
configured_endpoints: 201
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-101cab80ae65141fb306c316367abab195616ae8f2ce61d87e0d66e3caa4ef2f.yml
openapi_spec_hash: 9338ab9453d1a0f426e9998e574bff67
config_hash: 97774f946585cecb19181a1817870d0b
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 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)

### Features

* **api:** api update ([9c520ae](https://github.com/Increase/increase-ruby/commit/9c520aec8a6ef3507d816a8bc27c0c17766220a4))


### Chores

* **ci:** link to correct github repo ([50e7095](https://github.com/Increase/increase-ruby/commit/50e70954b15bd52f627163148865d0fc53e78f87))

## 0.1.0-alpha.31 (2025-06-08)

Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/Increase/increase-ruby/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)
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.31)
increase (0.1.0.pre.alpha.32)
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.31"
gem "increase", "~> 0.1.0.pre.alpha.32"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 2 additions & 0 deletions lib/increase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@
require_relative "increase/models/oauth_token"
require_relative "increase/models/oauth_token_create_params"
require_relative "increase/models/pending_transaction"
require_relative "increase/models/pending_transaction_create_params"
require_relative "increase/models/pending_transaction_list_params"
require_relative "increase/models/pending_transaction_release_params"
require_relative "increase/models/pending_transaction_retrieve_params"
require_relative "increase/models/physical_card"
require_relative "increase/models/physical_card_create_params"
Expand Down
4 changes: 4 additions & 0 deletions lib/increase/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,12 @@ module Increase

PendingTransaction = Increase::Models::PendingTransaction

PendingTransactionCreateParams = Increase::Models::PendingTransactionCreateParams

PendingTransactionListParams = Increase::Models::PendingTransactionListParams

PendingTransactionReleaseParams = Increase::Models::PendingTransactionReleaseParams

PendingTransactionRetrieveParams = Increase::Models::PendingTransactionRetrieveParams

PhysicalCard = Increase::Models::PhysicalCard
Expand Down
44 changes: 14 additions & 30 deletions lib/increase/models/pending_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Increase
module Models
# @see Increase::Resources::PendingTransactions#retrieve
# @see Increase::Resources::PendingTransactions#create
class PendingTransaction < Increase::Internal::Type::BaseModel
# @!attribute id
# The Pending Transaction identifier.
Expand Down Expand Up @@ -226,15 +226,6 @@ class Source < Increase::Internal::Type::BaseModel
-> { Increase::PendingTransaction::Source::CheckTransferInstruction },
nil?: true

# @!attribute group_initiated_hold
# A Group Initiated Hold Source object. This field will be present in the JSON
# response if and only if `category` is equal to `group_initiated_hold`.
#
# @return [Increase::Models::PendingTransaction::Source::GroupInitiatedHold, nil]
required :group_initiated_hold,
-> { Increase::PendingTransaction::Source::GroupInitiatedHold },
nil?: true

# @!attribute inbound_funds_hold
# An Inbound Funds Hold object. This field will be present in the JSON response if
# and only if `category` is equal to `inbound_funds_hold`. We hold funds for
Expand Down Expand Up @@ -295,6 +286,14 @@ class Source < Increase::Internal::Type::BaseModel
-> { Increase::PendingTransaction::Source::SwiftTransferInstruction },
nil?: true

# @!attribute user_initiated_hold
# An User Initiated Hold object. This field will be present in the JSON response
# if and only if `category` is equal to `user_initiated_hold`. Created when a user
# initiates a hold on funds in their account.
#
# @return [Object, nil]
required :user_initiated_hold, Increase::Internal::Type::Unknown, nil?: true

# @!attribute wire_transfer_instruction
# A Wire Transfer Instruction object. This field will be present in the JSON
# response if and only if `category` is equal to `wire_transfer_instruction`.
Expand All @@ -304,7 +303,7 @@ class Source < Increase::Internal::Type::BaseModel
-> { Increase::PendingTransaction::Source::WireTransferInstruction },
nil?: true

# @!method initialize(account_transfer_instruction:, ach_transfer_instruction:, card_authorization:, category:, check_deposit_instruction:, check_transfer_instruction:, group_initiated_hold:, inbound_funds_hold:, inbound_wire_transfer_reversal:, other:, outbound_card_push_transfer_instruction:, real_time_payments_transfer_instruction:, swift_transfer_instruction:, wire_transfer_instruction:)
# @!method initialize(account_transfer_instruction:, ach_transfer_instruction:, card_authorization:, category:, check_deposit_instruction:, check_transfer_instruction:, inbound_funds_hold:, inbound_wire_transfer_reversal:, other:, outbound_card_push_transfer_instruction:, real_time_payments_transfer_instruction:, swift_transfer_instruction:, user_initiated_hold:, wire_transfer_instruction:)
# Some parameter documentations has been truncated, see
# {Increase::Models::PendingTransaction::Source} for more details.
#
Expand All @@ -324,8 +323,6 @@ class Source < Increase::Internal::Type::BaseModel
#
# @param check_transfer_instruction [Increase::Models::PendingTransaction::Source::CheckTransferInstruction, nil] A Check Transfer Instruction object. This field will be present in the JSON resp
#
# @param group_initiated_hold [Increase::Models::PendingTransaction::Source::GroupInitiatedHold, nil] A Group Initiated Hold Source object. This field will be present in the JSON res
#
# @param inbound_funds_hold [Increase::Models::PendingTransaction::Source::InboundFundsHold, nil] An Inbound Funds Hold object. This field will be present in the JSON response if
#
# @param inbound_wire_transfer_reversal [Increase::Models::PendingTransaction::Source::InboundWireTransferReversal, nil] An Inbound Wire Transfer Reversal object. This field will be present in the JSON
Expand All @@ -338,6 +335,8 @@ class Source < Increase::Internal::Type::BaseModel
#
# @param swift_transfer_instruction [Increase::Models::PendingTransaction::Source::SwiftTransferInstruction, nil] A Swift Transfer Instruction object. This field will be present in the JSON resp
#
# @param user_initiated_hold [Object, nil] An User Initiated Hold object. This field will be present in the JSON response i
#
# @param wire_transfer_instruction [Increase::Models::PendingTransaction::Source::WireTransferInstruction, nil] A Wire Transfer Instruction object. This field will be present in the JSON respo

# @see Increase::Models::PendingTransaction::Source#account_transfer_instruction
Expand Down Expand Up @@ -1210,8 +1209,8 @@ module Category
# Inbound Funds Hold: details will be under the `inbound_funds_hold` object.
INBOUND_FUNDS_HOLD = :inbound_funds_hold

# Group Initiated Hold Source: details will be under the `group_initiated_hold` object.
GROUP_INITIATED_HOLD = :group_initiated_hold
# User Initiated Hold: details will be under the `user_initiated_hold` object.
USER_INITIATED_HOLD = :user_initiated_hold

# Real-Time Payments Transfer Instruction: details will be under the `real_time_payments_transfer_instruction` object.
REAL_TIME_PAYMENTS_TRANSFER_INSTRUCTION = :real_time_payments_transfer_instruction
Expand Down Expand Up @@ -1389,21 +1388,6 @@ module Currency
end
end

# @see Increase::Models::PendingTransaction::Source#group_initiated_hold
class GroupInitiatedHold < Increase::Internal::Type::BaseModel
# @!attribute id
# The Group Initiated Hold identifier.
#
# @return [String]
required :id, String

# @!method initialize(id:)
# A Group Initiated Hold Source object. This field will be present in the JSON
# response if and only if `category` is equal to `group_initiated_hold`.
#
# @param id [String] The Group Initiated Hold identifier.
end

# @see Increase::Models::PendingTransaction::Source#inbound_funds_hold
class InboundFundsHold < Increase::Internal::Type::BaseModel
# @!attribute id
Expand Down
43 changes: 43 additions & 0 deletions lib/increase/models/pending_transaction_create_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# frozen_string_literal: true

module Increase
module Models
# @see Increase::Resources::PendingTransactions#create
class PendingTransactionCreateParams < Increase::Internal::Type::BaseModel
extend Increase::Internal::Type::RequestParameters::Converter
include Increase::Internal::Type::RequestParameters

# @!attribute account_id
# The Account to place the hold on.
#
# @return [String]
required :account_id, String

# @!attribute amount
# The amount to hold in the minor unit of the account's currency. For dollars, for
# example, this is cents. This should be a negative amount - to hold $1.00 from
# the account, you would pass -100.
#
# @return [Integer]
required :amount, Integer

# @!attribute description
# The description you choose to give the hold.
#
# @return [String, nil]
optional :description, String

# @!method initialize(account_id:, amount:, description: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {Increase::Models::PendingTransactionCreateParams} for more details.
#
# @param account_id [String] The Account to place the hold on.
#
# @param amount [Integer] The amount to hold in the minor unit of the account's currency. For dollars, for
#
# @param description [String] The description you choose to give the hold.
#
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
end
end
end
4 changes: 2 additions & 2 deletions lib/increase/models/pending_transaction_list_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ module In
# Inbound Funds Hold: details will be under the `inbound_funds_hold` object.
INBOUND_FUNDS_HOLD = :inbound_funds_hold

# Group Initiated Hold Source: details will be under the `group_initiated_hold` object.
GROUP_INITIATED_HOLD = :group_initiated_hold
# User Initiated Hold: details will be under the `user_initiated_hold` object.
USER_INITIATED_HOLD = :user_initiated_hold

# Real-Time Payments Transfer Instruction: details will be under the `real_time_payments_transfer_instruction` object.
REAL_TIME_PAYMENTS_TRANSFER_INSTRUCTION = :real_time_payments_transfer_instruction
Expand Down
14 changes: 14 additions & 0 deletions lib/increase/models/pending_transaction_release_params.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

module Increase
module Models
# @see Increase::Resources::PendingTransactions#release
class PendingTransactionReleaseParams < Increase::Internal::Type::BaseModel
extend Increase::Internal::Type::RequestParameters::Converter
include Increase::Internal::Type::RequestParameters

# @!method initialize(request_options: {})
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
end
end
end
55 changes: 55 additions & 0 deletions lib/increase/resources/pending_transactions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,38 @@
module Increase
module Resources
class PendingTransactions
# Some parameter documentations has been truncated, see
# {Increase::Models::PendingTransactionCreateParams} for more details.
#
# Creates a pending transaction on an account. This can be useful to hold funds
# for an external payment or known future transaction outside of Increase. The
# resulting Pending Transaction will have a `category` of `user_initiated_hold`
# and can be released via the API to unlock the held funds.
#
# @overload create(account_id:, amount:, description: nil, request_options: {})
#
# @param account_id [String] The Account to place the hold on.
#
# @param amount [Integer] The amount to hold in the minor unit of the account's currency. For dollars, for
#
# @param description [String] The description you choose to give the hold.
#
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [Increase::Models::PendingTransaction]
#
# @see Increase::Models::PendingTransactionCreateParams
def create(params)
parsed, options = Increase::PendingTransactionCreateParams.dump_request(params)
@client.request(
method: :post,
path: "pending_transactions",
body: parsed,
model: Increase::PendingTransaction,
options: options
)
end

# Retrieve a Pending Transaction
#
# @overload retrieve(pending_transaction_id, request_options: {})
Expand Down Expand Up @@ -61,6 +93,29 @@ def list(params = {})
)
end

# Release a Pending Transaction you had previously created. The Pending
# Transaction must have a `category` of `user_initiated_hold` and a `status` of
# `pending`. This will unlock the held funds and mark the Pending Transaction as
# complete.
#
# @overload release(pending_transaction_id, request_options: {})
#
# @param pending_transaction_id [String] The identifier of the Pending Transaction to release.
#
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [Increase::Models::PendingTransaction]
#
# @see Increase::Models::PendingTransactionReleaseParams
def release(pending_transaction_id, params = {})
@client.request(
method: :post,
path: ["pending_transactions/%1$s/release", pending_transaction_id],
model: Increase::PendingTransaction,
options: params[:request_options]
)
end

# @api private
#
# @param client [Increase::Client]
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.31"
VERSION = "0.1.0.pre.alpha.32"
end
6 changes: 6 additions & 0 deletions rbi/increase/models.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,14 @@ module Increase

PendingTransaction = Increase::Models::PendingTransaction

PendingTransactionCreateParams =
Increase::Models::PendingTransactionCreateParams

PendingTransactionListParams = Increase::Models::PendingTransactionListParams

PendingTransactionReleaseParams =
Increase::Models::PendingTransactionReleaseParams

PendingTransactionRetrieveParams =
Increase::Models::PendingTransactionRetrieveParams

Expand Down
Loading
Loading