From 8876735e69be9385ae6a534f48791511dbc9ae5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:02:49 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 ++-- .../simulations/card_refund_create_params.rb | 16 ++++++++++--- .../resources/simulations/card_refunds.rb | 6 +++-- .../simulations/card_refund_create_params.rbi | 24 ++++++++++++++++--- .../resources/simulations/card_refunds.rbi | 7 +++++- .../simulations/card_refund_create_params.rbs | 14 ++++++++--- .../resources/simulations/card_refunds.rbs | 3 ++- .../simulations/card_refunds_test.rb | 4 ++-- 8 files changed, 61 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index a9120ac7b..d034046d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/lib/increase/models/simulations/card_refund_create_params.rb b/lib/increase/models/simulations/card_refund_create_params.rb index 837cdf12d..cbdf48fc3 100644 --- a/lib/increase/models/simulations/card_refund_create_params.rb +++ b/lib/increase/models/simulations/card_refund_create_params.rb @@ -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}] diff --git a/lib/increase/resources/simulations/card_refunds.rb b/lib/increase/resources/simulations/card_refunds.rb index bf50cae43..d079e06c6 100644 --- a/lib/increase/resources/simulations/card_refunds.rb +++ b/lib/increase/resources/simulations/card_refunds.rb @@ -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 # @@ -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, diff --git a/rbi/increase/models/simulations/card_refund_create_params.rbi b/rbi/increase/models/simulations/card_refund_create_params.rbi index 66f6daa3e..13b2928ef 100644 --- a/rbi/increase/models/simulations/card_refund_create_params.rbi +++ b/rbi/increase/models/simulations/card_refund_create_params.rbi @@ -15,21 +15,38 @@ 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 @@ -37,6 +54,7 @@ module Increase sig do override.returns( { + pending_transaction_id: String, transaction_id: String, request_options: Increase::RequestOptions } diff --git a/rbi/increase/resources/simulations/card_refunds.rbi b/rbi/increase/resources/simulations/card_refunds.rbi index 5e4cd1389..741b35d48 100644 --- a/rbi/increase/resources/simulations/card_refunds.rbi +++ b/rbi/increase/resources/simulations/card_refunds.rbi @@ -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 diff --git a/sig/increase/models/simulations/card_refund_create_params.rbs b/sig/increase/models/simulations/card_refund_create_params.rbs index 34301fdd0..29d8d32bb 100644 --- a/sig/increase/models/simulations/card_refund_create_params.rbs +++ b/sig/increase/models/simulations/card_refund_create_params.rbs @@ -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 } diff --git a/sig/increase/resources/simulations/card_refunds.rbs b/sig/increase/resources/simulations/card_refunds.rbs index 0f51dd6fb..696a129ee 100644 --- a/sig/increase/resources/simulations/card_refunds.rbs +++ b/sig/increase/resources/simulations/card_refunds.rbs @@ -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 diff --git a/test/increase/resources/simulations/card_refunds_test.rb b/test/increase/resources/simulations/card_refunds_test.rb index fb802e2f0..3ffcde278 100644 --- a/test/increase/resources/simulations/card_refunds_test.rb +++ b/test/increase/resources/simulations/card_refunds_test.rb @@ -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 From 838d05f84c8d2c8ae58fd98a9d6be921d32b2e74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:03:10 +0000 Subject: [PATCH 2/2] release: 1.92.0 --- .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 bdd1880da..2a2ee2b8f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.91.1" + ".": "1.92.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af5961e3..06fcbfc1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock index c7172b3e3..a5bf7c4b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.91.1) + increase (1.92.0) connection_pool GEM diff --git a/README.md b/README.md index 976db60e5..12eb5b82d 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", "~> 1.91.1" +gem "increase", "~> 1.92.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 2291ed6ec..7b6660569 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.91.1" + VERSION = "1.92.0" end