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 @@
{
".": "1.91.1"
".": "1.92.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 214
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-749004bde06df3642fccde727f8e872c02795128db180789d1377c3168bd71ba.yml
openapi_spec_hash: 9058f9b3951c7608de5b67d8d5c87ffd
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c51555226fd66ed304eb1e9c759a6485c071eb2cb9ca9ee86f5b5cd88552ee4a.yml
openapi_spec_hash: c5b09ec531c068cb675f8cd3729733c6
config_hash: a143293c5450ae8f52acad08f3102575
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.92.0 (2025-09-26)

Full Changelog: [v1.91.1...v1.92.0](https://github.com/Increase/increase-ruby/compare/v1.91.1...v1.92.0)

### Features

* **api:** api update ([8876735](https://github.com/Increase/increase-ruby/commit/8876735e69be9385ae6a534f48791511dbc9ae5b))

## 1.91.1 (2025-09-26)

Full Changelog: [v1.91.0...v1.91.1](https://github.com/Increase/increase-ruby/compare/v1.91.0...v1.91.1)
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 (1.91.1)
increase (1.92.0)
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", "~> 1.91.1"
gem "increase", "~> 1.92.0"
```

<!-- x-release-please-end -->
Expand Down
16 changes: 13 additions & 3 deletions lib/increase/models/simulations/card_refund_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,27 @@ class CardRefundCreateParams < Increase::Internal::Type::BaseModel
extend Increase::Internal::Type::RequestParameters::Converter
include Increase::Internal::Type::RequestParameters

# @!attribute pending_transaction_id
# The identifier of the Pending Transaction for the refund authorization. If this
# is provided, `transaction` must not be provided as a refund with a refund
# authorized can not be linked to a regular transaction.
#
# @return [String, nil]
optional :pending_transaction_id, String

# @!attribute transaction_id
# The identifier for the Transaction to refund. The Transaction's source must have
# a category of card_settlement.
#
# @return [String]
required :transaction_id, String
# @return [String, nil]
optional :transaction_id, String

# @!method initialize(transaction_id:, request_options: {})
# @!method initialize(pending_transaction_id: nil, transaction_id: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {Increase::Models::Simulations::CardRefundCreateParams} for more details.
#
# @param pending_transaction_id [String] The identifier of the Pending Transaction for the refund authorization. If this
#
# @param transaction_id [String] The identifier for the Transaction to refund. The Transaction's source must have
#
# @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
Expand Down
6 changes: 4 additions & 2 deletions lib/increase/resources/simulations/card_refunds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class CardRefunds
# Simulates refunding a card transaction. The full value of the original sandbox
# transaction is refunded.
#
# @overload create(transaction_id:, request_options: {})
# @overload create(pending_transaction_id: nil, transaction_id: nil, request_options: {})
#
# @param pending_transaction_id [String] The identifier of the Pending Transaction for the refund authorization. If this
#
# @param transaction_id [String] The identifier for the Transaction to refund. The Transaction's source must have
#
Expand All @@ -19,7 +21,7 @@ class CardRefunds
# @return [Increase::Models::Transaction]
#
# @see Increase::Models::Simulations::CardRefundCreateParams
def create(params)
def create(params = {})
parsed, options = Increase::Simulations::CardRefundCreateParams.dump_request(params)
@client.request(
method: :post,
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 = "1.91.1"
VERSION = "1.92.0"
end
24 changes: 21 additions & 3 deletions rbi/increase/models/simulations/card_refund_create_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,46 @@ module Increase
)
end

# The identifier of the Pending Transaction for the refund authorization. If this
# is provided, `transaction` must not be provided as a refund with a refund
# authorized can not be linked to a regular transaction.
sig { returns(T.nilable(String)) }
attr_reader :pending_transaction_id

sig { params(pending_transaction_id: String).void }
attr_writer :pending_transaction_id

# The identifier for the Transaction to refund. The Transaction's source must have
# a category of card_settlement.
sig { returns(String) }
attr_accessor :transaction_id
sig { returns(T.nilable(String)) }
attr_reader :transaction_id

sig { params(transaction_id: String).void }
attr_writer :transaction_id

sig do
params(
pending_transaction_id: String,
transaction_id: String,
request_options: Increase::RequestOptions::OrHash
).returns(T.attached_class)
end
def self.new(
# The identifier of the Pending Transaction for the refund authorization. If this
# is provided, `transaction` must not be provided as a refund with a refund
# authorized can not be linked to a regular transaction.
pending_transaction_id: nil,
# The identifier for the Transaction to refund. The Transaction's source must have
# a category of card_settlement.
transaction_id:,
transaction_id: nil,
request_options: {}
)
end

sig do
override.returns(
{
pending_transaction_id: String,
transaction_id: String,
request_options: Increase::RequestOptions
}
Expand Down
7 changes: 6 additions & 1 deletion rbi/increase/resources/simulations/card_refunds.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ module Increase
# transaction is refunded.
sig do
params(
pending_transaction_id: String,
transaction_id: String,
request_options: Increase::RequestOptions::OrHash
).returns(Increase::Transaction)
end
def create(
# The identifier of the Pending Transaction for the refund authorization. If this
# is provided, `transaction` must not be provided as a refund with a refund
# authorized can not be linked to a regular transaction.
pending_transaction_id: nil,
# The identifier for the Transaction to refund. The Transaction's source must have
# a category of card_settlement.
transaction_id:,
transaction_id: nil,
request_options: {}
)
end
Expand Down
14 changes: 11 additions & 3 deletions sig/increase/models/simulations/card_refund_create_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@ module Increase
module Models
module Simulations
type card_refund_create_params =
{ transaction_id: String }
{ pending_transaction_id: String, transaction_id: String }
& Increase::Internal::Type::request_parameters

class CardRefundCreateParams < Increase::Internal::Type::BaseModel
extend Increase::Internal::Type::RequestParameters::Converter
include Increase::Internal::Type::RequestParameters

attr_accessor transaction_id: String
attr_reader pending_transaction_id: String?

def pending_transaction_id=: (String) -> String

attr_reader transaction_id: String?

def transaction_id=: (String) -> String

def initialize: (
transaction_id: String,
?pending_transaction_id: String,
?transaction_id: String,
?request_options: Increase::request_opts
) -> void

def to_hash: -> {
pending_transaction_id: String,
transaction_id: String,
request_options: Increase::RequestOptions
}
Expand Down
3 changes: 2 additions & 1 deletion sig/increase/resources/simulations/card_refunds.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module Increase
class Simulations
class CardRefunds
def create: (
transaction_id: String,
?pending_transaction_id: String,
?transaction_id: String,
?request_options: Increase::request_opts
) -> Increase::Transaction

Expand Down
4 changes: 2 additions & 2 deletions test/increase/resources/simulations/card_refunds_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require_relative "../../test_helper"

class Increase::Test::Resources::Simulations::CardRefundsTest < Increase::Test::ResourceTest
def test_create_required_params
response = @increase.simulations.card_refunds.create(transaction_id: "transaction_uyrp7fld2ium70oa7oi")
def test_create
response = @increase.simulations.card_refunds.create

assert_pattern do
response => Increase::Transaction
Expand Down