From 93fc5a740da198d4814e4bbc1165c7168c7db734 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:20:57 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- lib/increase/models/card_payment.rb | 36 +- lib/increase/models/declined_transaction.rb | 12 +- lib/increase/models/pending_transaction.rb | 12 +- lib/increase/models/real_time_decision.rb | 38 +- .../real_time_decision_action_params.rb | 188 +++++++- rbi/increase/models/card_payment.rbi | 60 +-- rbi/increase/models/declined_transaction.rbi | 20 +- rbi/increase/models/pending_transaction.rbi | 20 +- rbi/increase/models/real_time_decision.rbi | 77 +++- .../real_time_decision_action_params.rbi | 403 +++++++++++++++++- sig/increase/models/card_payment.rbs | 42 +- sig/increase/models/declined_transaction.rbs | 14 +- sig/increase/models/pending_transaction.rbs | 14 +- sig/increase/models/real_time_decision.rbs | 29 +- .../real_time_decision_action_params.rbs | 138 ++++++ 16 files changed, 959 insertions(+), 148 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0ece17005..cb9d34e48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-387c9e5ff5305d470ddf290a424b9d0f087fa295b56cf82265f2dfe8355a589a.yml -openapi_spec_hash: 2c624b8535be90329028f6b10281a313 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10d8a2e25ff71893e14a81477ef7dbbf761af689e6ff074e13da10729a75cc9d.yml +openapi_spec_hash: 77a4f7c4b166e73a84c3b7f4e177631c config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/lib/increase/models/card_payment.rb b/lib/increase/models/card_payment.rb index 401767aec..e0afe474c 100644 --- a/lib/increase/models/card_payment.rb +++ b/lib/increase/models/card_payment.rb @@ -1707,16 +1707,13 @@ class CardholderAddress < Increase::Internal::Type::BaseModel module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match # Postal code and street address match. @@ -1725,6 +1722,9 @@ module Result # Postal code and street address do not match. NO_MATCH = :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + # @!method self.values # @return [Array] end @@ -3022,16 +3022,13 @@ class CardholderAddress < Increase::Internal::Type::BaseModel module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match # Postal code and street address match. @@ -3040,6 +3037,9 @@ module Result # Postal code and street address do not match. NO_MATCH = :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + # @!method self.values # @return [Array] end @@ -7839,16 +7839,13 @@ class CardholderAddress < Increase::Internal::Type::BaseModel module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match # Postal code and street address match. @@ -7857,6 +7854,9 @@ module Result # Postal code and street address do not match. NO_MATCH = :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + # @!method self.values # @return [Array] end diff --git a/lib/increase/models/declined_transaction.rb b/lib/increase/models/declined_transaction.rb index e6e7536f5..aa653bbcf 100644 --- a/lib/increase/models/declined_transaction.rb +++ b/lib/increase/models/declined_transaction.rb @@ -1600,16 +1600,13 @@ class CardholderAddress < Increase::Internal::Type::BaseModel module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match # Postal code and street address match. @@ -1618,6 +1615,9 @@ module Result # Postal code and street address do not match. NO_MATCH = :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + # @!method self.values # @return [Array] end diff --git a/lib/increase/models/pending_transaction.rb b/lib/increase/models/pending_transaction.rb index e74007efe..624022fd9 100644 --- a/lib/increase/models/pending_transaction.rb +++ b/lib/increase/models/pending_transaction.rb @@ -1553,16 +1553,13 @@ class CardholderAddress < Increase::Internal::Type::BaseModel module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match # Postal code and street address match. @@ -1571,6 +1568,9 @@ module Result # Postal code and street address do not match. NO_MATCH = :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + # @!method self.values # @return [Array] end diff --git a/lib/increase/models/real_time_decision.rb b/lib/increase/models/real_time_decision.rb index 2d88d500a..90c7ae3a1 100644 --- a/lib/increase/models/real_time_decision.rb +++ b/lib/increase/models/real_time_decision.rb @@ -268,6 +268,13 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Decision, nil] required :decision, enum: -> { Increase::RealTimeDecision::CardAuthorization::Decision }, nil?: true + # @!attribute decline + # Present if and only if `decision` is `decline`. Contains information related to + # the reason the authorization was declined. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::Decline, nil] + required :decline, -> { Increase::RealTimeDecision::CardAuthorization::Decline }, nil?: true + # @!attribute digital_wallet_token_id # If the authorization was made via a Digital Wallet Token (such as an Apple Pay # purchase), the identifier of the token that was used. @@ -416,7 +423,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:, 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:, 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:) # Some parameter documentations has been truncated, see # {Increase::Models::RealTimeDecision::CardAuthorization} for more details. # @@ -430,6 +437,8 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param decision [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Decision, nil] Whether or not the authorization was approved. # + # @param decline [Increase::Models::RealTimeDecision::CardAuthorization::Decline, nil] Present if and only if `decision` is `decline`. Contains information related to + # # @param digital_wallet_token_id [String, nil] If the authorization was made via a Digital Wallet Token (such as an Apple Pay p # # @param direction [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Direction] The direction describes the direction the funds will move, either from the cardh @@ -835,6 +844,21 @@ module Decision # @return [Array] end + # @see Increase::Models::RealTimeDecision::CardAuthorization#decline + class Decline < Increase::Internal::Type::BaseModel + # @!attribute reason + # The reason the authorization was declined. + # + # @return [String] + required :reason, String + + # @!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. + end + # The direction describes the direction the funds will move, either from the # cardholder to the merchant or from the merchant to the cardholder. # @@ -1334,16 +1358,13 @@ class CardholderAddress < Increase::Internal::Type::BaseModel module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match # Postal code and street address match. @@ -1352,6 +1373,9 @@ module Result # Postal code and street address do not match. NO_MATCH = :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + # @!method self.values # @return [Array] end diff --git a/lib/increase/models/real_time_decision_action_params.rb b/lib/increase/models/real_time_decision_action_params.rb index 111857671..8684387b9 100644 --- a/lib/increase/models/real_time_decision_action_params.rb +++ b/lib/increase/models/real_time_decision_action_params.rb @@ -136,15 +136,33 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decision] required :decision, enum: -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Decision } + # @!attribute approval + # 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 + # but indicate the address does not match. + # + # @return [Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval, nil] + optional :approval, -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Approval } + + # @!attribute decline + # If your application declines the authorization, this contains details about the + # decline. + # + # @return [Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline, nil] + optional :decline, -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Decline } + # @!attribute decline_reason # The reason the card authorization was declined. This translates to a specific - # decline code that is sent to the card network. + # decline code that is sent to the card network. This field is deprecated, please + # transition to using the `decline` object as this field will be removed in a + # future release. # # @return [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::DeclineReason, nil] optional :decline_reason, enum: -> { Increase::RealTimeDecisionActionParams::CardAuthorization::DeclineReason } - # @!method initialize(decision:, decline_reason: nil) + # @!method initialize(decision:, approval: nil, decline: nil, decline_reason: nil) # Some parameter documentations has been truncated, see # {Increase::Models::RealTimeDecisionActionParams::CardAuthorization} for more # details. @@ -154,6 +172,10 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param decision [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decision] Whether the card authorization should be approved or declined. # + # @param approval [Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval] If your application approves the authorization, this contains metadata about you + # + # @param decline [Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline] If your application declines the authorization, this contains details about the + # # @param decline_reason [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::DeclineReason] The reason the card authorization was declined. This translates to a specific de # Whether the card authorization should be approved or declined. @@ -172,8 +194,157 @@ module Decision # @return [Array] end + # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization#approval + class Approval < Increase::Internal::Type::BaseModel + # @!attribute cardholder_address_verification_result + # Your decisions on whether or not each provided address component is a match. + # Your response here is evaluated against the customer's provided `postal_code` + # and `line1`, and an appropriate network response is generated. For example, if + # you would like to approve all transactions for a given card, you can submit + # `match` for both `postal_code` and `line1` and Increase will generate an + # approval with an Address Verification System (AVS) code that will match all of + # the available address information, or will report that no check was performed if + # no address information is available. If you do not provide a response, the + # address verification result will be calculated by Increase using the available + # address information available on the card. If none is available, Increase will + # report that no check was performed. + # + # @return [Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult, nil] + optional :cardholder_address_verification_result, + -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult } + + # @!method initialize(cardholder_address_verification_result: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval} + # for more details. + # + # 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 + # 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 + + # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval#cardholder_address_verification_result + class CardholderAddressVerificationResult < Increase::Internal::Type::BaseModel + # @!attribute line1 + # Your decision on the address line of the provided address. + # + # @return [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1] + required :line1, + enum: -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1 } + + # @!attribute postal_code + # Your decision on the postal code of the provided address. + # + # @return [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode] + required :postal_code, + enum: -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode } + + # @!method initialize(line1:, postal_code:) + # Your decisions on whether or not each provided address component is a match. + # Your response here is evaluated against the customer's provided `postal_code` + # and `line1`, and an appropriate network response is generated. For example, if + # you would like to approve all transactions for a given card, you can submit + # `match` for both `postal_code` and `line1` and Increase will generate an + # approval with an Address Verification System (AVS) code that will match all of + # the available address information, or will report that no check was performed if + # no address information is available. If you do not provide a response, the + # address verification result will be calculated by Increase using the available + # address information available on the card. If none is available, Increase will + # report that no check was performed. + # + # @param line1 [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1] Your decision on the address line of the provided address. + # + # @param postal_code [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode] Your decision on the postal code of the provided address. + + # Your decision on the address line of the provided address. + # + # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult#line1 + module Line1 + extend Increase::Internal::Type::Enum + + # The cardholder address verification result matches the address provided by the merchant. + MATCH = :match + + # The cardholder address verification result does not match the address provided by the merchant. + NO_MATCH = :no_match + + # @!method self.values + # @return [Array] + end + + # Your decision on the postal code of the provided address. + # + # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult#postal_code + module PostalCode + extend Increase::Internal::Type::Enum + + # The cardholder address verification result matches the address provided by the merchant. + MATCH = :match + + # The cardholder address verification result does not match the address provided by the merchant. + NO_MATCH = :no_match + + # @!method self.values + # @return [Array] + end + end + end + + # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization#decline + class Decline < Increase::Internal::Type::BaseModel + # @!attribute reason + # The reason the card authorization was declined. This translates to a specific + # decline code that is sent to the card network. + # + # @return [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason] + required :reason, enum: -> { Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason } + + # @!method initialize(reason:) + # Some parameter documentations has been truncated, see + # {Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline} for + # more details. + # + # If your application declines the authorization, this contains details about the + # decline. + # + # @param reason [Symbol, Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason] The reason the card authorization was declined. This translates to a specific de + + # The reason the card authorization was declined. This translates to a specific + # decline code that is sent to the card network. + # + # @see Increase::Models::RealTimeDecisionActionParams::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 reason the card authorization was declined. This translates to a specific - # decline code that is sent to the card network. + # decline code that is sent to the card network. This field is deprecated, please + # transition to using the `decline` object as this field will be removed in a + # future release. # # @see Increase::Models::RealTimeDecisionActionParams::CardAuthorization#decline_reason module DeclineReason @@ -210,17 +381,23 @@ class DigitalWalletAuthentication < Increase::Internal::Type::BaseModel required :result, enum: -> { Increase::RealTimeDecisionActionParams::DigitalWalletAuthentication::Result } # @!attribute success + # If your application was able to deliver the one-time passcode, this contains + # metadata about the delivery. Exactly one of `phone` or `email` must be provided. # # @return [Increase::Models::RealTimeDecisionActionParams::DigitalWalletAuthentication::Success, nil] optional :success, -> { Increase::RealTimeDecisionActionParams::DigitalWalletAuthentication::Success } # @!method initialize(result:, success: nil) + # Some parameter documentations has been truncated, see + # {Increase::Models::RealTimeDecisionActionParams::DigitalWalletAuthentication} + # for more details. + # # If the Real-Time Decision relates to a digital wallet authentication attempt, # this object contains your response to the authentication. # # @param result [Symbol, Increase::Models::RealTimeDecisionActionParams::DigitalWalletAuthentication::Result] Whether your application was able to deliver the one-time passcode. # - # @param success [Increase::Models::RealTimeDecisionActionParams::DigitalWalletAuthentication::Success] + # @param success [Increase::Models::RealTimeDecisionActionParams::DigitalWalletAuthentication::Success] If your application was able to deliver the one-time passcode, this contains met # Whether your application was able to deliver the one-time passcode. # @@ -258,6 +435,9 @@ class Success < Increase::Internal::Type::BaseModel # {Increase::Models::RealTimeDecisionActionParams::DigitalWalletAuthentication::Success} # for more details. # + # If your application was able to deliver the one-time passcode, this contains + # metadata about the delivery. Exactly one of `phone` or `email` must be provided. + # # @param email [String] The email address that was used to verify the cardholder via one-time passcode. # # @param phone [String] The phone number that was used to verify the cardholder via one-time passcode ov diff --git a/rbi/increase/models/card_payment.rbi b/rbi/increase/models/card_payment.rbi index 5377ae588..e12e052b2 100644 --- a/rbi/increase/models/card_payment.rbi +++ b/rbi/increase/models/card_payment.rbi @@ -3221,28 +3221,21 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = T.let( :not_checked, Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = T.let( :postal_code_match_address_no_match, Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = T.let( :postal_code_no_match_address_match, @@ -3263,6 +3256,13 @@ module Increase Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + sig do override.returns( T::Array[ @@ -5774,28 +5774,21 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = T.let( :not_checked, Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = T.let( :postal_code_match_address_no_match, Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = T.let( :postal_code_no_match_address_match, @@ -5816,6 +5809,13 @@ module Increase Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) + sig do override.returns( T::Array[ @@ -14523,28 +14523,21 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = T.let( :not_checked, Increase::CardPayment::Element::CardValidation::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::CardPayment::Element::CardValidation::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = T.let( :postal_code_match_address_no_match, Increase::CardPayment::Element::CardValidation::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = T.let( :postal_code_no_match_address_match, @@ -14565,6 +14558,13 @@ module Increase Increase::CardPayment::Element::CardValidation::Verification::CardholderAddress::Result::TaggedSymbol ) + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::CardPayment::Element::CardValidation::Verification::CardholderAddress::Result::TaggedSymbol + ) + sig do override.returns( T::Array[ diff --git a/rbi/increase/models/declined_transaction.rbi b/rbi/increase/models/declined_transaction.rbi index 7355810af..cb36507d0 100644 --- a/rbi/increase/models/declined_transaction.rbi +++ b/rbi/increase/models/declined_transaction.rbi @@ -3021,28 +3021,21 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = T.let( :not_checked, Increase::DeclinedTransaction::Source::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::DeclinedTransaction::Source::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = T.let( :postal_code_match_address_no_match, Increase::DeclinedTransaction::Source::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = T.let( :postal_code_no_match_address_match, @@ -3063,6 +3056,13 @@ module Increase Increase::DeclinedTransaction::Source::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::DeclinedTransaction::Source::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) + sig do override.returns( T::Array[ diff --git a/rbi/increase/models/pending_transaction.rbi b/rbi/increase/models/pending_transaction.rbi index 62bdaf12b..a261c9291 100644 --- a/rbi/increase/models/pending_transaction.rbi +++ b/rbi/increase/models/pending_transaction.rbi @@ -2918,28 +2918,21 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = T.let( :not_checked, Increase::PendingTransaction::Source::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::PendingTransaction::Source::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = T.let( :postal_code_match_address_no_match, Increase::PendingTransaction::Source::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = T.let( :postal_code_no_match_address_match, @@ -2960,6 +2953,13 @@ module Increase Increase::PendingTransaction::Source::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::PendingTransaction::Source::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + sig do override.returns( T::Array[ diff --git a/rbi/increase/models/real_time_decision.rbi b/rbi/increase/models/real_time_decision.rbi index 34d229261..7feda231a 100644 --- a/rbi/increase/models/real_time_decision.rbi +++ b/rbi/increase/models/real_time_decision.rbi @@ -477,6 +477,25 @@ module Increase end attr_accessor :decision + # Present if and only if `decision` is `decline`. Contains information related to + # the reason the authorization was declined. + sig do + returns( + T.nilable(Increase::RealTimeDecision::CardAuthorization::Decline) + ) + end + attr_reader :decline + + sig do + params( + decline: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::Decline::OrHash + ) + ).void + end + attr_writer :decline + # If the authorization was made via a Digital Wallet Token (such as an Apple Pay # purchase), the identifier of the token that was used. sig { returns(T.nilable(String)) } @@ -641,6 +660,10 @@ module Increase T.nilable( Increase::RealTimeDecision::CardAuthorization::Decision::OrSymbol ), + decline: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::Decline::OrHash + ), digital_wallet_token_id: T.nilable(String), direction: Increase::RealTimeDecision::CardAuthorization::Direction::OrSymbol, @@ -682,6 +705,9 @@ module Increase card_id:, # Whether or not the authorization was approved. decision:, + # Present if and only if `decision` is `decline`. Contains information related to + # the reason the authorization was declined. + decline:, # If the authorization was made via a Digital Wallet Token (such as an Apple Pay # purchase), the identifier of the token that was used. digital_wallet_token_id:, @@ -755,6 +781,10 @@ module Increase T.nilable( Increase::RealTimeDecision::CardAuthorization::Decision::TaggedSymbol ), + decline: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::Decline + ), digital_wallet_token_id: T.nilable(String), direction: Increase::RealTimeDecision::CardAuthorization::Direction::TaggedSymbol, @@ -1469,6 +1499,33 @@ module Increase end end + class Decline < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecision::CardAuthorization::Decline, + Increase::Internal::AnyHash + ) + end + + # The reason the authorization was declined. + sig { returns(String) } + 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) } + def self.new( + # The reason the authorization was declined. + reason: + ) + end + + sig { override.returns({ reason: String }) } + def to_hash + end + end + # The direction describes the direction the funds will move, either from the # cardholder to the merchant or from the merchant to the cardholder. module Direction @@ -2525,28 +2582,21 @@ module Increase end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED = T.let( :not_checked, Increase::RealTimeDecision::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::RealTimeDecision::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = T.let( :postal_code_match_address_no_match, Increase::RealTimeDecision::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = T.let( :postal_code_no_match_address_match, @@ -2567,6 +2617,13 @@ module Increase Increase::RealTimeDecision::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol ) + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::RealTimeDecision::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + sig do override.returns( T::Array[ diff --git a/rbi/increase/models/real_time_decision_action_params.rbi b/rbi/increase/models/real_time_decision_action_params.rbi index a0642c26a..2f0006796 100644 --- a/rbi/increase/models/real_time_decision_action_params.rbi +++ b/rbi/increase/models/real_time_decision_action_params.rbi @@ -347,8 +347,50 @@ module Increase end attr_accessor :decision + # 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 + # but indicate the address does not match. + sig do + returns( + T.nilable( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval + ) + ) + end + attr_reader :approval + + sig do + params( + approval: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::OrHash + ).void + end + attr_writer :approval + + # If your application declines the authorization, this contains details about the + # decline. + sig do + returns( + T.nilable( + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline + ) + ) + end + attr_reader :decline + + sig do + params( + decline: + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::OrHash + ).void + end + attr_writer :decline + # The reason the card authorization was declined. This translates to a specific - # decline code that is sent to the card network. + # decline code that is sent to the card network. This field is deprecated, please + # transition to using the `decline` object as this field will be removed in a + # future release. sig do returns( T.nilable( @@ -372,6 +414,10 @@ module Increase params( decision: Increase::RealTimeDecisionActionParams::CardAuthorization::Decision::OrSymbol, + approval: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::OrHash, + decline: + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::OrHash, decline_reason: Increase::RealTimeDecisionActionParams::CardAuthorization::DeclineReason::OrSymbol ).returns(T.attached_class) @@ -379,8 +425,18 @@ module Increase def self.new( # Whether the card authorization should be approved or declined. decision:, + # 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 + # but indicate the address does not match. + approval: nil, + # If your application declines the authorization, this contains details about the + # decline. + decline: nil, # The reason the card authorization was declined. This translates to a specific - # decline code that is sent to the card network. + # decline code that is sent to the card network. This field is deprecated, please + # transition to using the `decline` object as this field will be removed in a + # future release. decline_reason: nil ) end @@ -390,6 +446,10 @@ module Increase { decision: Increase::RealTimeDecisionActionParams::CardAuthorization::Decision::OrSymbol, + approval: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval, + decline: + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline, decline_reason: Increase::RealTimeDecisionActionParams::CardAuthorization::DeclineReason::OrSymbol } @@ -436,8 +496,339 @@ module Increase end end + class Approval < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval, + Increase::Internal::AnyHash + ) + end + + # Your decisions on whether or not each provided address component is a match. + # Your response here is evaluated against the customer's provided `postal_code` + # and `line1`, and an appropriate network response is generated. For example, if + # you would like to approve all transactions for a given card, you can submit + # `match` for both `postal_code` and `line1` and Increase will generate an + # approval with an Address Verification System (AVS) code that will match all of + # the available address information, or will report that no check was performed if + # no address information is available. If you do not provide a response, the + # address verification result will be calculated by Increase using the available + # address information available on the card. If none is available, Increase will + # report that no check was performed. + sig do + returns( + T.nilable( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + ) + ) + end + attr_reader :cardholder_address_verification_result + + sig do + params( + cardholder_address_verification_result: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::OrHash + ).void + end + attr_writer :cardholder_address_verification_result + + # 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 + # but indicate the address does not match. + sig do + params( + cardholder_address_verification_result: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::OrHash + ).returns(T.attached_class) + end + def self.new( + # Your decisions on whether or not each provided address component is a match. + # Your response here is evaluated against the customer's provided `postal_code` + # and `line1`, and an appropriate network response is generated. For example, if + # you would like to approve all transactions for a given card, you can submit + # `match` for both `postal_code` and `line1` and Increase will generate an + # approval with an Address Verification System (AVS) code that will match all of + # the available address information, or will report that no check was performed if + # no address information is available. If you do not provide a response, the + # address verification result will be calculated by Increase using the available + # address information available on the card. If none is available, Increase will + # report that no check was performed. + cardholder_address_verification_result: nil + ) + end + + sig do + override.returns( + { + cardholder_address_verification_result: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + } + ) + end + def to_hash + end + + class CardholderAddressVerificationResult < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult, + Increase::Internal::AnyHash + ) + end + + # Your decision on the address line of the provided address. + sig do + returns( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1::OrSymbol + ) + end + attr_accessor :line1 + + # Your decision on the postal code of the provided address. + sig do + returns( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode::OrSymbol + ) + end + attr_accessor :postal_code + + # Your decisions on whether or not each provided address component is a match. + # Your response here is evaluated against the customer's provided `postal_code` + # and `line1`, and an appropriate network response is generated. For example, if + # you would like to approve all transactions for a given card, you can submit + # `match` for both `postal_code` and `line1` and Increase will generate an + # approval with an Address Verification System (AVS) code that will match all of + # the available address information, or will report that no check was performed if + # no address information is available. If you do not provide a response, the + # address verification result will be calculated by Increase using the available + # address information available on the card. If none is available, Increase will + # report that no check was performed. + sig do + params( + line1: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1::OrSymbol, + postal_code: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Your decision on the address line of the provided address. + line1:, + # Your decision on the postal code of the provided address. + postal_code: + ) + end + + sig do + override.returns( + { + line1: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1::OrSymbol, + postal_code: + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode::OrSymbol + } + ) + end + def to_hash + end + + # Your decision on the address line of the provided address. + module Line1 + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1 + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder address verification result matches the address provided by the merchant. + MATCH = + T.let( + :match, + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1::TaggedSymbol + ) + + # The cardholder address verification result does not match the address provided by the merchant. + NO_MATCH = + T.let( + :no_match, + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::Line1::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Your decision on the postal code of the provided address. + module PostalCode + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The cardholder address verification result matches the address provided by the merchant. + MATCH = + T.let( + :match, + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode::TaggedSymbol + ) + + # The cardholder address verification result does not match the address provided by the merchant. + NO_MATCH = + T.let( + :no_match, + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::PostalCode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + class Decline < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline, + Increase::Internal::AnyHash + ) + end + + # The reason the card authorization was declined. This translates to a specific + # decline code that is sent to the card network. + sig do + returns( + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason::OrSymbol + ) + end + attr_accessor :reason + + # If your application declines the authorization, this contains details about the + # decline. + sig do + params( + reason: + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The reason the card authorization was declined. This translates to a specific + # decline code that is sent to the card network. + reason: + ) + end + + sig do + override.returns( + { + reason: + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason::OrSymbol + } + ) + end + def to_hash + end + + # The reason the card authorization was declined. This translates to a specific + # decline code that is sent to the card network. + module Reason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline::Reason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + # The reason the card authorization was declined. This translates to a specific - # decline code that is sent to the card network. + # decline code that is sent to the card network. This field is deprecated, please + # transition to using the `decline` object as this field will be removed in a + # future release. module DeclineReason extend Increase::Internal::Type::Enum @@ -521,6 +912,8 @@ module Increase end attr_accessor :result + # If your application was able to deliver the one-time passcode, this contains + # metadata about the delivery. Exactly one of `phone` or `email` must be provided. sig do returns( T.nilable( @@ -551,6 +944,8 @@ module Increase def self.new( # Whether your application was able to deliver the one-time passcode. result:, + # If your application was able to deliver the one-time passcode, this contains + # metadata about the delivery. Exactly one of `phone` or `email` must be provided. success: nil ) end @@ -630,6 +1025,8 @@ module Increase sig { params(phone: String).void } attr_writer :phone + # If your application was able to deliver the one-time passcode, this contains + # metadata about the delivery. Exactly one of `phone` or `email` must be provided. sig { params(email: String, phone: String).returns(T.attached_class) } def self.new( # The email address that was used to verify the cardholder via one-time passcode. diff --git a/sig/increase/models/card_payment.rbs b/sig/increase/models/card_payment.rbs index 8ed7e0d44..352c7172d 100644 --- a/sig/increase/models/card_payment.rbs +++ b/sig/increase/models/card_payment.rbs @@ -1167,25 +1167,22 @@ module Increase type result = :not_checked - | :postal_code_match_address_not_checked | :postal_code_match_address_no_match | :postal_code_no_match_address_match | :match | :no_match + | :postal_code_match_address_not_checked module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED: :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match # Postal code and street address match. @@ -1194,6 +1191,9 @@ module Increase # Postal code and street address do not match. NO_MATCH: :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::result] end end @@ -2135,25 +2135,22 @@ module Increase type result = :not_checked - | :postal_code_match_address_not_checked | :postal_code_match_address_no_match | :postal_code_no_match_address_match | :match | :no_match + | :postal_code_match_address_not_checked module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED: :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match # Postal code and street address match. @@ -2162,6 +2159,9 @@ module Increase # Postal code and street address do not match. NO_MATCH: :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardDecline::Verification::CardholderAddress::result] end end @@ -5568,25 +5568,22 @@ module Increase type result = :not_checked - | :postal_code_match_address_not_checked | :postal_code_match_address_no_match | :postal_code_no_match_address_match | :match | :no_match + | :postal_code_match_address_not_checked module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED: :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match # Postal code and street address match. @@ -5595,6 +5592,9 @@ module Increase # Postal code and street address do not match. NO_MATCH: :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardValidation::Verification::CardholderAddress::result] end end diff --git a/sig/increase/models/declined_transaction.rbs b/sig/increase/models/declined_transaction.rbs index 6871d4ebf..dac1c15e8 100644 --- a/sig/increase/models/declined_transaction.rbs +++ b/sig/increase/models/declined_transaction.rbs @@ -1159,25 +1159,22 @@ module Increase type result = :not_checked - | :postal_code_match_address_not_checked | :postal_code_match_address_no_match | :postal_code_no_match_address_match | :match | :no_match + | :postal_code_match_address_not_checked module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED: :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match # Postal code and street address match. @@ -1186,6 +1183,9 @@ module Increase # Postal code and street address do not match. NO_MATCH: :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + def self?.values: -> ::Array[Increase::Models::DeclinedTransaction::Source::CardDecline::Verification::CardholderAddress::result] end end diff --git a/sig/increase/models/pending_transaction.rbs b/sig/increase/models/pending_transaction.rbs index 485ed1f08..f006a37b0 100644 --- a/sig/increase/models/pending_transaction.rbs +++ b/sig/increase/models/pending_transaction.rbs @@ -1010,25 +1010,22 @@ module Increase type result = :not_checked - | :postal_code_match_address_not_checked | :postal_code_match_address_no_match | :postal_code_no_match_address_match | :match | :no_match + | :postal_code_match_address_not_checked module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED: :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match # Postal code and street address match. @@ -1037,6 +1034,9 @@ module Increase # Postal code and street address do not match. NO_MATCH: :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + def self?.values: -> ::Array[Increase::Models::PendingTransaction::Source::CardAuthorization::Verification::CardholderAddress::result] end end diff --git a/sig/increase/models/real_time_decision.rbs b/sig/increase/models/real_time_decision.rbs index 245b7d364..5eac6f8c5 100644 --- a/sig/increase/models/real_time_decision.rbs +++ b/sig/increase/models/real_time_decision.rbs @@ -172,6 +172,7 @@ module Increase additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, + decline: Increase::RealTimeDecision::CardAuthorization::Decline?, digital_wallet_token_id: String?, direction: Increase::Models::RealTimeDecision::CardAuthorization::direction, merchant_acceptor_id: String, @@ -205,6 +206,8 @@ module Increase attr_accessor decision: Increase::Models::RealTimeDecision::CardAuthorization::decision? + attr_accessor decline: Increase::RealTimeDecision::CardAuthorization::Decline? + attr_accessor digital_wallet_token_id: String? attr_accessor direction: Increase::Models::RealTimeDecision::CardAuthorization::direction @@ -254,6 +257,7 @@ module Increase additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, + decline: Increase::RealTimeDecision::CardAuthorization::Decline?, digital_wallet_token_id: String?, direction: Increase::Models::RealTimeDecision::CardAuthorization::direction, merchant_acceptor_id: String, @@ -283,6 +287,7 @@ module Increase additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, + decline: Increase::RealTimeDecision::CardAuthorization::Decline?, digital_wallet_token_id: String?, direction: Increase::Models::RealTimeDecision::CardAuthorization::direction, merchant_acceptor_id: String, @@ -486,6 +491,16 @@ module Increase def self?.values: -> ::Array[Increase::Models::RealTimeDecision::CardAuthorization::decision] end + type decline = { reason: String } + + class Decline < Increase::Internal::Type::BaseModel + attr_accessor reason: String + + def initialize: (reason: String) -> void + + def to_hash: -> { reason: String } + end + type direction = :settlement | :refund module Direction @@ -908,25 +923,22 @@ module Increase type result = :not_checked - | :postal_code_match_address_not_checked | :postal_code_match_address_no_match | :postal_code_no_match_address_match | :match | :no_match + | :postal_code_match_address_not_checked module Result extend Increase::Internal::Type::Enum - # No address was provided in the authorization request. + # No address information was provided in the authorization request. NOT_CHECKED: :not_checked - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked - - # Postal code matches, but the street address does not match. + # Postal code matches, but the street address does not match or was not provided. POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match - # Postal code does not match, but the street address matches. + # Postal code does not match, but the street address matches or was not provided. POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match # Postal code and street address match. @@ -935,6 +947,9 @@ module Increase # Postal code and street address do not match. NO_MATCH: :no_match + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + def self?.values: -> ::Array[Increase::Models::RealTimeDecision::CardAuthorization::Verification::CardholderAddress::result] end end diff --git a/sig/increase/models/real_time_decision_action_params.rbs b/sig/increase/models/real_time_decision_action_params.rbs index b7236d9b7..070193645 100644 --- a/sig/increase/models/real_time_decision_action_params.rbs +++ b/sig/increase/models/real_time_decision_action_params.rbs @@ -130,12 +130,26 @@ module Increase type card_authorization = { decision: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decision, + approval: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval, + decline: Increase::RealTimeDecisionActionParams::CardAuthorization::Decline, decline_reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decline_reason } class CardAuthorization < Increase::Internal::Type::BaseModel attr_accessor decision: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decision + attr_reader approval: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval? + + def approval=: ( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval + ) -> Increase::RealTimeDecisionActionParams::CardAuthorization::Approval + + attr_reader decline: Increase::RealTimeDecisionActionParams::CardAuthorization::Decline? + + def decline=: ( + Increase::RealTimeDecisionActionParams::CardAuthorization::Decline + ) -> Increase::RealTimeDecisionActionParams::CardAuthorization::Decline + attr_reader decline_reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decline_reason? def decline_reason=: ( @@ -144,11 +158,15 @@ module Increase def initialize: ( decision: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decision, + ?approval: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval, + ?decline: Increase::RealTimeDecisionActionParams::CardAuthorization::Decline, ?decline_reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decline_reason ) -> void def to_hash: -> { decision: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decision, + approval: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval, + decline: Increase::RealTimeDecisionActionParams::CardAuthorization::Decline, decline_reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decline_reason } @@ -166,6 +184,126 @@ module Increase def self?.values: -> ::Array[Increase::Models::RealTimeDecisionActionParams::CardAuthorization::decision] end + type approval = + { + cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + } + + class Approval < Increase::Internal::Type::BaseModel + attr_reader cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult? + + def cardholder_address_verification_result=: ( + Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + ) -> Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + + def initialize: ( + ?cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + ) -> void + + def to_hash: -> { + cardholder_address_verification_result: Increase::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult + } + + type cardholder_address_verification_result = + { + :line1 => Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::line1, + postal_code: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::postal_code + } + + class CardholderAddressVerificationResult < Increase::Internal::Type::BaseModel + attr_accessor line1: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::line1 + + attr_accessor postal_code: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::postal_code + + def initialize: ( + line1: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::line1, + postal_code: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::postal_code + ) -> void + + def to_hash: -> { + :line1 => Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::line1, + postal_code: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::postal_code + } + + type line1 = :match | :no_match + + module Line1 + extend Increase::Internal::Type::Enum + + # The cardholder address verification result matches the address provided by the merchant. + MATCH: :match + + # The cardholder address verification result does not match the address provided by the merchant. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::line1] + end + + type postal_code = :match | :no_match + + module PostalCode + extend Increase::Internal::Type::Enum + + # The cardholder address verification result matches the address provided by the merchant. + MATCH: :match + + # The cardholder address verification result does not match the address provided by the merchant. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Approval::CardholderAddressVerificationResult::postal_code] + end + end + end + + type decline = + { + reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline::reason + } + + class Decline < Increase::Internal::Type::BaseModel + attr_accessor reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline::reason + + def initialize: ( + reason: Increase::Models::RealTimeDecisionActionParams::CardAuthorization::Decline::reason + ) -> void + + def to_hash: -> { + reason: Increase::Models::RealTimeDecisionActionParams::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::RealTimeDecisionActionParams::CardAuthorization::Decline::reason] + end + end + type decline_reason = :insufficient_funds | :transaction_never_allowed From fc215360e361e56d1589ec375960fccdce2ac30e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:21:18 +0000 Subject: [PATCH 2/2] release: 1.73.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 e6484623c..c174a8979 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.72.0" + ".": "1.73.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a414c36..1c45b80c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.73.0 (2025-09-09) + +Full Changelog: [v1.72.0...v1.73.0](https://github.com/Increase/increase-ruby/compare/v1.72.0...v1.73.0) + +### Features + +* **api:** api update ([93fc5a7](https://github.com/Increase/increase-ruby/commit/93fc5a740da198d4814e4bbc1165c7168c7db734)) + ## 1.72.0 (2025-09-08) Full Changelog: [v1.71.0...v1.72.0](https://github.com/Increase/increase-ruby/compare/v1.71.0...v1.72.0) diff --git a/Gemfile.lock b/Gemfile.lock index 9fca8e8c9..eb1bd92b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.72.0) + increase (1.73.0) connection_pool GEM diff --git a/README.md b/README.md index f0b2b54de..42672cbc6 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.72.0" +gem "increase", "~> 1.73.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 7b24db378..2beb4079c 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.72.0" + VERSION = "1.73.0" end