From d0dd7a857cdca3db358aef4c46530944d606851f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 01:34:04 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 8 +- lib/increase.rb | 2 + .../card_balance_inquiry_create_params.rb | 279 +++++++++ lib/increase/resources/simulations.rb | 4 + .../simulations/card_balance_inquiries.rb | 70 +++ .../card_balance_inquiry_create_params.rbi | 587 ++++++++++++++++++ rbi/increase/resources/simulations.rbi | 3 + .../simulations/card_balance_inquiries.rbi | 80 +++ .../card_balance_inquiry_create_params.rbs | 294 +++++++++ sig/increase/resources/simulations.rbs | 2 + .../simulations/card_balance_inquiries.rbs | 28 + .../card_balance_inquiries_test.rb | 27 + 12 files changed, 1380 insertions(+), 4 deletions(-) create mode 100644 lib/increase/models/simulations/card_balance_inquiry_create_params.rb create mode 100644 lib/increase/resources/simulations/card_balance_inquiries.rb create mode 100644 rbi/increase/models/simulations/card_balance_inquiry_create_params.rbi create mode 100644 rbi/increase/resources/simulations/card_balance_inquiries.rbi create mode 100644 sig/increase/models/simulations/card_balance_inquiry_create_params.rbs create mode 100644 sig/increase/resources/simulations/card_balance_inquiries.rbs create mode 100644 test/increase/resources/simulations/card_balance_inquiries_test.rb diff --git a/.stats.yml b/.stats.yml index f5d26caa..f4cd3049 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-79f55910f087930ab5447372ef856ab63fe18f08d2151c59b8aebcccd6f41700.yml -openapi_spec_hash: 5b6d915106e3361863168d9b084a570c -config_hash: b6f365add90e618b2174634df140826e +configured_endpoints: 230 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6f7d8729d517e528b4a2bad402f49122fdf982be7b2df213c393e0d692cef7e7.yml +openapi_spec_hash: bd048174c7a122d23818810434e7881d +config_hash: dd86da070cc89eb6d3868bf23764c847 diff --git a/lib/increase.rb b/lib/increase.rb index e8d5b5a4..bdc271ae 100644 --- a/lib/increase.rb +++ b/lib/increase.rb @@ -299,6 +299,7 @@ require_relative "increase/models/simulations/card_authorization_create_params" require_relative "increase/models/simulations/card_authorization_create_response" require_relative "increase/models/simulations/card_authorization_expiration_create_params" +require_relative "increase/models/simulations/card_balance_inquiry_create_params" require_relative "increase/models/simulations/card_dispute_action_params" require_relative "increase/models/simulations/card_fuel_confirmation_create_params" require_relative "increase/models/simulations/card_increment_create_params" @@ -404,6 +405,7 @@ require_relative "increase/resources/simulations/ach_transfers" require_relative "increase/resources/simulations/card_authorization_expirations" require_relative "increase/resources/simulations/card_authorizations" +require_relative "increase/resources/simulations/card_balance_inquiries" require_relative "increase/resources/simulations/card_disputes" require_relative "increase/resources/simulations/card_fuel_confirmations" require_relative "increase/resources/simulations/card_increments" diff --git a/lib/increase/models/simulations/card_balance_inquiry_create_params.rb b/lib/increase/models/simulations/card_balance_inquiry_create_params.rb new file mode 100644 index 00000000..8d87149d --- /dev/null +++ b/lib/increase/models/simulations/card_balance_inquiry_create_params.rb @@ -0,0 +1,279 @@ +# frozen_string_literal: true + +module Increase + module Models + module Simulations + # @see Increase::Resources::Simulations::CardBalanceInquiries#create + class CardBalanceInquiryCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + # @!attribute balance + # The balance amount in cents. The account balance will be used if not provided. + # + # @return [Integer, nil] + optional :balance, Integer + + # @!attribute card_id + # The identifier of the Card to be authorized. + # + # @return [String, nil] + optional :card_id, String + + # @!attribute decline_reason + # Forces a card decline with a specific reason. No real time decision will be + # sent. + # + # @return [Symbol, Increase::Models::Simulations::CardBalanceInquiryCreateParams::DeclineReason, nil] + optional :decline_reason, + enum: -> { Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason } + + # @!attribute digital_wallet_token_id + # The identifier of the Digital Wallet Token to be authorized. + # + # @return [String, nil] + optional :digital_wallet_token_id, String + + # @!attribute event_subscription_id + # The identifier of the Event Subscription to use. If provided, will override the + # default real time event subscription. Because you can only create one real time + # decision event subscription, you can use this field to route events to any + # specified event subscription for testing purposes. + # + # @return [String, nil] + optional :event_subscription_id, String + + # @!attribute merchant_acceptor_id + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + # + # @return [String, nil] + optional :merchant_acceptor_id, String + + # @!attribute merchant_category_code + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + # + # @return [String, nil] + optional :merchant_category_code, String + + # @!attribute merchant_city + # The city the merchant resides in. + # + # @return [String, nil] + optional :merchant_city, String + + # @!attribute merchant_country + # The country the merchant resides in. + # + # @return [String, nil] + optional :merchant_country, String + + # @!attribute merchant_descriptor + # The merchant descriptor of the merchant the card is transacting with. + # + # @return [String, nil] + optional :merchant_descriptor, String + + # @!attribute merchant_state + # The state the merchant resides in. + # + # @return [String, nil] + optional :merchant_state, String + + # @!attribute network_details + # Fields specific to a given card network. + # + # @return [Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, nil] + optional :network_details, -> { Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails } + + # @!attribute network_risk_score + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + # + # @return [Integer, nil] + optional :network_risk_score, Integer + + # @!attribute physical_card_id + # The identifier of the Physical Card to be authorized. + # + # @return [String, nil] + optional :physical_card_id, String + + # @!attribute terminal_id + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + # + # @return [String, nil] + optional :terminal_id, String + + # @!method initialize(balance: nil, card_id: nil, decline_reason: nil, digital_wallet_token_id: nil, event_subscription_id: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_city: nil, merchant_country: nil, merchant_descriptor: nil, merchant_state: nil, network_details: nil, network_risk_score: nil, physical_card_id: nil, terminal_id: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Increase::Models::Simulations::CardBalanceInquiryCreateParams} for more + # details. + # + # @param balance [Integer] The balance amount in cents. The account balance will be used if not provided. + # + # @param card_id [String] The identifier of the Card to be authorized. + # + # @param decline_reason [Symbol, Increase::Models::Simulations::CardBalanceInquiryCreateParams::DeclineReason] Forces a card decline with a specific reason. No real time decision will be sent + # + # @param digital_wallet_token_id [String] The identifier of the Digital Wallet Token to be authorized. + # + # @param event_subscription_id [String] The identifier of the Event Subscription to use. If provided, will override the + # + # @param merchant_acceptor_id [String] The merchant identifier (commonly abbreviated as MID) of the merchant the card i + # + # @param merchant_category_code [String] The Merchant Category Code (commonly abbreviated as MCC) of the merchant the car + # + # @param merchant_city [String] The city the merchant resides in. + # + # @param merchant_country [String] The country the merchant resides in. + # + # @param merchant_descriptor [String] The merchant descriptor of the merchant the card is transacting with. + # + # @param merchant_state [String] The state the merchant resides in. + # + # @param network_details [Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails] Fields specific to a given card network. + # + # @param network_risk_score [Integer] The risk score generated by the card network. For Visa this is the Visa Advanced + # + # @param physical_card_id [String] The identifier of the Physical Card to be authorized. + # + # @param terminal_id [String] The terminal identifier (commonly abbreviated as TID) of the terminal the card i + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}] + + # Forces a card decline with a specific reason. No real time decision will be + # sent. + module DeclineReason + extend Increase::Internal::Type::Enum + + # The account has been closed. + ACCOUNT_CLOSED = :account_closed + + # The Card was not active. + CARD_NOT_ACTIVE = :card_not_active + + # The Card has been canceled. + CARD_CANCELED = :card_canceled + + # The Physical Card was not active. + PHYSICAL_CARD_NOT_ACTIVE = :physical_card_not_active + + # The account's entity was not active. + ENTITY_NOT_ACTIVE = :entity_not_active + + # The account was inactive. + GROUP_LOCKED = :group_locked + + # The Card's Account did not have a sufficient available balance. + INSUFFICIENT_FUNDS = :insufficient_funds + + # The given CVV2 did not match the card's value. + CVV2_MISMATCH = :cvv2_mismatch + + # The given PIN did not match the card's value. + PIN_MISMATCH = :pin_mismatch + + # The given expiration date did not match the card's value. Only applies when a CVV2 is present. + CARD_EXPIRATION_MISMATCH = :card_expiration_mismatch + + # The attempted card transaction is not allowed per Increase's terms. + TRANSACTION_NOT_ALLOWED = :transaction_not_allowed + + # The transaction was blocked by a Limit. + BREACHES_LIMIT = :breaches_limit + + # Your application declined the transaction via webhook. + WEBHOOK_DECLINED = :webhook_declined + + # Your application webhook did not respond without the required timeout. + WEBHOOK_TIMED_OUT = :webhook_timed_out + + # Declined by stand-in processing. + DECLINED_BY_STAND_IN_PROCESSING = :declined_by_stand_in_processing + + # The card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = :invalid_physical_card + + # The original card authorization for this incremental authorization does not exist. + MISSING_ORIGINAL_AUTHORIZATION = :missing_original_authorization + + # The transaction was declined because the 3DS authentication failed. + FAILED_3DS_AUTHENTICATION = :failed_3ds_authentication + + # The transaction was suspected to be used by a card tester to test for valid card numbers. + SUSPECTED_CARD_TESTING = :suspected_card_testing + + # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. + SUSPECTED_FRAUD = :suspected_fraud + + # @!method self.values + # @return [Array] + end + + class NetworkDetails < Increase::Internal::Type::BaseModel + # @!attribute visa + # Fields specific to the Visa network. + # + # @return [Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa] + required :visa, -> { Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa } + + # @!method initialize(visa:) + # Fields specific to a given card network. + # + # @param visa [Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa] Fields specific to the Visa network. + + # @see Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails#visa + class Visa < Increase::Internal::Type::BaseModel + # @!attribute stand_in_processing_reason + # The reason code for the stand-in processing. + # + # @return [Symbol, Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason, nil] + optional :stand_in_processing_reason, + enum: -> { Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason } + + # @!method initialize(stand_in_processing_reason: nil) + # Fields specific to the Visa network. + # + # @param stand_in_processing_reason [Symbol, Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason] The reason code for the stand-in processing. + + # The reason code for the stand-in processing. + # + # @see Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa#stand_in_processing_reason + module StandInProcessingReason + extend Increase::Internal::Type::Enum + + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR = :issuer_error + + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = :invalid_physical_card + + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE = + :invalid_cardholder_authentication_verification_value + + # An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays. + INTERNAL_VISA_ERROR = :internal_visa_error + + # The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED = + :merchant_transaction_advisory_service_authentication_required + + # The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing. + PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK = :payment_fraud_disruption_acquirer_block + + # An unspecific reason for stand-in processing. + OTHER = :other + + # @!method self.values + # @return [Array] + end + end + end + end + end + end +end diff --git a/lib/increase/resources/simulations.rb b/lib/increase/resources/simulations.rb index 5332f8e4..8618761a 100644 --- a/lib/increase/resources/simulations.rb +++ b/lib/increase/resources/simulations.rb @@ -12,6 +12,9 @@ class Simulations # @return [Increase::Resources::Simulations::CardAuthorizations] attr_reader :card_authorizations + # @return [Increase::Resources::Simulations::CardBalanceInquiries] + attr_reader :card_balance_inquiries + # @return [Increase::Resources::Simulations::CardAuthorizationExpirations] attr_reader :card_authorization_expirations @@ -101,6 +104,7 @@ def initialize(client:) @interest_payments = Increase::Resources::Simulations::InterestPayments.new(client: client) @account_transfers = Increase::Resources::Simulations::AccountTransfers.new(client: client) @card_authorizations = Increase::Resources::Simulations::CardAuthorizations.new(client: client) + @card_balance_inquiries = Increase::Resources::Simulations::CardBalanceInquiries.new(client: client) @card_authorization_expirations = Increase::Resources::Simulations::CardAuthorizationExpirations.new(client: client) @card_settlements = Increase::Resources::Simulations::CardSettlements.new(client: client) diff --git a/lib/increase/resources/simulations/card_balance_inquiries.rb b/lib/increase/resources/simulations/card_balance_inquiries.rb new file mode 100644 index 00000000..eb2eec9b --- /dev/null +++ b/lib/increase/resources/simulations/card_balance_inquiries.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +module Increase + module Resources + class Simulations + class CardBalanceInquiries + # Some parameter documentations has been truncated, see + # {Increase::Models::Simulations::CardBalanceInquiryCreateParams} for more + # details. + # + # Simulates a balance inquiry on a [Card](#cards). + # + # @overload create(balance: nil, card_id: nil, decline_reason: nil, digital_wallet_token_id: nil, event_subscription_id: nil, merchant_acceptor_id: nil, merchant_category_code: nil, merchant_city: nil, merchant_country: nil, merchant_descriptor: nil, merchant_state: nil, network_details: nil, network_risk_score: nil, physical_card_id: nil, terminal_id: nil, request_options: {}) + # + # @param balance [Integer] The balance amount in cents. The account balance will be used if not provided. + # + # @param card_id [String] The identifier of the Card to be authorized. + # + # @param decline_reason [Symbol, Increase::Models::Simulations::CardBalanceInquiryCreateParams::DeclineReason] Forces a card decline with a specific reason. No real time decision will be sent + # + # @param digital_wallet_token_id [String] The identifier of the Digital Wallet Token to be authorized. + # + # @param event_subscription_id [String] The identifier of the Event Subscription to use. If provided, will override the + # + # @param merchant_acceptor_id [String] The merchant identifier (commonly abbreviated as MID) of the merchant the card i + # + # @param merchant_category_code [String] The Merchant Category Code (commonly abbreviated as MCC) of the merchant the car + # + # @param merchant_city [String] The city the merchant resides in. + # + # @param merchant_country [String] The country the merchant resides in. + # + # @param merchant_descriptor [String] The merchant descriptor of the merchant the card is transacting with. + # + # @param merchant_state [String] The state the merchant resides in. + # + # @param network_details [Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails] Fields specific to a given card network. + # + # @param network_risk_score [Integer] The risk score generated by the card network. For Visa this is the Visa Advanced + # + # @param physical_card_id [String] The identifier of the Physical Card to be authorized. + # + # @param terminal_id [String] The terminal identifier (commonly abbreviated as TID) of the terminal the card i + # + # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Increase::Models::CardPayment] + # + # @see Increase::Models::Simulations::CardBalanceInquiryCreateParams + def create(params = {}) + parsed, options = Increase::Simulations::CardBalanceInquiryCreateParams.dump_request(params) + @client.request( + method: :post, + path: "simulations/card_balance_inquiries", + body: parsed, + model: Increase::CardPayment, + options: options + ) + end + + # @api private + # + # @param client [Increase::Client] + def initialize(client:) + @client = client + end + end + end + end +end diff --git a/rbi/increase/models/simulations/card_balance_inquiry_create_params.rbi b/rbi/increase/models/simulations/card_balance_inquiry_create_params.rbi new file mode 100644 index 00000000..7f50596b --- /dev/null +++ b/rbi/increase/models/simulations/card_balance_inquiry_create_params.rbi @@ -0,0 +1,587 @@ +# typed: strong + +module Increase + module Models + module Simulations + class CardBalanceInquiryCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Increase::Simulations::CardBalanceInquiryCreateParams, + Increase::Internal::AnyHash + ) + end + + # The balance amount in cents. The account balance will be used if not provided. + sig { returns(T.nilable(Integer)) } + attr_reader :balance + + sig { params(balance: Integer).void } + attr_writer :balance + + # The identifier of the Card to be authorized. + sig { returns(T.nilable(String)) } + attr_reader :card_id + + sig { params(card_id: String).void } + attr_writer :card_id + + # Forces a card decline with a specific reason. No real time decision will be + # sent. + sig do + returns( + T.nilable( + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol + ) + ) + end + attr_reader :decline_reason + + sig do + params( + decline_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol + ).void + end + attr_writer :decline_reason + + # The identifier of the Digital Wallet Token to be authorized. + sig { returns(T.nilable(String)) } + attr_reader :digital_wallet_token_id + + sig { params(digital_wallet_token_id: String).void } + attr_writer :digital_wallet_token_id + + # The identifier of the Event Subscription to use. If provided, will override the + # default real time event subscription. Because you can only create one real time + # decision event subscription, you can use this field to route events to any + # specified event subscription for testing purposes. + sig { returns(T.nilable(String)) } + attr_reader :event_subscription_id + + sig { params(event_subscription_id: String).void } + attr_writer :event_subscription_id + + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + sig { returns(T.nilable(String)) } + attr_reader :merchant_acceptor_id + + sig { params(merchant_acceptor_id: String).void } + attr_writer :merchant_acceptor_id + + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + sig { returns(T.nilable(String)) } + attr_reader :merchant_category_code + + sig { params(merchant_category_code: String).void } + attr_writer :merchant_category_code + + # The city the merchant resides in. + sig { returns(T.nilable(String)) } + attr_reader :merchant_city + + sig { params(merchant_city: String).void } + attr_writer :merchant_city + + # The country the merchant resides in. + sig { returns(T.nilable(String)) } + attr_reader :merchant_country + + sig { params(merchant_country: String).void } + attr_writer :merchant_country + + # The merchant descriptor of the merchant the card is transacting with. + sig { returns(T.nilable(String)) } + attr_reader :merchant_descriptor + + sig { params(merchant_descriptor: String).void } + attr_writer :merchant_descriptor + + # The state the merchant resides in. + sig { returns(T.nilable(String)) } + attr_reader :merchant_state + + sig { params(merchant_state: String).void } + attr_writer :merchant_state + + # Fields specific to a given card network. + sig do + returns( + T.nilable( + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails + ) + ) + end + attr_reader :network_details + + sig do + params( + network_details: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::OrHash + ).void + end + attr_writer :network_details + + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + sig { returns(T.nilable(Integer)) } + attr_reader :network_risk_score + + sig { params(network_risk_score: Integer).void } + attr_writer :network_risk_score + + # The identifier of the Physical Card to be authorized. + sig { returns(T.nilable(String)) } + attr_reader :physical_card_id + + sig { params(physical_card_id: String).void } + attr_writer :physical_card_id + + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + sig { returns(T.nilable(String)) } + attr_reader :terminal_id + + sig { params(terminal_id: String).void } + attr_writer :terminal_id + + sig do + params( + balance: Integer, + card_id: String, + decline_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol, + digital_wallet_token_id: String, + event_subscription_id: String, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_descriptor: String, + merchant_state: String, + network_details: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::OrHash, + network_risk_score: Integer, + physical_card_id: String, + terminal_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The balance amount in cents. The account balance will be used if not provided. + balance: nil, + # The identifier of the Card to be authorized. + card_id: nil, + # Forces a card decline with a specific reason. No real time decision will be + # sent. + decline_reason: nil, + # The identifier of the Digital Wallet Token to be authorized. + digital_wallet_token_id: nil, + # The identifier of the Event Subscription to use. If provided, will override the + # default real time event subscription. Because you can only create one real time + # decision event subscription, you can use this field to route events to any + # specified event subscription for testing purposes. + event_subscription_id: nil, + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + merchant_acceptor_id: nil, + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + merchant_category_code: nil, + # The city the merchant resides in. + merchant_city: nil, + # The country the merchant resides in. + merchant_country: nil, + # The merchant descriptor of the merchant the card is transacting with. + merchant_descriptor: nil, + # The state the merchant resides in. + merchant_state: nil, + # Fields specific to a given card network. + network_details: nil, + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + network_risk_score: nil, + # The identifier of the Physical Card to be authorized. + physical_card_id: nil, + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + terminal_id: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + balance: Integer, + card_id: String, + decline_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol, + digital_wallet_token_id: String, + event_subscription_id: String, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_descriptor: String, + merchant_state: String, + network_details: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, + network_risk_score: Integer, + physical_card_id: String, + terminal_id: String, + request_options: Increase::RequestOptions + } + ) + end + def to_hash + end + + # Forces a card decline with a specific reason. No real time decision will be + # sent. + module DeclineReason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The account has been closed. + ACCOUNT_CLOSED = + T.let( + :account_closed, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The Card was not active. + CARD_NOT_ACTIVE = + T.let( + :card_not_active, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The Card has been canceled. + CARD_CANCELED = + T.let( + :card_canceled, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The Physical Card was not active. + PHYSICAL_CARD_NOT_ACTIVE = + T.let( + :physical_card_not_active, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The account's entity was not active. + ENTITY_NOT_ACTIVE = + T.let( + :entity_not_active, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The account was inactive. + GROUP_LOCKED = + T.let( + :group_locked, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The Card's Account did not have a sufficient available balance. + INSUFFICIENT_FUNDS = + T.let( + :insufficient_funds, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The given CVV2 did not match the card's value. + CVV2_MISMATCH = + T.let( + :cvv2_mismatch, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The given PIN did not match the card's value. + PIN_MISMATCH = + T.let( + :pin_mismatch, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The given expiration date did not match the card's value. Only applies when a CVV2 is present. + CARD_EXPIRATION_MISMATCH = + T.let( + :card_expiration_mismatch, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The attempted card transaction is not allowed per Increase's terms. + TRANSACTION_NOT_ALLOWED = + T.let( + :transaction_not_allowed, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The transaction was blocked by a Limit. + BREACHES_LIMIT = + T.let( + :breaches_limit, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # Your application declined the transaction via webhook. + WEBHOOK_DECLINED = + T.let( + :webhook_declined, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # Your application webhook did not respond without the required timeout. + WEBHOOK_TIMED_OUT = + T.let( + :webhook_timed_out, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # Declined by stand-in processing. + DECLINED_BY_STAND_IN_PROCESSING = + T.let( + :declined_by_stand_in_processing, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = + T.let( + :invalid_physical_card, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The original card authorization for this incremental authorization does not exist. + MISSING_ORIGINAL_AUTHORIZATION = + T.let( + :missing_original_authorization, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The transaction was declined because the 3DS authentication failed. + FAILED_3DS_AUTHENTICATION = + T.let( + :failed_3ds_authentication, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The transaction was suspected to be used by a card tester to test for valid card numbers. + SUSPECTED_CARD_TESTING = + T.let( + :suspected_card_testing, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. + SUSPECTED_FRAUD = + T.let( + :suspected_fraud, + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::TaggedSymbol + ] + ) + end + def self.values + end + end + + class NetworkDetails < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, + Increase::Internal::AnyHash + ) + end + + # Fields specific to the Visa network. + sig do + returns( + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa + ) + end + attr_reader :visa + + sig do + params( + visa: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::OrHash + ).void + end + attr_writer :visa + + # Fields specific to a given card network. + sig do + params( + visa: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::OrHash + ).returns(T.attached_class) + end + def self.new( + # Fields specific to the Visa network. + visa: + ) + end + + sig do + override.returns( + { + visa: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa + } + ) + end + def to_hash + end + + class Visa < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa, + Increase::Internal::AnyHash + ) + end + + # The reason code for the stand-in processing. + sig do + returns( + T.nilable( + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol + ) + ) + end + attr_reader :stand_in_processing_reason + + sig do + params( + stand_in_processing_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol + ).void + end + attr_writer :stand_in_processing_reason + + # Fields specific to the Visa network. + sig do + params( + stand_in_processing_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The reason code for the stand-in processing. + stand_in_processing_reason: nil + ) + end + + sig do + override.returns( + { + stand_in_processing_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::OrSymbol + } + ) + end + def to_hash + end + + # The reason code for the stand-in processing. + module StandInProcessingReason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR = + T.let( + :issuer_error, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = + T.let( + :invalid_physical_card, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE = + T.let( + :invalid_cardholder_authentication_verification_value, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays. + INTERNAL_VISA_ERROR = + T.let( + :internal_visa_error, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED = + T.let( + :merchant_transaction_advisory_service_authentication_required, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing. + PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK = + T.let( + :payment_fraud_disruption_acquirer_block, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # An unspecific reason for stand-in processing. + OTHER = + T.let( + :other, + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end + end +end diff --git a/rbi/increase/resources/simulations.rbi b/rbi/increase/resources/simulations.rbi index f7c2a5cd..b8cd083b 100644 --- a/rbi/increase/resources/simulations.rbi +++ b/rbi/increase/resources/simulations.rbi @@ -12,6 +12,9 @@ module Increase sig { returns(Increase::Resources::Simulations::CardAuthorizations) } attr_reader :card_authorizations + sig { returns(Increase::Resources::Simulations::CardBalanceInquiries) } + attr_reader :card_balance_inquiries + sig do returns(Increase::Resources::Simulations::CardAuthorizationExpirations) end diff --git a/rbi/increase/resources/simulations/card_balance_inquiries.rbi b/rbi/increase/resources/simulations/card_balance_inquiries.rbi new file mode 100644 index 00000000..b9701788 --- /dev/null +++ b/rbi/increase/resources/simulations/card_balance_inquiries.rbi @@ -0,0 +1,80 @@ +# typed: strong + +module Increase + module Resources + class Simulations + class CardBalanceInquiries + # Simulates a balance inquiry on a [Card](#cards). + sig do + params( + balance: Integer, + card_id: String, + decline_reason: + Increase::Simulations::CardBalanceInquiryCreateParams::DeclineReason::OrSymbol, + digital_wallet_token_id: String, + event_subscription_id: String, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_descriptor: String, + merchant_state: String, + network_details: + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::OrHash, + network_risk_score: Integer, + physical_card_id: String, + terminal_id: String, + request_options: Increase::RequestOptions::OrHash + ).returns(Increase::CardPayment) + end + def create( + # The balance amount in cents. The account balance will be used if not provided. + balance: nil, + # The identifier of the Card to be authorized. + card_id: nil, + # Forces a card decline with a specific reason. No real time decision will be + # sent. + decline_reason: nil, + # The identifier of the Digital Wallet Token to be authorized. + digital_wallet_token_id: nil, + # The identifier of the Event Subscription to use. If provided, will override the + # default real time event subscription. Because you can only create one real time + # decision event subscription, you can use this field to route events to any + # specified event subscription for testing purposes. + event_subscription_id: nil, + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + merchant_acceptor_id: nil, + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + merchant_category_code: nil, + # The city the merchant resides in. + merchant_city: nil, + # The country the merchant resides in. + merchant_country: nil, + # The merchant descriptor of the merchant the card is transacting with. + merchant_descriptor: nil, + # The state the merchant resides in. + merchant_state: nil, + # Fields specific to a given card network. + network_details: nil, + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + network_risk_score: nil, + # The identifier of the Physical Card to be authorized. + physical_card_id: nil, + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + terminal_id: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: Increase::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end +end diff --git a/sig/increase/models/simulations/card_balance_inquiry_create_params.rbs b/sig/increase/models/simulations/card_balance_inquiry_create_params.rbs new file mode 100644 index 00000000..34ebb4a1 --- /dev/null +++ b/sig/increase/models/simulations/card_balance_inquiry_create_params.rbs @@ -0,0 +1,294 @@ +module Increase + module Models + module Simulations + type card_balance_inquiry_create_params = + { + balance: Integer, + card_id: String, + decline_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason, + digital_wallet_token_id: String, + event_subscription_id: String, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_descriptor: String, + merchant_state: String, + network_details: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, + network_risk_score: Integer, + physical_card_id: String, + terminal_id: String + } + & Increase::Internal::Type::request_parameters + + class CardBalanceInquiryCreateParams < Increase::Internal::Type::BaseModel + extend Increase::Internal::Type::RequestParameters::Converter + include Increase::Internal::Type::RequestParameters + + attr_reader balance: Integer? + + def balance=: (Integer) -> Integer + + attr_reader card_id: String? + + def card_id=: (String) -> String + + attr_reader decline_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason? + + def decline_reason=: ( + Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason + ) -> Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason + + attr_reader digital_wallet_token_id: String? + + def digital_wallet_token_id=: (String) -> String + + attr_reader event_subscription_id: String? + + def event_subscription_id=: (String) -> String + + attr_reader merchant_acceptor_id: String? + + def merchant_acceptor_id=: (String) -> String + + attr_reader merchant_category_code: String? + + def merchant_category_code=: (String) -> String + + attr_reader merchant_city: String? + + def merchant_city=: (String) -> String + + attr_reader merchant_country: String? + + def merchant_country=: (String) -> String + + attr_reader merchant_descriptor: String? + + def merchant_descriptor=: (String) -> String + + attr_reader merchant_state: String? + + def merchant_state=: (String) -> String + + attr_reader network_details: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails? + + def network_details=: ( + Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails + ) -> Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails + + attr_reader network_risk_score: Integer? + + def network_risk_score=: (Integer) -> Integer + + attr_reader physical_card_id: String? + + def physical_card_id=: (String) -> String + + attr_reader terminal_id: String? + + def terminal_id=: (String) -> String + + def initialize: ( + ?balance: Integer, + ?card_id: String, + ?decline_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason, + ?digital_wallet_token_id: String, + ?event_subscription_id: String, + ?merchant_acceptor_id: String, + ?merchant_category_code: String, + ?merchant_city: String, + ?merchant_country: String, + ?merchant_descriptor: String, + ?merchant_state: String, + ?network_details: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, + ?network_risk_score: Integer, + ?physical_card_id: String, + ?terminal_id: String, + ?request_options: Increase::request_opts + ) -> void + + def to_hash: -> { + balance: Integer, + card_id: String, + decline_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason, + digital_wallet_token_id: String, + event_subscription_id: String, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_descriptor: String, + merchant_state: String, + network_details: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, + network_risk_score: Integer, + physical_card_id: String, + terminal_id: String, + request_options: Increase::RequestOptions + } + + type decline_reason = + :account_closed + | :card_not_active + | :card_canceled + | :physical_card_not_active + | :entity_not_active + | :group_locked + | :insufficient_funds + | :cvv2_mismatch + | :pin_mismatch + | :card_expiration_mismatch + | :transaction_not_allowed + | :breaches_limit + | :webhook_declined + | :webhook_timed_out + | :declined_by_stand_in_processing + | :invalid_physical_card + | :missing_original_authorization + | :failed_3ds_authentication + | :suspected_card_testing + | :suspected_fraud + + module DeclineReason + extend Increase::Internal::Type::Enum + + # The account has been closed. + ACCOUNT_CLOSED: :account_closed + + # The Card was not active. + CARD_NOT_ACTIVE: :card_not_active + + # The Card has been canceled. + CARD_CANCELED: :card_canceled + + # The Physical Card was not active. + PHYSICAL_CARD_NOT_ACTIVE: :physical_card_not_active + + # The account's entity was not active. + ENTITY_NOT_ACTIVE: :entity_not_active + + # The account was inactive. + GROUP_LOCKED: :group_locked + + # The Card's Account did not have a sufficient available balance. + INSUFFICIENT_FUNDS: :insufficient_funds + + # The given CVV2 did not match the card's value. + CVV2_MISMATCH: :cvv2_mismatch + + # The given PIN did not match the card's value. + PIN_MISMATCH: :pin_mismatch + + # The given expiration date did not match the card's value. Only applies when a CVV2 is present. + CARD_EXPIRATION_MISMATCH: :card_expiration_mismatch + + # The attempted card transaction is not allowed per Increase's terms. + TRANSACTION_NOT_ALLOWED: :transaction_not_allowed + + # The transaction was blocked by a Limit. + BREACHES_LIMIT: :breaches_limit + + # Your application declined the transaction via webhook. + WEBHOOK_DECLINED: :webhook_declined + + # Your application webhook did not respond without the required timeout. + WEBHOOK_TIMED_OUT: :webhook_timed_out + + # Declined by stand-in processing. + DECLINED_BY_STAND_IN_PROCESSING: :declined_by_stand_in_processing + + # The card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD: :invalid_physical_card + + # The original card authorization for this incremental authorization does not exist. + MISSING_ORIGINAL_AUTHORIZATION: :missing_original_authorization + + # The transaction was declined because the 3DS authentication failed. + FAILED_3DS_AUTHENTICATION: :failed_3ds_authentication + + # The transaction was suspected to be used by a card tester to test for valid card numbers. + SUSPECTED_CARD_TESTING: :suspected_card_testing + + # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. + SUSPECTED_FRAUD: :suspected_fraud + + def self?.values: -> ::Array[Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason] + end + + type network_details = + { + visa: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa + } + + class NetworkDetails < Increase::Internal::Type::BaseModel + attr_accessor visa: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa + + def initialize: ( + visa: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa + ) -> void + + def to_hash: -> { + visa: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa + } + + type visa = + { + stand_in_processing_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason + } + + class Visa < Increase::Internal::Type::BaseModel + attr_reader stand_in_processing_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason? + + def stand_in_processing_reason=: ( + Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason + ) -> Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason + + def initialize: ( + ?stand_in_processing_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason + ) -> void + + def to_hash: -> { + stand_in_processing_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason + } + + type stand_in_processing_reason = + :issuer_error + | :invalid_physical_card + | :invalid_cardholder_authentication_verification_value + | :internal_visa_error + | :merchant_transaction_advisory_service_authentication_required + | :payment_fraud_disruption_acquirer_block + | :other + + module StandInProcessingReason + extend Increase::Internal::Type::Enum + + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR: :issuer_error + + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD: :invalid_physical_card + + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE: :invalid_cardholder_authentication_verification_value + + # An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays. + INTERNAL_VISA_ERROR: :internal_visa_error + + # The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED: :merchant_transaction_advisory_service_authentication_required + + # The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing. + PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK: :payment_fraud_disruption_acquirer_block + + # An unspecific reason for stand-in processing. + OTHER: :other + + def self?.values: -> ::Array[Increase::Models::Simulations::CardBalanceInquiryCreateParams::NetworkDetails::Visa::stand_in_processing_reason] + end + end + end + end + end + end +end diff --git a/sig/increase/resources/simulations.rbs b/sig/increase/resources/simulations.rbs index 3e99e864..bb622597 100644 --- a/sig/increase/resources/simulations.rbs +++ b/sig/increase/resources/simulations.rbs @@ -7,6 +7,8 @@ module Increase attr_reader card_authorizations: Increase::Resources::Simulations::CardAuthorizations + attr_reader card_balance_inquiries: Increase::Resources::Simulations::CardBalanceInquiries + attr_reader card_authorization_expirations: Increase::Resources::Simulations::CardAuthorizationExpirations attr_reader card_settlements: Increase::Resources::Simulations::CardSettlements diff --git a/sig/increase/resources/simulations/card_balance_inquiries.rbs b/sig/increase/resources/simulations/card_balance_inquiries.rbs new file mode 100644 index 00000000..e962c3bc --- /dev/null +++ b/sig/increase/resources/simulations/card_balance_inquiries.rbs @@ -0,0 +1,28 @@ +module Increase + module Resources + class Simulations + class CardBalanceInquiries + def create: ( + ?balance: Integer, + ?card_id: String, + ?decline_reason: Increase::Models::Simulations::CardBalanceInquiryCreateParams::decline_reason, + ?digital_wallet_token_id: String, + ?event_subscription_id: String, + ?merchant_acceptor_id: String, + ?merchant_category_code: String, + ?merchant_city: String, + ?merchant_country: String, + ?merchant_descriptor: String, + ?merchant_state: String, + ?network_details: Increase::Simulations::CardBalanceInquiryCreateParams::NetworkDetails, + ?network_risk_score: Integer, + ?physical_card_id: String, + ?terminal_id: String, + ?request_options: Increase::request_opts + ) -> Increase::CardPayment + + def initialize: (client: Increase::Client) -> void + end + end + end +end diff --git a/test/increase/resources/simulations/card_balance_inquiries_test.rb b/test/increase/resources/simulations/card_balance_inquiries_test.rb new file mode 100644 index 00000000..fe7cf46e --- /dev/null +++ b/test/increase/resources/simulations/card_balance_inquiries_test.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class Increase::Test::Resources::Simulations::CardBalanceInquiriesTest < Increase::Test::ResourceTest + def test_create + response = @increase.simulations.card_balance_inquiries.create + + assert_pattern do + response => Increase::CardPayment + end + + assert_pattern do + response => { + id: String, + account_id: String, + card_id: String, + created_at: Time, + digital_wallet_token_id: String | nil, + elements: ^(Increase::Internal::Type::ArrayOf[Increase::CardPayment::Element]), + physical_card_id: String | nil, + state: Increase::CardPayment::State, + type: Increase::CardPayment::Type + } + end + end +end From 66492686fb106b04ee7c921d628dd2fa8fe37de4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 01:34:29 +0000 Subject: [PATCH 2/2] release: 1.159.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 eb9e346d..4e7ddc44 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.158.0" + ".": "1.159.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f0bd978..26b2891b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.159.0 (2025-12-09) + +Full Changelog: [v1.158.0...v1.159.0](https://github.com/Increase/increase-ruby/compare/v1.158.0...v1.159.0) + +### Features + +* **api:** api update ([d0dd7a8](https://github.com/Increase/increase-ruby/commit/d0dd7a857cdca3db358aef4c46530944d606851f)) + ## 1.158.0 (2025-12-08) Full Changelog: [v1.157.0...v1.158.0](https://github.com/Increase/increase-ruby/compare/v1.157.0...v1.158.0) diff --git a/Gemfile.lock b/Gemfile.lock index ed99c379..7fa09a3d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.158.0) + increase (1.159.0) connection_pool GEM diff --git a/README.md b/README.md index ff57c78c..1b67e596 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.158.0" +gem "increase", "~> 1.159.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 3891a6c9..251a059f 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.158.0" + VERSION = "1.159.0" end