diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b2091d64..d455ce9a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.152.0" + ".": "1.153.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index fe442fee..5c11eef9 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-f24e91d60005894c135a6ccad84e179e0a2cb64def7e1101904c430a8e5e5dd9.yml -openapi_spec_hash: a63e06588ae354c03b68d6cb9d965e11 -config_hash: ca1425272e17fa23d4466d33492334fa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d3646347697623deab851a220ce4b217e923bde3b3108af9eceb4da6df0534e2.yml +openapi_spec_hash: 516fabeef616c695941d3a4aa4051f76 +config_hash: b6f365add90e618b2174634df140826e diff --git a/CHANGELOG.md b/CHANGELOG.md index 50e23a7e..12920696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.153.0 (2025-12-04) + +Full Changelog: [v1.152.0...v1.153.0](https://github.com/Increase/increase-ruby/compare/v1.152.0...v1.153.0) + +### Features + +* **api:** api update ([91788b0](https://github.com/Increase/increase-ruby/commit/91788b00fe683e5af6cdf6856a689c4238c2620c)) + ## 1.152.0 (2025-12-01) Full Changelog: [v1.151.0...v1.152.0](https://github.com/Increase/increase-ruby/compare/v1.151.0...v1.152.0) diff --git a/Gemfile.lock b/Gemfile.lock index b73dbef1..ca519df2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.152.0) + increase (1.153.0) connection_pool GEM diff --git a/README.md b/README.md index 2690bd95..e4919c14 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.152.0" +gem "increase", "~> 1.153.0" ``` diff --git a/lib/increase/models/real_time_decision.rb b/lib/increase/models/real_time_decision.rb index f7e26e99..f3e0be34 100644 --- a/lib/increase/models/real_time_decision.rb +++ b/lib/increase/models/real_time_decision.rb @@ -256,6 +256,13 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts] required :additional_amounts, -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts } + # @!attribute approval + # Present if and only if `decision` is `approve`. Contains information related to + # the approval of the authorization. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::Approval, nil] + required :approval, -> { Increase::RealTimeDecision::CardAuthorization::Approval }, nil?: true + # @!attribute card_id # The identifier of the Card that is being authorized. # @@ -354,6 +361,13 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Integer, nil] required :network_risk_score, Integer, nil?: true + # @!attribute partial_approval_capability + # Whether or not the authorization supports partial approvals. + # + # @return [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::PartialApprovalCapability] + required :partial_approval_capability, + enum: -> { Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability } + # @!attribute physical_card_id # If the authorization was made in-person with a physical card, the Physical Card # that was used. @@ -424,7 +438,7 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Increase::Models::RealTimeDecision::CardAuthorization::Verification] required :verification, -> { Increase::RealTimeDecision::CardAuthorization::Verification } - # @!method initialize(account_id:, additional_amounts:, card_id:, decision:, decline:, digital_wallet_token_id:, direction:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, request_details:, settlement_amount:, settlement_currency:, terminal_id:, upcoming_card_payment_id:, verification:) + # @!method initialize(account_id:, additional_amounts:, approval:, card_id:, decision:, decline:, digital_wallet_token_id:, direction:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, partial_approval_capability:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, request_details:, settlement_amount:, settlement_currency:, terminal_id:, upcoming_card_payment_id:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::RealTimeDecision::CardAuthorization} for more details. # @@ -434,6 +448,8 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param additional_amounts [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge # + # @param approval [Increase::Models::RealTimeDecision::CardAuthorization::Approval, nil] Present if and only if `decision` is `approve`. Contains information related to + # # @param card_id [String] The identifier of the Card that is being authorized. # # @param decision [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Decision, nil] Whether or not the authorization was approved. @@ -464,6 +480,8 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param network_risk_score [Integer, nil] The risk score generated by the card network. For Visa this is the Visa Advanced # + # @param partial_approval_capability [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::PartialApprovalCapability] Whether or not the authorization supports partial approvals. + # # @param physical_card_id [String, nil] If the authorization was made in-person with a physical card, the Physical Card # # @param presentment_amount [Integer] The amount of the attempted authorization in the currency the card user sees at @@ -886,6 +904,26 @@ class Vision < Increase::Internal::Type::BaseModel end end + # @see Increase::Models::RealTimeDecision::CardAuthorization#approval + class Approval < Increase::Internal::Type::BaseModel + # @!attribute partial_amount + # If the authorization was partially approved, this field contains the approved + # amount in the minor unit of the settlement currency. + # + # @return [Integer, nil] + required :partial_amount, Integer, nil?: true + + # @!method initialize(partial_amount:) + # Some parameter documentations has been truncated, see + # {Increase::Models::RealTimeDecision::CardAuthorization::Approval} for more + # details. + # + # Present if and only if `decision` is `approve`. Contains information related to + # the approval of the authorization. + # + # @param partial_amount [Integer, nil] If the authorization was partially approved, this field contains the approved am + end + # Whether or not the authorization was approved. # # @see Increase::Models::RealTimeDecision::CardAuthorization#decision @@ -1231,6 +1269,22 @@ class NetworkIdentifiers < Increase::Internal::Type::BaseModel # @param transaction_id [String, nil] A globally unique transaction identifier provided by the card network, used acro end + # Whether or not the authorization supports partial approvals. + # + # @see Increase::Models::RealTimeDecision::CardAuthorization#partial_approval_capability + module PartialApprovalCapability + extend Increase::Internal::Type::Enum + + # This transaction supports partial approvals. + SUPPORTED = :supported + + # This transaction does not support partial approvals. + NOT_SUPPORTED = :not_supported + + # @!method self.values + # @return [Array] + end + # The processing category describes the intent behind the authorization, such as # whether it was used for bill payments or an automatic fuel dispenser. # diff --git a/lib/increase/models/real_time_decision_action_params.rb b/lib/increase/models/real_time_decision_action_params.rb index e5c60cbc..36dfc1b9 100644 --- a/lib/increase/models/real_time_decision_action_params.rb +++ b/lib/increase/models/real_time_decision_action_params.rb @@ -196,7 +196,16 @@ class Approval < Increase::Internal::Type::BaseModel optional :cardholder_address_verification_result, -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult } - # @!method initialize(cardholder_address_verification_result: nil) + # @!attribute partial_amount + # If the transaction supports partial approvals + # (`partial_approval_capability: supported`) the `partial_amount` can be provided + # in the transaction's settlement currency to approve a lower amount than was + # requested. + # + # @return [Integer, nil] + optional :partial_amount, Integer + + # @!method initialize(cardholder_address_verification_result: nil, partial_amount: nil) # Some parameter documentations has been truncated, see # {Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval} # for more details. @@ -207,6 +216,8 @@ class Approval < Increase::Internal::Type::BaseModel # but indicate the address does not match. # # @param cardholder_address_verification_result [Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult] Your decisions on whether or not each provided address component is a match. You + # + # @param partial_amount [Integer] If the transaction supports partial approvals (`partial_approval_capability: sup # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval#cardholder_address_verification_result class CardholderAddressVerificationResult < Increase::Internal::Type::BaseModel diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 276835c3..9d6cbf33 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.152.0" + VERSION = "1.153.0" end diff --git a/rbi/increase/models/real_time_decision.rbi b/rbi/increase/models/real_time_decision.rbi index b3f4a533..bbf316ba 100644 --- a/rbi/increase/models/real_time_decision.rbi +++ b/rbi/increase/models/real_time_decision.rbi @@ -463,6 +463,25 @@ module Increase end attr_writer :additional_amounts + # Present if and only if `decision` is `approve`. Contains information related to + # the approval of the authorization. + sig do + returns( + T.nilable(Increase::RealTimeDecision::CardAuthorization::Approval) + ) + end + attr_reader :approval + + sig do + params( + approval: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::Approval::OrHash + ) + ).void + end + attr_writer :approval + # The identifier of the Card that is being authorized. sig { returns(String) } attr_accessor :card_id @@ -577,6 +596,14 @@ module Increase sig { returns(T.nilable(Integer)) } attr_accessor :network_risk_score + # Whether or not the authorization supports partial approvals. + sig do + returns( + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability::TaggedSymbol + ) + end + attr_accessor :partial_approval_capability + # If the authorization was made in-person with a physical card, the Physical Card # that was used. sig { returns(T.nilable(String)) } @@ -656,6 +683,10 @@ module Increase account_id: String, additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::OrHash, + approval: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::Approval::OrHash + ), card_id: String, decision: T.nilable( @@ -680,6 +711,8 @@ module Increase network_identifiers: Increase::RealTimeDecision::CardAuthorization::NetworkIdentifiers::OrHash, network_risk_score: T.nilable(Integer), + partial_approval_capability: + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability::OrSymbol, physical_card_id: T.nilable(String), presentment_amount: Integer, presentment_currency: String, @@ -702,6 +735,9 @@ module Increase # surcharges fees. These are usually a subset of the `amount` field and are used # to provide more detailed information about the transaction. additional_amounts:, + # Present if and only if `decision` is `approve`. Contains information related to + # the approval of the authorization. + approval:, # The identifier of the Card that is being authorized. card_id:, # Whether or not the authorization was approved. @@ -740,6 +776,8 @@ module Increase # Authorization risk score, from 0 to 99, where 99 is the riskiest. For Pulse the # score is from 0 to 999, where 999 is the riskiest. network_risk_score:, + # Whether or not the authorization supports partial approvals. + partial_approval_capability:, # If the authorization was made in-person with a physical card, the Physical Card # that was used. physical_card_id:, @@ -778,6 +816,10 @@ module Increase account_id: String, additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, + approval: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::Approval + ), card_id: String, decision: T.nilable( @@ -802,6 +844,8 @@ module Increase network_identifiers: Increase::RealTimeDecision::CardAuthorization::NetworkIdentifiers, network_risk_score: T.nilable(Integer), + partial_approval_capability: + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability::TaggedSymbol, physical_card_id: T.nilable(String), presentment_amount: Integer, presentment_currency: String, @@ -1571,6 +1615,37 @@ module Increase end end + class Approval < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecision::CardAuthorization::Approval, + Increase::Internal::AnyHash + ) + end + + # If the authorization was partially approved, this field contains the approved + # amount in the minor unit of the settlement currency. + sig { returns(T.nilable(Integer)) } + attr_accessor :partial_amount + + # Present if and only if `decision` is `approve`. Contains information related to + # the approval of the authorization. + sig do + params(partial_amount: T.nilable(Integer)).returns(T.attached_class) + end + def self.new( + # If the authorization was partially approved, this field contains the approved + # amount in the minor unit of the settlement currency. + partial_amount: + ) + end + + sig { override.returns({ partial_amount: T.nilable(Integer) }) } + def to_hash + end + end + # Whether or not the authorization was approved. module Decision extend Increase::Internal::Type::Enum @@ -2333,6 +2408,44 @@ module Increase end end + # Whether or not the authorization supports partial approvals. + module PartialApprovalCapability + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # This transaction supports partial approvals. + SUPPORTED = + T.let( + :supported, + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability::TaggedSymbol + ) + + # This transaction does not support partial approvals. + NOT_SUPPORTED = + T.let( + :not_supported, + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::RealTimeDecision::CardAuthorization::PartialApprovalCapability::TaggedSymbol + ] + ) + end + def self.values + end + end + # The processing category describes the intent behind the authorization, such as # whether it was used for bill payments or an automatic fuel dispenser. module ProcessingCategory diff --git a/rbi/increase/models/real_time_decision_action_params.rbi b/rbi/increase/models/real_time_decision_action_params.rbi index 7328c0a9..8814a8de 100644 --- a/rbi/increase/models/real_time_decision_action_params.rbi +++ b/rbi/increase/models/real_time_decision_action_params.rbi @@ -498,6 +498,16 @@ module Increase end attr_writer :cardholder_address_verification_result + # If the transaction supports partial approvals + # (`partial_approval_capability: supported`) the `partial_amount` can be provided + # in the transaction's settlement currency to approve a lower amount than was + # requested. + sig { returns(T.nilable(Integer)) } + attr_reader :partial_amount + + sig { params(partial_amount: Integer).void } + attr_writer :partial_amount + # If your application approves the authorization, this contains metadata about # your decision to approve. Your response here is advisory to the acquiring bank. # The bank may choose to reverse the authorization if you approve the transaction @@ -505,7 +515,8 @@ module Increase sig do params( cardholder_address_verification_result: - Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::OrHash + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::OrHash, + partial_amount: Integer ).returns(T.attached_class) end def self.new( @@ -515,7 +526,12 @@ module Increase # information, see our # [Address Verification System Codes and Overrides](https://increase.com/documentation/address-verification-system-codes-and-overrides) # guide. - cardholder_address_verification_result: nil + cardholder_address_verification_result: nil, + # If the transaction supports partial approvals + # (`partial_approval_capability: supported`) the `partial_amount` can be provided + # in the transaction's settlement currency to approve a lower amount than was + # requested. + partial_amount: nil ) end @@ -523,7 +539,8 @@ module Increase override.returns( { cardholder_address_verification_result: - Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult, + partial_amount: Integer } ) end diff --git a/sig/increase/models/real_time_decision.rbs b/sig/increase/models/real_time_decision.rbs index 16ce276b..eb3d95cc 100644 --- a/sig/increase/models/real_time_decision.rbs +++ b/sig/increase/models/real_time_decision.rbs @@ -170,6 +170,7 @@ module Increase { account_id: String, additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, + approval: Increase::RealTimeDecision::CardAuthorization::Approval?, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, decline: Increase::RealTimeDecision::CardAuthorization::Decline?, @@ -185,6 +186,7 @@ module Increase network_details: Increase::RealTimeDecision::CardAuthorization::NetworkDetails, network_identifiers: Increase::RealTimeDecision::CardAuthorization::NetworkIdentifiers, network_risk_score: Integer?, + partial_approval_capability: Increase::Models::RealTimeDecision::CardAuthorization::partial_approval_capability, physical_card_id: String?, presentment_amount: Integer, presentment_currency: String, @@ -202,6 +204,8 @@ module Increase attr_accessor additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts + attr_accessor approval: Increase::RealTimeDecision::CardAuthorization::Approval? + attr_accessor card_id: String attr_accessor decision: Increase::Models::RealTimeDecision::CardAuthorization::decision? @@ -232,6 +236,8 @@ module Increase attr_accessor network_risk_score: Integer? + attr_accessor partial_approval_capability: Increase::Models::RealTimeDecision::CardAuthorization::partial_approval_capability + attr_accessor physical_card_id: String? attr_accessor presentment_amount: Integer @@ -255,6 +261,7 @@ module Increase def initialize: ( account_id: String, additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, + approval: Increase::RealTimeDecision::CardAuthorization::Approval?, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, decline: Increase::RealTimeDecision::CardAuthorization::Decline?, @@ -270,6 +277,7 @@ module Increase network_details: Increase::RealTimeDecision::CardAuthorization::NetworkDetails, network_identifiers: Increase::RealTimeDecision::CardAuthorization::NetworkIdentifiers, network_risk_score: Integer?, + partial_approval_capability: Increase::Models::RealTimeDecision::CardAuthorization::partial_approval_capability, physical_card_id: String?, presentment_amount: Integer, presentment_currency: String, @@ -285,6 +293,7 @@ module Increase def to_hash: -> { account_id: String, additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, + approval: Increase::RealTimeDecision::CardAuthorization::Approval?, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, decline: Increase::RealTimeDecision::CardAuthorization::Decline?, @@ -300,6 +309,7 @@ module Increase network_details: Increase::RealTimeDecision::CardAuthorization::NetworkDetails, network_identifiers: Increase::RealTimeDecision::CardAuthorization::NetworkIdentifiers, network_risk_score: Integer?, + partial_approval_capability: Increase::Models::RealTimeDecision::CardAuthorization::partial_approval_capability, physical_card_id: String?, presentment_amount: Integer, presentment_currency: String, @@ -494,6 +504,16 @@ module Increase end end + type approval = { partial_amount: Integer? } + + class Approval < Increase::Internal::Type::BaseModel + attr_accessor partial_amount: Integer? + + def initialize: (partial_amount: Integer?) -> void + + def to_hash: -> { partial_amount: Integer? } + end + type decision = :approve | :decline module Decision @@ -803,6 +823,20 @@ module Increase } end + type partial_approval_capability = :supported | :not_supported + + module PartialApprovalCapability + extend Increase::Internal::Type::Enum + + # This transaction supports partial approvals. + SUPPORTED: :supported + + # This transaction does not support partial approvals. + NOT_SUPPORTED: :not_supported + + def self?.values: -> ::Array[Increase::Models::RealTimeDecision::CardAuthorization::partial_approval_capability] + end + type processing_category = :account_funding | :automatic_fuel_dispenser diff --git a/sig/increase/models/real_time_decision_action_params.rbs b/sig/increase/models/real_time_decision_action_params.rbs index 5cb20478..671c03c9 100644 --- a/sig/increase/models/real_time_decision_action_params.rbs +++ b/sig/increase/models/real_time_decision_action_params.rbs @@ -177,7 +177,8 @@ module Increase type approval = { - cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult, + partial_amount: Integer } class Approval < Increase::Internal::Type::BaseModel @@ -187,12 +188,18 @@ module Increase Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult ) -> Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + attr_reader partial_amount: Integer? + + def partial_amount=: (Integer) -> Integer + def initialize: ( - ?cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + ?cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult, + ?partial_amount: Integer ) -> void def to_hash: -> { - cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult, + partial_amount: Integer } type cardholder_address_verification_result =