From 70549b5f5c04bd68309c448849df43ced96e48c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 20:48:00 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- lib/increase/models/real_time_decision.rb | 34 ++++++++- rbi/increase/models/real_time_decision.rbi | 88 +++++++++++++++++++++- sig/increase/models/real_time_decision.rbs | 47 +++++++++++- 4 files changed, 161 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index ea9c085b..94f44024 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfdb6b2516039e7537ec6edb67df5581e3f08396a9f92579dd42c565015583e6.yml -openapi_spec_hash: c41230e467198f4240e80c77ef8c5c7c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a66f039751a4ffdebbbf533f24f55cd2c42708b9cf105512849849fddaafb5e8.yml +openapi_spec_hash: c265609bceb053f898ea14b1191fe927 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/lib/increase/models/real_time_decision.rb b/lib/increase/models/real_time_decision.rb index a6fb0573..f7e26e99 100644 --- a/lib/increase/models/real_time_decision.rb +++ b/lib/increase/models/real_time_decision.rb @@ -907,14 +907,42 @@ class Decline < Increase::Internal::Type::BaseModel # @!attribute reason # The reason the authorization was declined. # - # @return [String] - required :reason, String + # @return [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Decline::Reason] + required :reason, enum: -> { Increase::RealTimeDecision::CardAuthorization::Decline::Reason } # @!method initialize(reason:) # Present if and only if `decision` is `decline`. Contains information related to # the reason the authorization was declined. # - # @param reason [String] The reason the authorization was declined. + # @param reason [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Decline::Reason] The reason the authorization was declined. + + # The reason the authorization was declined. + # + # @see Increase::Models::RealTimeDecision::CardAuthorization::Decline#reason + module Reason + extend Increase::Internal::Type::Enum + + # The cardholder does not have sufficient funds to cover the transaction. The merchant may attempt to process the transaction again. + INSUFFICIENT_FUNDS = :insufficient_funds + + # This type of transaction is not allowed for this card. This transaction should not be retried. + TRANSACTION_NEVER_ALLOWED = :transaction_never_allowed + + # The transaction amount exceeds the cardholder's approval limit. The merchant may attempt to process the transaction again. + EXCEEDS_APPROVAL_LIMIT = :exceeds_approval_limit + + # The card has been temporarily disabled or not yet activated. The merchant may attempt to process the transaction again. + CARD_TEMPORARILY_DISABLED = :card_temporarily_disabled + + # The transaction is suspected to be fraudulent. The merchant may attempt to process the transaction again. + SUSPECTED_FRAUD = :suspected_fraud + + # The transaction was declined for another reason. The merchant may attempt to process the transaction again. This should be used sparingly. + OTHER = :other + + # @!method self.values + # @return [Array] + end end # The direction describes the direction the funds will move, either from the diff --git a/rbi/increase/models/real_time_decision.rbi b/rbi/increase/models/real_time_decision.rbi index 715b2d05..b3f4a533 100644 --- a/rbi/increase/models/real_time_decision.rbi +++ b/rbi/increase/models/real_time_decision.rbi @@ -1619,21 +1619,103 @@ module Increase end # The reason the authorization was declined. - sig { returns(String) } + sig do + returns( + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + end attr_accessor :reason # Present if and only if `decision` is `decline`. Contains information related to # the reason the authorization was declined. - sig { params(reason: String).returns(T.attached_class) } + sig do + params( + reason: + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::OrSymbol + ).returns(T.attached_class) + end def self.new( # The reason the authorization was declined. reason: ) end - sig { override.returns({ reason: String }) } + sig do + override.returns( + { + reason: + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + } + ) + end def to_hash end + + # The reason the authorization was declined. + module Reason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder does not have sufficient funds to cover the transaction. The merchant may attempt to process the transaction again. + INSUFFICIENT_FUNDS = + T.let( + :insufficient_funds, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + # This type of transaction is not allowed for this card. This transaction should not be retried. + TRANSACTION_NEVER_ALLOWED = + T.let( + :transaction_never_allowed, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + # The transaction amount exceeds the cardholder's approval limit. The merchant may attempt to process the transaction again. + EXCEEDS_APPROVAL_LIMIT = + T.let( + :exceeds_approval_limit, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + # The card has been temporarily disabled or not yet activated. The merchant may attempt to process the transaction again. + CARD_TEMPORARILY_DISABLED = + T.let( + :card_temporarily_disabled, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + # The transaction is suspected to be fraudulent. The merchant may attempt to process the transaction again. + SUSPECTED_FRAUD = + T.let( + :suspected_fraud, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + # The transaction was declined for another reason. The merchant may attempt to process the transaction again. This should be used sparingly. + OTHER = + T.let( + :other, + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::RealTimeDecision::CardAuthorization::Decline::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end end # The direction describes the direction the funds will move, either from the diff --git a/sig/increase/models/real_time_decision.rbs b/sig/increase/models/real_time_decision.rbs index dc600c64..16ce276b 100644 --- a/sig/increase/models/real_time_decision.rbs +++ b/sig/increase/models/real_time_decision.rbs @@ -508,14 +508,53 @@ module Increase def self?.values: -> ::Array[Increase::Models::RealTimeDecision::CardAuthorization::decision] end - type decline = { reason: String } + type decline = + { + reason: Increase::Models::RealTimeDecision::CardAuthorization::Decline::reason + } class Decline < Increase::Internal::Type::BaseModel - attr_accessor reason: String + attr_accessor reason: Increase::Models::RealTimeDecision::CardAuthorization::Decline::reason - def initialize: (reason: String) -> void + def initialize: ( + reason: Increase::Models::RealTimeDecision::CardAuthorization::Decline::reason + ) -> void - def to_hash: -> { reason: String } + def to_hash: -> { + reason: Increase::Models::RealTimeDecision::CardAuthorization::Decline::reason + } + + type reason = + :insufficient_funds + | :transaction_never_allowed + | :exceeds_approval_limit + | :card_temporarily_disabled + | :suspected_fraud + | :other + + module Reason + extend Increase::Internal::Type::Enum + + # The cardholder does not have sufficient funds to cover the transaction. The merchant may attempt to process the transaction again. + INSUFFICIENT_FUNDS: :insufficient_funds + + # This type of transaction is not allowed for this card. This transaction should not be retried. + TRANSACTION_NEVER_ALLOWED: :transaction_never_allowed + + # The transaction amount exceeds the cardholder's approval limit. The merchant may attempt to process the transaction again. + EXCEEDS_APPROVAL_LIMIT: :exceeds_approval_limit + + # The card has been temporarily disabled or not yet activated. The merchant may attempt to process the transaction again. + CARD_TEMPORARILY_DISABLED: :card_temporarily_disabled + + # The transaction is suspected to be fraudulent. The merchant may attempt to process the transaction again. + SUSPECTED_FRAUD: :suspected_fraud + + # The transaction was declined for another reason. The merchant may attempt to process the transaction again. This should be used sparingly. + OTHER: :other + + def self?.values: -> ::Array[Increase::Models::RealTimeDecision::CardAuthorization::Decline::reason] + end end type direction = :settlement | :refund From 8d8575c5191e2f0b1aa2eb15abdf3f948dfbb80e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 20:48:23 +0000 Subject: [PATCH 2/2] release: 1.148.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 5fbc9d62..2b131771 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.147.0" + ".": "1.148.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 648be35c..c735ab75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.148.0 (2025-11-24) + +Full Changelog: [v1.147.0...v1.148.0](https://github.com/Increase/increase-ruby/compare/v1.147.0...v1.148.0) + +### Features + +* **api:** api update ([70549b5](https://github.com/Increase/increase-ruby/commit/70549b5f5c04bd68309c448849df43ced96e48c8)) + ## 1.147.0 (2025-11-21) Full Changelog: [v1.146.0...v1.147.0](https://github.com/Increase/increase-ruby/compare/v1.146.0...v1.147.0) diff --git a/Gemfile.lock b/Gemfile.lock index d5773e7a..fde214c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.147.0) + increase (1.148.0) connection_pool GEM diff --git a/README.md b/README.md index eb4c31e4..72ef11a6 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.147.0" +gem "increase", "~> 1.148.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index ae69e46c..27f489c8 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.147.0" + VERSION = "1.148.0" end