From 390da85a509b0b81f7fd823cc5b956765dc1ba80 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 23:22:53 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- lib/increase/models/card_dispute.rb | 26 +++++++++- .../models/card_dispute_withdraw_params.rb | 10 +++- lib/increase/resources/card_disputes.rb | 8 ++- rbi/increase/models/card_dispute.rbi | 50 +++++++++++++++++-- .../models/card_dispute_withdraw_params.rbi | 26 ++++++++-- rbi/increase/resources/card_disputes.rbi | 3 ++ sig/increase/models/card_dispute.rbs | 21 ++++++-- .../models/card_dispute_withdraw_params.rbs | 16 ++++-- sig/increase/resources/card_disputes.rbs | 1 + test/increase/resources/card_disputes_test.rb | 15 ++++-- .../simulations/card_disputes_test.rb | 3 +- 12 files changed, 157 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd48d4fb..87e08670 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92af5c57fac9c88bad16079e7b437371720d00c368fd4eea5987f94b25855fcb.yml -openapi_spec_hash: 7831d7cdab2d8972f5193916c617c9a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a822d0695f48967e594a88eef888b826cd51b62959bd4b3d0163b7d010bab969.yml +openapi_spec_hash: 95ea277ed84c04aefd25bcb63ae4e2e5 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/lib/increase/models/card_dispute.rb b/lib/increase/models/card_dispute.rb index 97fd86d3..98286504 100644 --- a/lib/increase/models/card_dispute.rb +++ b/lib/increase/models/card_dispute.rb @@ -93,7 +93,14 @@ class CardDispute < Increase::Internal::Type::BaseModel # @return [Increase::Models::CardDispute::Win, nil] required :win, -> { Increase::CardDispute::Win }, nil?: true - # @!method initialize(id:, amount:, card_id:, created_at:, disputed_transaction_id:, idempotency_key:, loss:, network:, status:, type:, user_submission_required_by:, visa:, win:) + # @!attribute withdrawal + # If the Card Dispute has been withdrawn, this will contain details of the + # withdrawal. + # + # @return [Increase::Models::CardDispute::Withdrawal, nil] + required :withdrawal, -> { Increase::CardDispute::Withdrawal }, nil?: true + + # @!method initialize(id:, amount:, card_id:, created_at:, disputed_transaction_id:, idempotency_key:, loss:, network:, status:, type:, user_submission_required_by:, visa:, win:, withdrawal:) # Some parameter documentations has been truncated, see # {Increase::Models::CardDispute} for more details. # @@ -125,6 +132,8 @@ class CardDispute < Increase::Internal::Type::BaseModel # @param visa [Increase::Models::CardDispute::Visa, nil] Card Dispute information for card payments processed over Visa's network. This f # # @param win [Increase::Models::CardDispute::Win, nil] If the Card Dispute's status is `won`, this will contain details of the won disp + # + # @param withdrawal [Increase::Models::CardDispute::Withdrawal, nil] If the Card Dispute has been withdrawn, this will contain details of the withdra # @see Increase::Models::CardDispute#loss class Loss < Increase::Internal::Type::BaseModel @@ -5281,6 +5290,21 @@ class Win < Increase::Internal::Type::BaseModel # # @param won_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th end + + # @see Increase::Models::CardDispute#withdrawal + class Withdrawal < Increase::Internal::Type::BaseModel + # @!attribute explanation + # The explanation for the withdrawal of the Card Dispute. + # + # @return [String, nil] + required :explanation, String, nil?: true + + # @!method initialize(explanation:) + # If the Card Dispute has been withdrawn, this will contain details of the + # withdrawal. + # + # @param explanation [String, nil] The explanation for the withdrawal of the Card Dispute. + end end end end diff --git a/lib/increase/models/card_dispute_withdraw_params.rb b/lib/increase/models/card_dispute_withdraw_params.rb index a8c529fd..0ad5688e 100644 --- a/lib/increase/models/card_dispute_withdraw_params.rb +++ b/lib/increase/models/card_dispute_withdraw_params.rb @@ -7,7 +7,15 @@ class CardDisputeWithdrawParams < Increase::Internal::Type::BaseModel extend Increase::Internal::Type::RequestParameters::Converter include Increase::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute explanation + # The explanation for withdrawing the Card Dispute. + # + # @return [String, nil] + optional :explanation, String + + # @!method initialize(explanation: nil, request_options: {}) + # @param explanation [String] The explanation for withdrawing the Card Dispute. + # # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/increase/resources/card_disputes.rb b/lib/increase/resources/card_disputes.rb index 3bfc9a29..cf651ff4 100644 --- a/lib/increase/resources/card_disputes.rb +++ b/lib/increase/resources/card_disputes.rb @@ -129,21 +129,25 @@ def submit_user_submission(card_dispute_id, params) # Withdraw a Card Dispute # - # @overload withdraw(card_dispute_id, request_options: {}) + # @overload withdraw(card_dispute_id, explanation: nil, request_options: {}) # # @param card_dispute_id [String] The identifier of the Card Dispute to withdraw. # + # @param explanation [String] The explanation for withdrawing the Card Dispute. + # # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Increase::Models::CardDispute] # # @see Increase::Models::CardDisputeWithdrawParams def withdraw(card_dispute_id, params = {}) + parsed, options = Increase::CardDisputeWithdrawParams.dump_request(params) @client.request( method: :post, path: ["card_disputes/%1$s/withdraw", card_dispute_id], + body: parsed, model: Increase::CardDispute, - options: params[:request_options] + options: options ) end diff --git a/rbi/increase/models/card_dispute.rbi b/rbi/increase/models/card_dispute.rbi index 4f893beb..6ee41ba5 100644 --- a/rbi/increase/models/card_dispute.rbi +++ b/rbi/increase/models/card_dispute.rbi @@ -80,6 +80,18 @@ module Increase sig { params(win: T.nilable(Increase::CardDispute::Win::OrHash)).void } attr_writer :win + # If the Card Dispute has been withdrawn, this will contain details of the + # withdrawal. + sig { returns(T.nilable(Increase::CardDispute::Withdrawal)) } + attr_reader :withdrawal + + sig do + params( + withdrawal: T.nilable(Increase::CardDispute::Withdrawal::OrHash) + ).void + end + attr_writer :withdrawal + # If unauthorized activity occurs on a card, you can create a Card Dispute and # we'll work with the card networks to return the funds if appropriate. sig do @@ -96,7 +108,8 @@ module Increase type: Increase::CardDispute::Type::OrSymbol, user_submission_required_by: T.nilable(Time), visa: T.nilable(Increase::CardDispute::Visa::OrHash), - win: T.nilable(Increase::CardDispute::Win::OrHash) + win: T.nilable(Increase::CardDispute::Win::OrHash), + withdrawal: T.nilable(Increase::CardDispute::Withdrawal::OrHash) ).returns(T.attached_class) end def self.new( @@ -136,7 +149,10 @@ module Increase visa:, # If the Card Dispute's status is `won`, this will contain details of the won # dispute. - win: + win:, + # If the Card Dispute has been withdrawn, this will contain details of the + # withdrawal. + withdrawal: ) end @@ -155,7 +171,8 @@ module Increase type: Increase::CardDispute::Type::TaggedSymbol, user_submission_required_by: T.nilable(Time), visa: T.nilable(Increase::CardDispute::Visa), - win: T.nilable(Increase::CardDispute::Win) + win: T.nilable(Increase::CardDispute::Win), + withdrawal: T.nilable(Increase::CardDispute::Withdrawal) } ) end @@ -11066,6 +11083,33 @@ module Increase def to_hash end end + + class Withdrawal < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardDispute::Withdrawal, + Increase::Internal::AnyHash + ) + end + + # The explanation for the withdrawal of the Card Dispute. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + + # If the Card Dispute has been withdrawn, this will contain details of the + # withdrawal. + sig { params(explanation: T.nilable(String)).returns(T.attached_class) } + def self.new( + # The explanation for the withdrawal of the Card Dispute. + explanation: + ) + end + + sig { override.returns({ explanation: T.nilable(String) }) } + def to_hash + end + end end end end diff --git a/rbi/increase/models/card_dispute_withdraw_params.rbi b/rbi/increase/models/card_dispute_withdraw_params.rbi index 03df6a6d..004b955f 100644 --- a/rbi/increase/models/card_dispute_withdraw_params.rbi +++ b/rbi/increase/models/card_dispute_withdraw_params.rbi @@ -14,15 +14,31 @@ module Increase ) end + # The explanation for withdrawing the Card Dispute. + sig { returns(T.nilable(String)) } + attr_reader :explanation + + sig { params(explanation: String).void } + attr_writer :explanation + sig do - params(request_options: Increase::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + explanation: String, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new( + # The explanation for withdrawing the Card Dispute. + explanation: nil, + request_options: {} + ) end - sig { override.returns({ request_options: Increase::RequestOptions }) } + sig do + override.returns( + { explanation: String, request_options: Increase::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/increase/resources/card_disputes.rbi b/rbi/increase/resources/card_disputes.rbi index 6b00b159..1d2db7af 100644 --- a/rbi/increase/resources/card_disputes.rbi +++ b/rbi/increase/resources/card_disputes.rbi @@ -125,12 +125,15 @@ module Increase sig do params( card_dispute_id: String, + explanation: String, request_options: Increase::RequestOptions::OrHash ).returns(Increase::CardDispute) end def withdraw( # The identifier of the Card Dispute to withdraw. card_dispute_id, + # The explanation for withdrawing the Card Dispute. + explanation: nil, request_options: {} ) end diff --git a/sig/increase/models/card_dispute.rbs b/sig/increase/models/card_dispute.rbs index 490399be..d6943c55 100644 --- a/sig/increase/models/card_dispute.rbs +++ b/sig/increase/models/card_dispute.rbs @@ -14,7 +14,8 @@ module Increase type: Increase::Models::CardDispute::type_, user_submission_required_by: Time?, visa: Increase::CardDispute::Visa?, - win: Increase::CardDispute::Win? + win: Increase::CardDispute::Win?, + withdrawal: Increase::CardDispute::Withdrawal? } class CardDispute < Increase::Internal::Type::BaseModel @@ -44,6 +45,8 @@ module Increase attr_accessor win: Increase::CardDispute::Win? + attr_accessor withdrawal: Increase::CardDispute::Withdrawal? + def initialize: ( id: String, amount: Integer, @@ -57,7 +60,8 @@ module Increase type: Increase::Models::CardDispute::type_, user_submission_required_by: Time?, visa: Increase::CardDispute::Visa?, - win: Increase::CardDispute::Win? + win: Increase::CardDispute::Win?, + withdrawal: Increase::CardDispute::Withdrawal? ) -> void def to_hash: -> { @@ -73,7 +77,8 @@ module Increase type: Increase::Models::CardDispute::type_, user_submission_required_by: Time?, visa: Increase::CardDispute::Visa?, - win: Increase::CardDispute::Win? + win: Increase::CardDispute::Win?, + withdrawal: Increase::CardDispute::Withdrawal? } type loss = @@ -4097,6 +4102,16 @@ module Increase def to_hash: -> { won_at: Time } end + + type withdrawal = { explanation: String? } + + class Withdrawal < Increase::Internal::Type::BaseModel + attr_accessor explanation: String? + + def initialize: (explanation: String?) -> void + + def to_hash: -> { explanation: String? } + end end end end diff --git a/sig/increase/models/card_dispute_withdraw_params.rbs b/sig/increase/models/card_dispute_withdraw_params.rbs index 47d5f9b1..60adba0e 100644 --- a/sig/increase/models/card_dispute_withdraw_params.rbs +++ b/sig/increase/models/card_dispute_withdraw_params.rbs @@ -1,15 +1,25 @@ module Increase module Models type card_dispute_withdraw_params = - { } & Increase::Internal::Type::request_parameters + { explanation: String } & Increase::Internal::Type::request_parameters class CardDisputeWithdrawParams < Increase::Internal::Type::BaseModel extend Increase::Internal::Type::RequestParameters::Converter include Increase::Internal::Type::RequestParameters - def initialize: (?request_options: Increase::request_opts) -> void + attr_reader explanation: String? - def to_hash: -> { request_options: Increase::RequestOptions } + def explanation=: (String) -> String + + def initialize: ( + ?explanation: String, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + explanation: String, + request_options: Increase::RequestOptions + } end end end diff --git a/sig/increase/resources/card_disputes.rbs b/sig/increase/resources/card_disputes.rbs index 936f1614..e0708350 100644 --- a/sig/increase/resources/card_disputes.rbs +++ b/sig/increase/resources/card_disputes.rbs @@ -37,6 +37,7 @@ module Increase def withdraw: ( String card_dispute_id, + ?explanation: String, ?request_options: Increase::request_opts ) -> Increase::CardDispute diff --git a/test/increase/resources/card_disputes_test.rb b/test/increase/resources/card_disputes_test.rb index e95f1658..76253936 100644 --- a/test/increase/resources/card_disputes_test.rb +++ b/test/increase/resources/card_disputes_test.rb @@ -28,7 +28,8 @@ def test_create_required_params type: Increase::CardDispute::Type, user_submission_required_by: Time | nil, visa: Increase::CardDispute::Visa | nil, - win: Increase::CardDispute::Win | nil + win: Increase::CardDispute::Win | nil, + withdrawal: Increase::CardDispute::Withdrawal | nil } end end @@ -54,7 +55,8 @@ def test_retrieve type: Increase::CardDispute::Type, user_submission_required_by: Time | nil, visa: Increase::CardDispute::Visa | nil, - win: Increase::CardDispute::Win | nil + win: Increase::CardDispute::Win | nil, + withdrawal: Increase::CardDispute::Withdrawal | nil } end end @@ -87,7 +89,8 @@ def test_list type: Increase::CardDispute::Type, user_submission_required_by: Time | nil, visa: Increase::CardDispute::Visa | nil, - win: Increase::CardDispute::Win | nil + win: Increase::CardDispute::Win | nil, + withdrawal: Increase::CardDispute::Withdrawal | nil } end end @@ -114,7 +117,8 @@ def test_submit_user_submission_required_params type: Increase::CardDispute::Type, user_submission_required_by: Time | nil, visa: Increase::CardDispute::Visa | nil, - win: Increase::CardDispute::Win | nil + win: Increase::CardDispute::Win | nil, + withdrawal: Increase::CardDispute::Withdrawal | nil } end end @@ -140,7 +144,8 @@ def test_withdraw type: Increase::CardDispute::Type, user_submission_required_by: Time | nil, visa: Increase::CardDispute::Visa | nil, - win: Increase::CardDispute::Win | nil + win: Increase::CardDispute::Win | nil, + withdrawal: Increase::CardDispute::Withdrawal | nil } end end diff --git a/test/increase/resources/simulations/card_disputes_test.rb b/test/increase/resources/simulations/card_disputes_test.rb index b4b210d6..e7e131cf 100644 --- a/test/increase/resources/simulations/card_disputes_test.rb +++ b/test/increase/resources/simulations/card_disputes_test.rb @@ -25,7 +25,8 @@ def test_action_required_params type: Increase::CardDispute::Type, user_submission_required_by: Time | nil, visa: Increase::CardDispute::Visa | nil, - win: Increase::CardDispute::Win | nil + win: Increase::CardDispute::Win | nil, + withdrawal: Increase::CardDispute::Withdrawal | nil } end end From a1f8a8a095cb3b838357e692d79cd7a8413f3732 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 23:23:16 +0000 Subject: [PATCH 2/2] release: 1.186.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 0af6b3b1..2824a11a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.185.0" + ".": "1.186.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c4f87b..7eb61ad8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.186.0 (2026-01-28) + +Full Changelog: [v1.185.0...v1.186.0](https://github.com/Increase/increase-ruby/compare/v1.185.0...v1.186.0) + +### Features + +* **api:** api update ([390da85](https://github.com/Increase/increase-ruby/commit/390da85a509b0b81f7fd823cc5b956765dc1ba80)) + ## 1.185.0 (2026-01-27) Full Changelog: [v1.184.0...v1.185.0](https://github.com/Increase/increase-ruby/compare/v1.184.0...v1.185.0) diff --git a/Gemfile.lock b/Gemfile.lock index bc0beb91..fdb206af 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.185.0) + increase (1.186.0) cgi connection_pool diff --git a/README.md b/README.md index e738e4dd..26e2f07e 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.185.0" +gem "increase", "~> 1.186.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 3b878f81..d8f5934b 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.185.0" + VERSION = "1.186.0" end