From 9ebb8239e22dc3f680560918ac628af6707a3114 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:11:45 +0000 Subject: [PATCH 01/14] fix(api): Allow null values for optional enum and object fields in schema validation --- .stats.yml | 4 +- lib/lithic/models/account.rb | 4 +- ...der_simulate_enrollment_review_response.rb | 9 ++-- .../models/account_holder_update_response.rb | 6 +-- lib/lithic/models/account_update_params.rb | 4 +- lib/lithic/models/non_pci_card.rb | 26 +++++----- lib/lithic/resources/accounts.rb | 2 +- rbi/lithic/models/account.rbi | 9 ++-- ...er_simulate_enrollment_review_response.rbi | 24 ++++----- .../models/account_holder_update_response.rbi | 6 +-- rbi/lithic/models/account_update_params.rbi | 13 ++--- rbi/lithic/models/non_pci_card.rbi | 52 ++++++++----------- rbi/lithic/resources/accounts.rbi | 3 +- sig/lithic/models/account.rbs | 12 ++--- ...er_simulate_enrollment_review_response.rbs | 12 ++--- sig/lithic/models/account_update_params.rbs | 12 ++--- sig/lithic/models/non_pci_card.rbs | 50 +++++++----------- sig/lithic/resources/accounts.rbs | 2 +- test/lithic/resources/cards_test.rb | 2 +- 19 files changed, 106 insertions(+), 146 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1a1957f0..ccbfde87 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d29b68bb85936070878d8badaa8a7c5991313285e70a990bc812c838eba85373.yml -openapi_spec_hash: 54b44da68df22eb0ea99f2bc564667a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml +openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/account.rb b/lib/lithic/models/account.rb index ddf0b580..8a8c7c61 100644 --- a/lib/lithic/models/account.rb +++ b/lib/lithic/models/account.rb @@ -102,7 +102,7 @@ class Account < Lithic::Internal::Type::BaseModel # particular reason. # # @return [Symbol, Lithic::Models::Account::Substatus, nil] - optional :substatus, enum: -> { Lithic::Account::Substatus } + optional :substatus, enum: -> { Lithic::Account::Substatus }, nil?: true # @!attribute verification_address # @deprecated @@ -130,7 +130,7 @@ class Account < Lithic::Internal::Type::BaseModel # # @param comment [String] Additional context or information related to the account. # - # @param substatus [Symbol, Lithic::Models::Account::Substatus] Account state substatus values: + # @param substatus [Symbol, Lithic::Models::Account::Substatus, nil] Account state substatus values: # # @param verification_address [Lithic::Models::Account::VerificationAddress] diff --git a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb index 674278c9..fa060fc2 100644 --- a/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +++ b/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb @@ -75,12 +75,13 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba optional :email, String # @!attribute exemption_type - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @return [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType, nil] optional :exemption_type, - enum: -> { Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType } + enum: -> { Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType }, + nil?: true # @!attribute external_id # Customer-provided token that indicates a relationship with an object outside of @@ -188,7 +189,7 @@ class AccountHolderSimulateEnrollmentReviewResponse < Lithic::Internal::Type::Ba # # @param email [String] (Deprecated. Use control_person.email when user_type == "BUSINESS". # - # @param exemption_type [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType] The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # @param exemption_type [Symbol, Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType, nil] The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # # @param external_id [String] Customer-provided token that indicates a relationship with an object outside of # @@ -465,7 +466,7 @@ class Address < Lithic::Internal::Type::BaseModel end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @see Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse#exemption_type diff --git a/lib/lithic/models/account_holder_update_response.rb b/lib/lithic/models/account_holder_update_response.rb index af945e51..0f8b6b42 100644 --- a/lib/lithic/models/account_holder_update_response.rb +++ b/lib/lithic/models/account_holder_update_response.rb @@ -82,7 +82,7 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel optional :email, String # @!attribute exemption_type - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @return [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ExemptionType, nil] @@ -196,7 +196,7 @@ class KYBKYCPatchResponse < Lithic::Internal::Type::BaseModel # # @param email [String] (Deprecated. Use control_person.email when user_type == "BUSINESS". # - # @param exemption_type [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ExemptionType] The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # @param exemption_type [Symbol, Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::ExemptionType] The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # # @param external_id [String] Customer-provided token that indicates a relationship with an object outside of # @@ -473,7 +473,7 @@ class Address < Lithic::Internal::Type::BaseModel end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. # # @see Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse#exemption_type diff --git a/lib/lithic/models/account_update_params.rb b/lib/lithic/models/account_update_params.rb index c6a88f06..d73fc744 100644 --- a/lib/lithic/models/account_update_params.rb +++ b/lib/lithic/models/account_update_params.rb @@ -80,7 +80,7 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel # particular reason. # # @return [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil] - optional :substatus, enum: -> { Lithic::AccountUpdateParams::Substatus } + optional :substatus, enum: -> { Lithic::AccountUpdateParams::Substatus }, nil?: true # @!attribute verification_address # @deprecated @@ -109,7 +109,7 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel # # @param state [Symbol, Lithic::Models::AccountUpdateParams::State] Account states. # - # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus] Account state substatus values: + # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil] Account state substatus values: # # @param verification_address [Lithic::Models::AccountUpdateParams::VerificationAddress] Address used during Address Verification Service (AVS) checks during transaction # diff --git a/lib/lithic/models/non_pci_card.rb b/lib/lithic/models/non_pci_card.rb index 9b81b3eb..5461f849 100644 --- a/lib/lithic/models/non_pci_card.rb +++ b/lib/lithic/models/non_pci_card.rb @@ -29,10 +29,10 @@ class NonPCICard < Lithic::Internal::Type::BaseModel required :created, Time # @!attribute funding - # Deprecated: Funding account for the card. + # Funding account for a card # - # @return [Lithic::Models::NonPCICard::Funding] - required :funding, -> { Lithic::NonPCICard::Funding } + # @return [Lithic::Models::NonPCICard::Funding, nil] + required :funding, -> { Lithic::NonPCICard::Funding }, nil?: true # @!attribute last_four # Last four digits of the card number. @@ -141,7 +141,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # by Lithic to use. # # @return [String, nil] - optional :digital_card_art_token, String + optional :digital_card_art_token, String, nil?: true # @!attribute exp_month # Two digit (MM) expiry month. @@ -189,7 +189,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # should be manufactured with. # # @return [String, nil] - optional :product_id, String + optional :product_id, String, nil?: true # @!attribute replacement_for # If the card is a replacement for another card, the globally unique identifier @@ -221,7 +221,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # of the above categories. A comment can be provided to specify the reason. # # @return [Symbol, Lithic::Models::NonPCICard::Substatus, nil] - optional :substatus, enum: -> { Lithic::NonPCICard::Substatus } + optional :substatus, enum: -> { Lithic::NonPCICard::Substatus }, nil?: true # @!method initialize(token:, account_token:, card_program_token:, created:, funding:, last_four:, pin_status:, spend_limit:, spend_limit_duration:, state:, type:, auth_rule_tokens: nil, bulk_order_token: nil, cardholder_currency: nil, comment: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, hostname: nil, memo: nil, network_program_token: nil, pending_commands: nil, product_id: nil, replacement_for: nil, substatus: nil) # Some parameter documentations has been truncated, see @@ -237,7 +237,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # # @param created [Time] An RFC 3339 timestamp for when the card was created. UTC time zone. # - # @param funding [Lithic::Models::NonPCICard::Funding] Deprecated: Funding account for the card. + # @param funding [Lithic::Models::NonPCICard::Funding, nil] Funding account for a card # # @param last_four [String] Last four digits of the card number. # @@ -261,7 +261,7 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # # @param comment [String] Additional context or information related to the card. # - # @param digital_card_art_token [String] Specifies the digital card art to be displayed in the user's digital wallet afte + # @param digital_card_art_token [String, nil] Specifies the digital card art to be displayed in the user's digital wallet afte # # @param exp_month [String] Two digit (MM) expiry month. # @@ -275,11 +275,11 @@ class NonPCICard < Lithic::Internal::Type::BaseModel # # @param pending_commands [Array] Indicates if there are offline PIN changes pending card interaction with an offl # - # @param product_id [String] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic + # @param product_id [String, nil] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic # # @param replacement_for [String, nil] If the card is a replacement for another card, the globally unique identifier fo # - # @param substatus [Symbol, Lithic::Models::NonPCICard::Substatus] Card state substatus values: \* `LOST` - The physical card is no longer in the + # @param substatus [Symbol, Lithic::Models::NonPCICard::Substatus, nil] Card state substatus values: \* `LOST` - The physical card is no longer in the # ca # @see Lithic::Models::NonPCICard#funding @@ -330,13 +330,13 @@ class Funding < Lithic::Internal::Type::BaseModel # The nickname given to the `FundingAccount` or `null` if it has no nickname. # # @return [String, nil] - optional :nickname, String + optional :nickname, String, nil?: true # @!method initialize(token:, created:, last_four:, state:, type:, account_name: nil, nickname: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::NonPCICard::Funding} for more details. # - # Deprecated: Funding account for the card. + # Funding account for a card # # @param token [String] A globally unique identifier for this FundingAccount. # @@ -351,7 +351,7 @@ class Funding < Lithic::Internal::Type::BaseModel # # @param account_name [String] Account name identifying the funding source. This may be `null`. # - # @param nickname [String] The nickname given to the `FundingAccount` or `null` if it has no nickname. + # @param nickname [String, nil] The nickname given to the `FundingAccount` or `null` if it has no nickname. # State of funding source. Funding source states: _ `ENABLED` - The funding # account is available to use for card creation and transactions. _ `PENDING` - diff --git a/lib/lithic/resources/accounts.rb b/lib/lithic/resources/accounts.rb index ada65551..421ac64e 100644 --- a/lib/lithic/resources/accounts.rb +++ b/lib/lithic/resources/accounts.rb @@ -44,7 +44,7 @@ def retrieve(account_token, params = {}) # # @param state [Symbol, Lithic::Models::AccountUpdateParams::State] Account states. # - # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus] Account state substatus values: + # @param substatus [Symbol, Lithic::Models::AccountUpdateParams::Substatus, nil] Account state substatus values: # # @param verification_address [Lithic::Models::AccountUpdateParams::VerificationAddress] Address used during Address Verification Service (AVS) checks during transaction # diff --git a/rbi/lithic/models/account.rbi b/rbi/lithic/models/account.rbi index 0c7ef2f2..73441f0a 100644 --- a/rbi/lithic/models/account.rbi +++ b/rbi/lithic/models/account.rbi @@ -101,10 +101,7 @@ module Lithic # of the above categories. A comment should be provided to specify the # particular reason. sig { returns(T.nilable(Lithic::Account::Substatus::TaggedSymbol)) } - attr_reader :substatus - - sig { params(substatus: Lithic::Account::Substatus::OrSymbol).void } - attr_writer :substatus + attr_accessor :substatus sig { returns(T.nilable(Lithic::Account::VerificationAddress)) } attr_reader :verification_address @@ -126,7 +123,7 @@ module Lithic auth_rule_tokens: T::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Account::Substatus::OrSymbol, + substatus: T.nilable(Lithic::Account::Substatus::OrSymbol), verification_address: Lithic::Account::VerificationAddress::OrHash ).returns(T.attached_class) end @@ -208,7 +205,7 @@ module Lithic auth_rule_tokens: T::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Account::Substatus::TaggedSymbol, + substatus: T.nilable(Lithic::Account::Substatus::TaggedSymbol), verification_address: Lithic::Account::VerificationAddress } ) diff --git a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi index ebdaed3c..b10b950b 100644 --- a/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +++ b/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi @@ -110,7 +110,7 @@ module Lithic sig { params(email: String).void } attr_writer :email - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. sig do returns( @@ -119,15 +119,7 @@ module Lithic ) ) end - attr_reader :exemption_type - - sig do - params( - exemption_type: - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol - ).void - end - attr_writer :exemption_type + attr_accessor :exemption_type # Customer-provided token that indicates a relationship with an object outside of # the Lithic ecosystem. @@ -301,7 +293,9 @@ module Lithic created: Time, email: String, exemption_type: - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol, + T.nilable( + Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::OrSymbol + ), external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual::OrHash, @@ -359,7 +353,7 @@ module Lithic # individual.phone_number when user_type == "INDIVIDUAL".) Primary email of # Account Holder. email: nil, - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. exemption_type: nil, # Customer-provided token that indicates a relationship with an object outside of @@ -420,7 +414,9 @@ module Lithic created: Time, email: String, exemption_type: - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::TaggedSymbol, + T.nilable( + Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ExemptionType::TaggedSymbol + ), external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, @@ -850,7 +846,7 @@ module Lithic end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. module ExemptionType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_holder_update_response.rbi b/rbi/lithic/models/account_holder_update_response.rbi index ef701d7d..1ebd29ec 100644 --- a/rbi/lithic/models/account_holder_update_response.rbi +++ b/rbi/lithic/models/account_holder_update_response.rbi @@ -121,7 +121,7 @@ module Lithic sig { params(email: String).void } attr_writer :email - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. sig do returns( @@ -370,7 +370,7 @@ module Lithic # individual.phone_number when user_type == "INDIVIDUAL".) Primary email of # Account Holder. email: nil, - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. exemption_type: nil, # Customer-provided token that indicates a relationship with an object outside of @@ -861,7 +861,7 @@ module Lithic end end - # The type of KYC exemption for a KYC-Exempt Account Holder. "None" if the account + # The type of KYC exemption for a KYC-Exempt Account Holder. `null` if the account # holder is not KYC-Exempt. module ExemptionType extend Lithic::Internal::Type::Enum diff --git a/rbi/lithic/models/account_update_params.rbi b/rbi/lithic/models/account_update_params.rbi index 46bafb14..739baf85 100644 --- a/rbi/lithic/models/account_update_params.rbi +++ b/rbi/lithic/models/account_update_params.rbi @@ -87,12 +87,7 @@ module Lithic sig do returns(T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol)) end - attr_reader :substatus - - sig do - params(substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol).void - end - attr_writer :substatus + attr_accessor :substatus # Address used during Address Verification Service (AVS) checks during # transactions if enabled via Auth Rules. This field is deprecated as AVS checks @@ -119,7 +114,8 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::AccountUpdateParams::State::OrSymbol, - substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol, + substatus: + T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol), verification_address: Lithic::AccountUpdateParams::VerificationAddress::OrHash, request_options: Lithic::RequestOptions::OrHash @@ -191,7 +187,8 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::AccountUpdateParams::State::OrSymbol, - substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol, + substatus: + T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol), verification_address: Lithic::AccountUpdateParams::VerificationAddress, request_options: Lithic::RequestOptions diff --git a/rbi/lithic/models/non_pci_card.rbi b/rbi/lithic/models/non_pci_card.rbi index d240969a..a4cd7147 100644 --- a/rbi/lithic/models/non_pci_card.rbi +++ b/rbi/lithic/models/non_pci_card.rbi @@ -22,11 +22,13 @@ module Lithic sig { returns(Time) } attr_accessor :created - # Deprecated: Funding account for the card. - sig { returns(Lithic::NonPCICard::Funding) } + # Funding account for a card + sig { returns(T.nilable(Lithic::NonPCICard::Funding)) } attr_reader :funding - sig { params(funding: Lithic::NonPCICard::Funding::OrHash).void } + sig do + params(funding: T.nilable(Lithic::NonPCICard::Funding::OrHash)).void + end attr_writer :funding # Last four digits of the card number. @@ -121,10 +123,7 @@ module Lithic # after tokenization. This artwork must be approved by Mastercard and configured # by Lithic to use. sig { returns(T.nilable(String)) } - attr_reader :digital_card_art_token - - sig { params(digital_card_art_token: String).void } - attr_writer :digital_card_art_token + attr_accessor :digital_card_art_token # Two digit (MM) expiry month. sig { returns(T.nilable(String)) } @@ -173,10 +172,7 @@ module Lithic # before use. Specifies the configuration (i.e., physical card art) that the card # should be manufactured with. sig { returns(T.nilable(String)) } - attr_reader :product_id - - sig { params(product_id: String).void } - attr_writer :product_id + attr_accessor :product_id # If the card is a replacement for another card, the globally unique identifier # for the card that was replaced. @@ -204,10 +200,7 @@ module Lithic # has been returned. \* `OTHER` - The reason for the status does not fall into any # of the above categories. A comment can be provided to specify the reason. sig { returns(T.nilable(Lithic::NonPCICard::Substatus::TaggedSymbol)) } - attr_reader :substatus - - sig { params(substatus: Lithic::NonPCICard::Substatus::OrSymbol).void } - attr_writer :substatus + attr_accessor :substatus # Card details without PCI information sig do @@ -216,7 +209,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding::OrHash, + funding: T.nilable(Lithic::NonPCICard::Funding::OrHash), last_four: String, pin_status: Lithic::NonPCICard::PinStatus::OrSymbol, spend_limit: Integer, @@ -227,16 +220,16 @@ module Lithic bulk_order_token: T.nilable(String), cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: T.nilable(String), exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: T.nilable(String), pending_commands: T::Array[String], - product_id: String, + product_id: T.nilable(String), replacement_for: T.nilable(String), - substatus: Lithic::NonPCICard::Substatus::OrSymbol + substatus: T.nilable(Lithic::NonPCICard::Substatus::OrSymbol) ).returns(T.attached_class) end def self.new( @@ -248,7 +241,7 @@ module Lithic card_program_token:, # An RFC 3339 timestamp for when the card was created. UTC time zone. created:, - # Deprecated: Funding account for the card. + # Funding account for a card funding:, # Last four digits of the card number. last_four:, @@ -367,7 +360,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: T.nilable(Lithic::NonPCICard::Funding), last_four: String, pin_status: Lithic::NonPCICard::PinStatus::TaggedSymbol, spend_limit: Integer, @@ -378,16 +371,16 @@ module Lithic bulk_order_token: T.nilable(String), cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: T.nilable(String), exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: T.nilable(String), pending_commands: T::Array[String], - product_id: String, + product_id: T.nilable(String), replacement_for: T.nilable(String), - substatus: Lithic::NonPCICard::Substatus::TaggedSymbol + substatus: T.nilable(Lithic::NonPCICard::Substatus::TaggedSymbol) } ) end @@ -435,12 +428,9 @@ module Lithic # The nickname given to the `FundingAccount` or `null` if it has no nickname. sig { returns(T.nilable(String)) } - attr_reader :nickname - - sig { params(nickname: String).void } - attr_writer :nickname + attr_accessor :nickname - # Deprecated: Funding account for the card. + # Funding account for a card sig do params( token: String, @@ -449,7 +439,7 @@ module Lithic state: Lithic::NonPCICard::Funding::State::OrSymbol, type: Lithic::NonPCICard::Funding::Type::OrSymbol, account_name: String, - nickname: String + nickname: T.nilable(String) ).returns(T.attached_class) end def self.new( @@ -485,7 +475,7 @@ module Lithic state: Lithic::NonPCICard::Funding::State::TaggedSymbol, type: Lithic::NonPCICard::Funding::Type::TaggedSymbol, account_name: String, - nickname: String + nickname: T.nilable(String) } ) end diff --git a/rbi/lithic/resources/accounts.rbi b/rbi/lithic/resources/accounts.rbi index 57c07a32..23d3a1d6 100644 --- a/rbi/lithic/resources/accounts.rbi +++ b/rbi/lithic/resources/accounts.rbi @@ -28,7 +28,8 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::AccountUpdateParams::State::OrSymbol, - substatus: Lithic::AccountUpdateParams::Substatus::OrSymbol, + substatus: + T.nilable(Lithic::AccountUpdateParams::Substatus::OrSymbol), verification_address: Lithic::AccountUpdateParams::VerificationAddress::OrHash, request_options: Lithic::RequestOptions::OrHash diff --git a/sig/lithic/models/account.rbs b/sig/lithic/models/account.rbs index 93c36c8e..526d2509 100644 --- a/sig/lithic/models/account.rbs +++ b/sig/lithic/models/account.rbs @@ -10,7 +10,7 @@ module Lithic auth_rule_tokens: ::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Models::Account::substatus, + substatus: Lithic::Models::Account::substatus?, verification_address: Lithic::Account::VerificationAddress } @@ -41,11 +41,7 @@ module Lithic def comment=: (String) -> String - attr_reader substatus: Lithic::Models::Account::substatus? - - def substatus=: ( - Lithic::Models::Account::substatus - ) -> Lithic::Models::Account::substatus + attr_accessor substatus: Lithic::Models::Account::substatus? attr_reader verification_address: Lithic::Account::VerificationAddress? @@ -62,7 +58,7 @@ module Lithic ?auth_rule_tokens: ::Array[String], ?cardholder_currency: String, ?comment: String, - ?substatus: Lithic::Models::Account::substatus, + ?substatus: Lithic::Models::Account::substatus?, ?verification_address: Lithic::Account::VerificationAddress ) -> void @@ -75,7 +71,7 @@ module Lithic auth_rule_tokens: ::Array[String], cardholder_currency: String, comment: String, - substatus: Lithic::Models::Account::substatus, + substatus: Lithic::Models::Account::substatus?, verification_address: Lithic::Account::VerificationAddress } diff --git a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs index acb8afa1..e7d96465 100644 --- a/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +++ b/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs @@ -10,7 +10,7 @@ module Lithic control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson, created: Time, email: String, - exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, + exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, naics_code: String, @@ -61,11 +61,7 @@ module Lithic def email=: (String) -> String - attr_reader exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type? - - def exemption_type=: ( - Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type - ) -> Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type + attr_accessor exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type? attr_reader external_id: String? @@ -132,7 +128,7 @@ module Lithic ?control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson, ?created: Time, ?email: String, - ?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, + ?exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, ?external_id: String, ?individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, ?naics_code: String, @@ -155,7 +151,7 @@ module Lithic control_person: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::ControlPerson, created: Time, email: String, - exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type, + exemption_type: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::exemption_type?, external_id: String, individual: Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual, naics_code: String, diff --git a/sig/lithic/models/account_update_params.rbs b/sig/lithic/models/account_update_params.rbs index 53d0311f..f49c446d 100644 --- a/sig/lithic/models/account_update_params.rbs +++ b/sig/lithic/models/account_update_params.rbs @@ -8,7 +8,7 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::Models::AccountUpdateParams::state, - substatus: Lithic::Models::AccountUpdateParams::substatus, + substatus: Lithic::Models::AccountUpdateParams::substatus?, verification_address: Lithic::AccountUpdateParams::VerificationAddress } & Lithic::Internal::Type::request_parameters @@ -41,11 +41,7 @@ module Lithic Lithic::Models::AccountUpdateParams::state ) -> Lithic::Models::AccountUpdateParams::state - attr_reader substatus: Lithic::Models::AccountUpdateParams::substatus? - - def substatus=: ( - Lithic::Models::AccountUpdateParams::substatus - ) -> Lithic::Models::AccountUpdateParams::substatus + attr_accessor substatus: Lithic::Models::AccountUpdateParams::substatus? attr_reader verification_address: Lithic::AccountUpdateParams::VerificationAddress? @@ -60,7 +56,7 @@ module Lithic ?lifetime_spend_limit: Integer, ?monthly_spend_limit: Integer, ?state: Lithic::Models::AccountUpdateParams::state, - ?substatus: Lithic::Models::AccountUpdateParams::substatus, + ?substatus: Lithic::Models::AccountUpdateParams::substatus?, ?verification_address: Lithic::AccountUpdateParams::VerificationAddress, ?request_options: Lithic::request_opts ) -> void @@ -72,7 +68,7 @@ module Lithic lifetime_spend_limit: Integer, monthly_spend_limit: Integer, state: Lithic::Models::AccountUpdateParams::state, - substatus: Lithic::Models::AccountUpdateParams::substatus, + substatus: Lithic::Models::AccountUpdateParams::substatus?, verification_address: Lithic::AccountUpdateParams::VerificationAddress, request_options: Lithic::RequestOptions } diff --git a/sig/lithic/models/non_pci_card.rbs b/sig/lithic/models/non_pci_card.rbs index 84cbd736..590ed5b0 100644 --- a/sig/lithic/models/non_pci_card.rbs +++ b/sig/lithic/models/non_pci_card.rbs @@ -6,7 +6,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding?, last_four: String, pin_status: Lithic::Models::NonPCICard::pin_status, spend_limit: Integer, @@ -17,16 +17,16 @@ module Lithic bulk_order_token: String?, cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: String?, exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: String?, pending_commands: ::Array[String], - product_id: String, + product_id: String?, replacement_for: String?, - substatus: Lithic::Models::NonPCICard::substatus + substatus: Lithic::Models::NonPCICard::substatus? } class NonPCICard < Lithic::Internal::Type::BaseModel @@ -38,7 +38,7 @@ module Lithic attr_accessor created: Time - attr_accessor funding: Lithic::NonPCICard::Funding + attr_accessor funding: Lithic::NonPCICard::Funding? attr_accessor last_four: String @@ -66,9 +66,7 @@ module Lithic def comment=: (String) -> String - attr_reader digital_card_art_token: String? - - def digital_card_art_token=: (String) -> String + attr_accessor digital_card_art_token: String? attr_reader exp_month: String? @@ -92,24 +90,18 @@ module Lithic def pending_commands=: (::Array[String]) -> ::Array[String] - attr_reader product_id: String? - - def product_id=: (String) -> String + attr_accessor product_id: String? attr_accessor replacement_for: String? - attr_reader substatus: Lithic::Models::NonPCICard::substatus? - - def substatus=: ( - Lithic::Models::NonPCICard::substatus - ) -> Lithic::Models::NonPCICard::substatus + attr_accessor substatus: Lithic::Models::NonPCICard::substatus? def initialize: ( token: String, account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding?, last_four: String, pin_status: Lithic::Models::NonPCICard::pin_status, spend_limit: Integer, @@ -120,16 +112,16 @@ module Lithic ?bulk_order_token: String?, ?cardholder_currency: String, ?comment: String, - ?digital_card_art_token: String, + ?digital_card_art_token: String?, ?exp_month: String, ?exp_year: String, ?hostname: String, ?memo: String, ?network_program_token: String?, ?pending_commands: ::Array[String], - ?product_id: String, + ?product_id: String?, ?replacement_for: String?, - ?substatus: Lithic::Models::NonPCICard::substatus + ?substatus: Lithic::Models::NonPCICard::substatus? ) -> void def to_hash: -> { @@ -137,7 +129,7 @@ module Lithic account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding?, last_four: String, pin_status: Lithic::Models::NonPCICard::pin_status, spend_limit: Integer, @@ -148,16 +140,16 @@ module Lithic bulk_order_token: String?, cardholder_currency: String, comment: String, - digital_card_art_token: String, + digital_card_art_token: String?, exp_month: String, exp_year: String, hostname: String, memo: String, network_program_token: String?, pending_commands: ::Array[String], - product_id: String, + product_id: String?, replacement_for: String?, - substatus: Lithic::Models::NonPCICard::substatus + substatus: Lithic::Models::NonPCICard::substatus? } type funding = @@ -168,7 +160,7 @@ module Lithic state: Lithic::Models::NonPCICard::Funding::state, type: Lithic::Models::NonPCICard::Funding::type_, account_name: String, - nickname: String + nickname: String? } class Funding < Lithic::Internal::Type::BaseModel @@ -186,9 +178,7 @@ module Lithic def account_name=: (String) -> String - attr_reader nickname: String? - - def nickname=: (String) -> String + attr_accessor nickname: String? def initialize: ( token: String, @@ -197,7 +187,7 @@ module Lithic state: Lithic::Models::NonPCICard::Funding::state, type: Lithic::Models::NonPCICard::Funding::type_, ?account_name: String, - ?nickname: String + ?nickname: String? ) -> void def to_hash: -> { @@ -207,7 +197,7 @@ module Lithic state: Lithic::Models::NonPCICard::Funding::state, type: Lithic::Models::NonPCICard::Funding::type_, account_name: String, - nickname: String + nickname: String? } type state = :DELETED | :ENABLED | :PENDING diff --git a/sig/lithic/resources/accounts.rbs b/sig/lithic/resources/accounts.rbs index da34a111..56aebf0d 100644 --- a/sig/lithic/resources/accounts.rbs +++ b/sig/lithic/resources/accounts.rbs @@ -13,7 +13,7 @@ module Lithic ?lifetime_spend_limit: Integer, ?monthly_spend_limit: Integer, ?state: Lithic::Models::AccountUpdateParams::state, - ?substatus: Lithic::Models::AccountUpdateParams::substatus, + ?substatus: Lithic::Models::AccountUpdateParams::substatus?, ?verification_address: Lithic::AccountUpdateParams::VerificationAddress, ?request_options: Lithic::request_opts ) -> Lithic::Account diff --git a/test/lithic/resources/cards_test.rb b/test/lithic/resources/cards_test.rb index 0c541c67..fb20bcb0 100644 --- a/test/lithic/resources/cards_test.rb +++ b/test/lithic/resources/cards_test.rb @@ -47,7 +47,7 @@ def test_list account_token: String, card_program_token: String, created: Time, - funding: Lithic::NonPCICard::Funding, + funding: Lithic::NonPCICard::Funding | nil, last_four: String, pin_status: Lithic::NonPCICard::PinStatus, spend_limit: Integer, From f9ff453ab8d4d2ad0170f3e55bf8ef7b75f72587 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:35:27 +0000 Subject: [PATCH 02/14] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccbfde87..a0da8756 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-dc8aacc11d74a1e25c95ba549dd0f4a4e735cbf7562fc6b17b0c81d62fd5475c.yml -openapi_spec_hash: 1906583f260a3e9ace5ae38fd2254763 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml +openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc config_hash: ac8326134e692f3f3bdec82396bbec80 From b03a0eb40e63ea3c40ffe90eaa30796a7722feac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 13:58:25 +0000 Subject: [PATCH 03/14] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 34878642..a5e1b80a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From a209f16480d3a19ba50c00ea1c5b8c6b3950129e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:46:48 +0000 Subject: [PATCH 04/14] feat(api): add AMEX network value to settlement models --- .stats.yml | 4 ++-- .../models/reports/settlement/network_total_list_params.rb | 1 + lib/lithic/models/settlement_detail.rb | 1 + lib/lithic/models/settlement_summary_details.rb | 1 + .../models/reports/settlement/network_total_list_params.rbi | 5 +++++ rbi/lithic/models/settlement_detail.rbi | 1 + rbi/lithic/models/settlement_summary_details.rbi | 2 ++ .../models/reports/settlement/network_total_list_params.rbs | 3 ++- sig/lithic/models/settlement_detail.rbs | 4 +++- sig/lithic/models/settlement_summary_details.rbs | 4 +++- 10 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index a0da8756..cba45ec2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-599dd2ac665b09566a84c4871ffb3b7313f6b40d0808b8ab4df63bec608b4f9f.yml -openapi_spec_hash: 429e0ad5e3aae4f63935859c2ac64fdc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/reports/settlement/network_total_list_params.rb b/lib/lithic/models/reports/settlement/network_total_list_params.rb index 3342f3a4..3910397e 100644 --- a/lib/lithic/models/reports/settlement/network_total_list_params.rb +++ b/lib/lithic/models/reports/settlement/network_total_list_params.rb @@ -112,6 +112,7 @@ class NetworkTotalListParams < Lithic::Internal::Type::BaseModel module Network extend Lithic::Internal::Type::Enum + AMEX = :AMEX VISA = :VISA MASTERCARD = :MASTERCARD MAESTRO = :MAESTRO diff --git a/lib/lithic/models/settlement_detail.rb b/lib/lithic/models/settlement_detail.rb index 054de972..c1cec8a3 100644 --- a/lib/lithic/models/settlement_detail.rb +++ b/lib/lithic/models/settlement_detail.rb @@ -188,6 +188,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel module Network extend Lithic::Internal::Type::Enum + AMEX = :AMEX INTERLINK = :INTERLINK MAESTRO = :MAESTRO MASTERCARD = :MASTERCARD diff --git a/lib/lithic/models/settlement_summary_details.rb b/lib/lithic/models/settlement_summary_details.rb index 2df9d7a7..d894b168 100644 --- a/lib/lithic/models/settlement_summary_details.rb +++ b/lib/lithic/models/settlement_summary_details.rb @@ -80,6 +80,7 @@ class SettlementSummaryDetails < Lithic::Internal::Type::BaseModel module Network extend Lithic::Internal::Type::Enum + AMEX = :AMEX INTERLINK = :INTERLINK MAESTRO = :MAESTRO MASTERCARD = :MASTERCARD diff --git a/rbi/lithic/models/reports/settlement/network_total_list_params.rbi b/rbi/lithic/models/reports/settlement/network_total_list_params.rbi index 5eb67f65..3bbaa45e 100644 --- a/rbi/lithic/models/reports/settlement/network_total_list_params.rbi +++ b/rbi/lithic/models/reports/settlement/network_total_list_params.rbi @@ -193,6 +193,11 @@ module Lithic end OrSymbol = T.type_alias { T.any(Symbol, String) } + AMEX = + T.let( + :AMEX, + Lithic::Reports::Settlement::NetworkTotalListParams::Network::TaggedSymbol + ) VISA = T.let( :VISA, diff --git a/rbi/lithic/models/settlement_detail.rbi b/rbi/lithic/models/settlement_detail.rbi index ac051101..9050d615 100644 --- a/rbi/lithic/models/settlement_detail.rbi +++ b/rbi/lithic/models/settlement_detail.rbi @@ -226,6 +226,7 @@ module Lithic T.type_alias { T.all(Symbol, Lithic::SettlementDetail::Network) } OrSymbol = T.type_alias { T.any(Symbol, String) } + AMEX = T.let(:AMEX, Lithic::SettlementDetail::Network::TaggedSymbol) INTERLINK = T.let(:INTERLINK, Lithic::SettlementDetail::Network::TaggedSymbol) MAESTRO = diff --git a/rbi/lithic/models/settlement_summary_details.rbi b/rbi/lithic/models/settlement_summary_details.rbi index ef4213d2..dddcef17 100644 --- a/rbi/lithic/models/settlement_summary_details.rbi +++ b/rbi/lithic/models/settlement_summary_details.rbi @@ -137,6 +137,8 @@ module Lithic end OrSymbol = T.type_alias { T.any(Symbol, String) } + AMEX = + T.let(:AMEX, Lithic::SettlementSummaryDetails::Network::TaggedSymbol) INTERLINK = T.let( :INTERLINK, diff --git a/sig/lithic/models/reports/settlement/network_total_list_params.rbs b/sig/lithic/models/reports/settlement/network_total_list_params.rbs index cb5804b2..2a1a8365 100644 --- a/sig/lithic/models/reports/settlement/network_total_list_params.rbs +++ b/sig/lithic/models/reports/settlement/network_total_list_params.rbs @@ -98,11 +98,12 @@ module Lithic request_options: Lithic::RequestOptions } - type network = :VISA | :MASTERCARD | :MAESTRO | :INTERLINK + type network = :AMEX | :VISA | :MASTERCARD | :MAESTRO | :INTERLINK module Network extend Lithic::Internal::Type::Enum + AMEX: :AMEX VISA: :VISA MASTERCARD: :MASTERCARD MAESTRO: :MAESTRO diff --git a/sig/lithic/models/settlement_detail.rbs b/sig/lithic/models/settlement_detail.rbs index af7beae1..cda4b410 100644 --- a/sig/lithic/models/settlement_detail.rbs +++ b/sig/lithic/models/settlement_detail.rbs @@ -118,11 +118,13 @@ module Lithic fee_description: String } - type network = :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA + type network = + :AMEX | :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA module Network extend Lithic::Internal::Type::Enum + AMEX: :AMEX INTERLINK: :INTERLINK MAESTRO: :MAESTRO MASTERCARD: :MASTERCARD diff --git a/sig/lithic/models/settlement_summary_details.rbs b/sig/lithic/models/settlement_summary_details.rbs index 0617747a..9a7c1cab 100644 --- a/sig/lithic/models/settlement_summary_details.rbs +++ b/sig/lithic/models/settlement_summary_details.rbs @@ -69,11 +69,13 @@ module Lithic transactions_gross_amount: Integer } - type network = :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA + type network = + :AMEX | :INTERLINK | :MAESTRO | :MASTERCARD | :UNKNOWN | :VISA module Network extend Lithic::Internal::Type::Enum + AMEX: :AMEX INTERLINK: :INTERLINK MAESTRO: :MAESTRO MASTERCARD: :MASTERCARD From 02db7be84225c5782bdcf2de90c55890bd2b0358 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:36:50 +0000 Subject: [PATCH 05/14] docs(api): update exp_month/exp_year descriptions in card create/renew params --- .stats.yml | 2 +- lib/lithic/models/card_create_params.rb | 6 ++++-- lib/lithic/models/card_renew_params.rb | 6 ++++-- rbi/lithic/models/card_create_params.rbi | 12 ++++++++---- rbi/lithic/models/card_renew_params.rbi | 12 ++++++++---- rbi/lithic/resources/cards.rbi | 12 ++++++++---- 6 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index cba45ec2..bf2a162b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml -openapi_spec_hash: f6ae1bbed371a5d45927cd63797a9908 +openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/card_create_params.rb b/lib/lithic/models/card_create_params.rb index 1d6837a9..eebe84a7 100644 --- a/lib/lithic/models/card_create_params.rb +++ b/lib/lithic/models/card_create_params.rb @@ -72,14 +72,16 @@ class CardCreateParams < Lithic::Internal::Type::BaseModel # @!attribute exp_month # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. # # @return [String, nil] optional :exp_month, String # @!attribute exp_year # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. # # @return [String, nil] optional :exp_year, String diff --git a/lib/lithic/models/card_renew_params.rb b/lib/lithic/models/card_renew_params.rb index 5b7cd10c..6f591929 100644 --- a/lib/lithic/models/card_renew_params.rb +++ b/lib/lithic/models/card_renew_params.rb @@ -26,14 +26,16 @@ class CardRenewParams < Lithic::Internal::Type::BaseModel # @!attribute exp_month # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. # # @return [String, nil] optional :exp_month, String # @!attribute exp_year # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. # # @return [String, nil] optional :exp_year, String diff --git a/rbi/lithic/models/card_create_params.rbi b/rbi/lithic/models/card_create_params.rbi index 2b5a1b0a..2757fcc8 100644 --- a/rbi/lithic/models/card_create_params.rbi +++ b/rbi/lithic/models/card_create_params.rbi @@ -78,7 +78,8 @@ module Lithic attr_writer :digital_card_art_token # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_month @@ -86,7 +87,8 @@ module Lithic attr_writer :exp_month # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_year @@ -339,10 +341,12 @@ module Lithic # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). digital_card_art_token: nil, # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. exp_month: nil, # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Friendly name to identify the card. memo: nil, diff --git a/rbi/lithic/models/card_renew_params.rbi b/rbi/lithic/models/card_renew_params.rbi index 985dcef1..ae1336b9 100644 --- a/rbi/lithic/models/card_renew_params.rbi +++ b/rbi/lithic/models/card_renew_params.rbi @@ -29,7 +29,8 @@ module Lithic attr_writer :carrier # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_month @@ -37,7 +38,8 @@ module Lithic attr_writer :exp_month # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. sig { returns(T.nilable(String)) } attr_reader :exp_year @@ -100,10 +102,12 @@ module Lithic # If omitted, the previous carrier will be used. carrier: nil, # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. exp_month: nil, # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Specifies the configuration (e.g. physical card art) that the card should be # manufactured with, and only applies to cards of type `PHYSICAL`. This must be diff --git a/rbi/lithic/resources/cards.rbi b/rbi/lithic/resources/cards.rbi index 7b4b41a4..057c572b 100644 --- a/rbi/lithic/resources/cards.rbi +++ b/rbi/lithic/resources/cards.rbi @@ -80,10 +80,12 @@ module Lithic # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art). digital_card_art_token: nil, # Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` - # is provided, an expiration date will be generated. + # is provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_month: nil, # Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` - # is provided, an expiration date will be generated. + # is provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Body param: Friendly name to identify the card. memo: nil, @@ -556,10 +558,12 @@ module Lithic # If omitted, the previous carrier will be used. carrier: nil, # Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided, - # an expiration date six years in the future will be generated. + # an expiration date five years in the future will be generated. Five years is the + # maximum expiration date. exp_month: nil, # Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is - # provided, an expiration date six years in the future will be generated. + # provided, an expiration date five years in the future will be generated. Five + # years is the maximum expiration date. exp_year: nil, # Specifies the configuration (e.g. physical card art) that the card should be # manufactured with, and only applies to cards of type `PHYSICAL`. This must be From 01b4c634e91f47513e26619946ab010f5f1decec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:33:12 +0000 Subject: [PATCH 06/14] feat: support setting headers via env --- lib/lithic/client.rb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index 8b78c197..6d9b1b5d 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -190,6 +190,19 @@ def initialize( raise ArgumentError.new("api_key is required, and can be set via environ: \"LITHIC_API_KEY\"") end + headers = {} + custom_headers_env = ENV["LITHIC_CUSTOM_HEADERS"] + unless custom_headers_env.nil? + parsed = {} + custom_headers_env.split("\n").each do |line| + colon = line.index(":") + unless colon.nil? + parsed[line[0...colon].strip] = line[(colon + 1)..].strip + end + end + headers = parsed.merge(headers) + end + @api_key = api_key.to_s @webhook_secret = webhook_secret&.to_s @@ -198,7 +211,8 @@ def initialize( timeout: timeout, max_retries: max_retries, initial_retry_delay: initial_retry_delay, - max_retry_delay: max_retry_delay + max_retry_delay: max_retry_delay, + headers: headers ) @accounts = Lithic::Resources::Accounts.new(client: self) From 7da8cdf24a46edc1a7cdd8764275542590c729a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 14:53:56 +0000 Subject: [PATCH 07/14] chore(internal): codegen related update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f4ee606a..4eba03fe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -143,7 +143,7 @@ GEM rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - standardwebhooks (1.0.1) + standardwebhooks (1.1.0) steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) From d13400571fbb6f7b00b420bd13437d5abcfe1fd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:04:46 +0000 Subject: [PATCH 08/14] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bf2a162b..6e83ca3b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-ab626b78e088455e814b80debc85d420839bc11f95416491fef6a0460f2d95ed.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 7d24c66745584935a1759542c2fd4f50ca8b9aef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:19:59 +0000 Subject: [PATCH 09/14] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6e83ca3b..a6ff9086 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 3290c6366562b022c6b1d958e25748e964f282db Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:27:46 +0000 Subject: [PATCH 10/14] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a6ff9086..e494edd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-d6101c64c957742cde9cfdc5d9213ce4e36aa43d045030fa142e27a46b60884a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0572da655d188e23459f2115b03b27040b4c4d3b47e4a86510803892d0d1b0aa.yml openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 config_hash: ac8326134e692f3f3bdec82396bbec80 From 5eacf6f69073956549ff4d3e2141d56650dd0ba7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 18:46:15 +0000 Subject: [PATCH 11/14] docs(types): clarify event_tokens and transaction_token fields in SettlementDetail --- .stats.yml | 4 ++-- lib/lithic/models/settlement_detail.rb | 14 ++++++++++---- rbi/lithic/models/settlement_detail.rbi | 20 ++++++++++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index e494edd9..5a9e4234 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0572da655d188e23459f2115b03b27040b4c4d3b47e4a86510803892d0d1b0aa.yml -openapi_spec_hash: b615a0eb16502b4de874f9ae28491894 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a46ebb10f6bb217a591206f0574450c324f108dbd32a2d62727cd8186d85e94f.yml +openapi_spec_hash: f320c173152f74b0799166b6ef5b82cd config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/settlement_detail.rb b/lib/lithic/models/settlement_detail.rb index c1cec8a3..1d504460 100644 --- a/lib/lithic/models/settlement_detail.rb +++ b/lib/lithic/models/settlement_detail.rb @@ -49,7 +49,8 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel required :disputes_gross_amount, Integer # @!attribute event_tokens - # Globally unique identifiers denoting the Events associated with this settlement. + # Array of globally unique identifiers for the financial events that comprise this + # settlement. Use these tokens to access detailed event-level information. # # @return [Array] required :event_tokens, Lithic::Internal::Type::ArrayOf[String] @@ -106,7 +107,12 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel required :settlement_date, String # @!attribute transaction_token - # Globally unique identifier denoting the associated Transaction object. + # Globally unique identifier denoting the associated transaction. For settlement + # records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + # card transaction token. For settlement records with type `CHARGEBACK`, + # `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this + # references the dispute transaction token. May be null for certain settlement + # types. # # @return [String] required :transaction_token, String @@ -154,7 +160,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # # @param disputes_gross_amount [Integer] The total gross amount of disputes settlements. # - # @param event_tokens [Array] Globally unique identifiers denoting the Events associated with this settlement. + # @param event_tokens [Array] Array of globally unique identifiers for the financial events that comprise this # # @param institution [String] The most granular ID the network settles with (e.g., ICA for Mastercard, FTSRE f # @@ -172,7 +178,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel # # @param settlement_date [String] Date of when money movement is triggered for the transaction. One exception appl # - # @param transaction_token [String] Globally unique identifier denoting the associated Transaction object. + # @param transaction_token [String] Globally unique identifier denoting the associated transaction. For settlement r # # @param transactions_gross_amount [Integer] The total amount of settlement impacting transactions (excluding interchange, fe # diff --git a/rbi/lithic/models/settlement_detail.rbi b/rbi/lithic/models/settlement_detail.rbi index 9050d615..1f28c6b4 100644 --- a/rbi/lithic/models/settlement_detail.rbi +++ b/rbi/lithic/models/settlement_detail.rbi @@ -39,7 +39,8 @@ module Lithic sig { returns(Integer) } attr_accessor :disputes_gross_amount - # Globally unique identifiers denoting the Events associated with this settlement. + # Array of globally unique identifiers for the financial events that comprise this + # settlement. Use these tokens to access detailed event-level information. sig { returns(T::Array[String]) } attr_accessor :event_tokens @@ -85,7 +86,12 @@ module Lithic sig { returns(String) } attr_accessor :settlement_date - # Globally unique identifier denoting the associated Transaction object. + # Globally unique identifier denoting the associated transaction. For settlement + # records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + # card transaction token. For settlement records with type `CHARGEBACK`, + # `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this + # references the dispute transaction token. May be null for certain settlement + # types. sig { returns(String) } attr_accessor :transaction_token @@ -153,7 +159,8 @@ module Lithic currency:, # The total gross amount of disputes settlements. disputes_gross_amount:, - # Globally unique identifiers denoting the Events associated with this settlement. + # Array of globally unique identifiers for the financial events that comprise this + # settlement. Use these tokens to access detailed event-level information. event_tokens:, # The most granular ID the network settles with (e.g., ICA for Mastercard, FTSRE # for Visa). @@ -174,7 +181,12 @@ module Lithic # applies - for Mastercard dual message settlement, this is the settlement # advisement date, which is distinct from the date of money movement. settlement_date:, - # Globally unique identifier denoting the associated Transaction object. + # Globally unique identifier denoting the associated transaction. For settlement + # records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a + # card transaction token. For settlement records with type `CHARGEBACK`, + # `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this + # references the dispute transaction token. May be null for certain settlement + # types. transaction_token:, # The total amount of settlement impacting transactions (excluding interchange, # fees, and disputes). From 48b6bd5a7a5076b8e59b6b6f30730c4d1c706a0b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 20:11:53 +0000 Subject: [PATCH 12/14] feat(api): add IS_NEW_MERCHANT attribute to auth rules conditional authorization --- .stats.yml | 4 ++-- ...nditional_authorization_action_parameters.rb | 9 +++++++++ ...ditional_authorization_action_parameters.rbi | 17 +++++++++++++++++ ...ditional_authorization_action_parameters.rbs | 2 ++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a9e4234..e3e60713 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-a46ebb10f6bb217a591206f0574450c324f108dbd32a2d62727cd8186d85e94f.yml -openapi_spec_hash: f320c173152f74b0799166b6ef5b82cd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-92d7ce0702a494edb7beb0ad484c4f24aca65777197d40b2108d05c13c3fa505.yml +openapi_spec_hash: 35e4b9edb38ef23f528fcfbfeaabac02 config_hash: ac8326134e692f3f3bdec82396bbec80 diff --git a/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb index b72676b9..d850048d 100644 --- a/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +++ b/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb @@ -132,6 +132,10 @@ class Condition < Lithic::Internal::Type::BaseModel # transaction for the entity. Requires `parameters.scope`. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in # the entity's transaction history. Requires `parameters.scope`. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. # @@ -271,6 +275,10 @@ class Condition < Lithic::Internal::Type::BaseModel # transaction for the entity. Requires `parameters.scope`. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in # the entity's transaction history. Requires `parameters.scope`. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. # @@ -313,6 +321,7 @@ module Attribute CONSECUTIVE_DECLINES = :CONSECUTIVE_DECLINES TIME_SINCE_LAST_TRANSACTION = :TIME_SINCE_LAST_TRANSACTION DISTINCT_COUNTRY_COUNT = :DISTINCT_COUNTRY_COUNT + IS_NEW_MERCHANT = :IS_NEW_MERCHANT THREE_DS_SUCCESS_RATE = :THREE_DS_SUCCESS_RATE # @!method self.values diff --git a/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi index 0a16b138..b1469dc9 100644 --- a/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +++ b/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi @@ -201,6 +201,10 @@ module Lithic # transaction for the entity. Requires `parameters.scope`. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in # the entity's transaction history. Requires `parameters.scope`. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. sig do @@ -347,6 +351,10 @@ module Lithic # transaction for the entity. Requires `parameters.scope`. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in # the entity's transaction history. Requires `parameters.scope`. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. attribute:, @@ -474,6 +482,10 @@ module Lithic # transaction for the entity. Requires `parameters.scope`. # - `DISTINCT_COUNTRY_COUNT`: The number of distinct merchant countries seen in # the entity's transaction history. Requires `parameters.scope`. + # - `IS_NEW_MERCHANT`: Whether the card acceptor ID has not been seen in the + # card's approved transaction history (capped at the 1000 most recently seen + # merchants). Valid values are `TRUE`, `FALSE`. Card-scoped only; no + # `parameters` required. # - `THREE_DS_SUCCESS_RATE`: The 3DS authentication success rate for the card, as # a percentage from 0.0 to 100.0. Card-scoped only; no `parameters` required. module Attribute @@ -663,6 +675,11 @@ module Lithic :DISTINCT_COUNTRY_COUNT, Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol ) + IS_NEW_MERCHANT = + T.let( + :IS_NEW_MERCHANT, + Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol + ) THREE_DS_SUCCESS_RATE = T.let( :THREE_DS_SUCCESS_RATE, diff --git a/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs b/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs index a6161c7c..ab0b560f 100644 --- a/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +++ b/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs @@ -104,6 +104,7 @@ module Lithic | :CONSECUTIVE_DECLINES | :TIME_SINCE_LAST_TRANSACTION | :DISTINCT_COUNTRY_COUNT + | :IS_NEW_MERCHANT | :THREE_DS_SUCCESS_RATE module Attribute @@ -144,6 +145,7 @@ module Lithic CONSECUTIVE_DECLINES: :CONSECUTIVE_DECLINES TIME_SINCE_LAST_TRANSACTION: :TIME_SINCE_LAST_TRANSACTION DISTINCT_COUNTRY_COUNT: :DISTINCT_COUNTRY_COUNT + IS_NEW_MERCHANT: :IS_NEW_MERCHANT THREE_DS_SUCCESS_RATE: :THREE_DS_SUCCESS_RATE def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::attribute] From 7f395eb5b666d1d5563705da6ebe8dd7d8d98787 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 10:39:01 +0000 Subject: [PATCH 13/14] feat(api): add CARD_TRANSACTION_UPDATE event stream to auth_rules --- .stats.yml | 6 +- lib/lithic.rb | 5 +- lib/lithic/models/auth_rules/auth_rule.rb | 22 +- .../models/auth_rules/auth_rule_version.rb | 8 +- .../card_transaction_update_action.rb | 109 ++++ ...rd_transaction_update_action_parameters.rb | 244 ++++++++ lib/lithic/models/auth_rules/event_stream.rb | 1 + .../auth_rules/spend_velocity_filters.rb | 33 + .../models/auth_rules/v2_create_params.rb | 42 +- .../models/auth_rules/v2_draft_params.rb | 8 +- lib/lithic/resources/auth_rules/v2.rb | 2 +- rbi/lithic/models/auth_rules/auth_rule.rbi | 13 +- .../models/auth_rules/auth_rule_version.rbi | 2 + .../card_transaction_update_action.rbi | 242 ++++++++ ...d_transaction_update_action_parameters.rbi | 573 ++++++++++++++++++ rbi/lithic/models/auth_rules/event_stream.rbi | 5 + .../auth_rules/spend_velocity_filters.rbi | 58 ++ .../models/auth_rules/v2_create_params.rbi | 39 +- .../models/auth_rules/v2_draft_params.rbi | 4 + rbi/lithic/resources/auth_rules/v2.rbi | 1 + sig/lithic/models/auth_rules/auth_rule.rbs | 2 + .../models/auth_rules/auth_rule_version.rbs | 1 + .../card_transaction_update_action.rbs | 100 +++ ...d_transaction_update_action_parameters.rbs | 155 +++++ sig/lithic/models/auth_rules/event_stream.rbs | 2 + .../auth_rules/spend_velocity_filters.rbs | 35 ++ .../models/auth_rules/v2_create_params.rbs | 3 + .../models/auth_rules/v2_draft_params.rbs | 1 + 28 files changed, 1670 insertions(+), 46 deletions(-) create mode 100644 lib/lithic/models/auth_rules/card_transaction_update_action.rb create mode 100644 lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb create mode 100644 lib/lithic/models/auth_rules/spend_velocity_filters.rb create mode 100644 rbi/lithic/models/auth_rules/card_transaction_update_action.rbi create mode 100644 rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi create mode 100644 rbi/lithic/models/auth_rules/spend_velocity_filters.rbi create mode 100644 sig/lithic/models/auth_rules/card_transaction_update_action.rbs create mode 100644 sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs create mode 100644 sig/lithic/models/auth_rules/spend_velocity_filters.rbs diff --git a/.stats.yml b/.stats.yml index e3e60713..883f26c0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 191 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-92d7ce0702a494edb7beb0ad484c4f24aca65777197d40b2108d05c13c3fa505.yml -openapi_spec_hash: 35e4b9edb38ef23f528fcfbfeaabac02 -config_hash: ac8326134e692f3f3bdec82396bbec80 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-0f374e78a0212145a2f55a55dfc39a612de19094d5152ae26b1bc74b01b9e343.yml +openapi_spec_hash: ec888cdaebea979a2cd6231ca04c346c +config_hash: 01dfc901bb6d54b0f582155d779bcbe0 diff --git a/lib/lithic.rb b/lib/lithic.rb index 8a27d74c..28dde370 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -57,6 +57,7 @@ require_relative "lithic/internal/single_page" require_relative "lithic/models/merchant" require_relative "lithic/models/transaction" +require_relative "lithic/models/auth_rules/velocity_limit_filters" require_relative "lithic/models/auth_rules/v2/backtest_results" require_relative "lithic/models/book_transfer_response" require_relative "lithic/models/non_pci_card" @@ -118,11 +119,13 @@ require_relative "lithic/models/auth_rules/auth_rule_condition" require_relative "lithic/models/auth_rules/auth_rule_version" require_relative "lithic/models/auth_rules/backtest_stats" +require_relative "lithic/models/auth_rules/card_transaction_update_action" require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters" require_relative "lithic/models/auth_rules/conditional_ach_action_parameters" require_relative "lithic/models/auth_rules/conditional_attribute" require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters" require_relative "lithic/models/auth_rules/conditional_block_parameters" +require_relative "lithic/models/auth_rules/conditional_card_transaction_update_action_parameters" require_relative "lithic/models/auth_rules/conditional_operation" require_relative "lithic/models/auth_rules/conditional_tokenization_action_parameters" require_relative "lithic/models/auth_rules/conditional_value" @@ -130,6 +133,7 @@ require_relative "lithic/models/auth_rules/merchant_lock_parameters" require_relative "lithic/models/auth_rules/report_stats" require_relative "lithic/models/auth_rules/rule_feature" +require_relative "lithic/models/auth_rules/spend_velocity_filters" require_relative "lithic/models/auth_rules/typescript_code_parameters" require_relative "lithic/models/auth_rules/v2/backtest_create_params" require_relative "lithic/models/auth_rules/v2/backtest_create_response" @@ -149,7 +153,6 @@ require_relative "lithic/models/auth_rules/v2_retrieve_report_params" require_relative "lithic/models/auth_rules/v2_retrieve_report_response" require_relative "lithic/models/auth_rules/v2_update_params" -require_relative "lithic/models/auth_rules/velocity_limit_filters" require_relative "lithic/models/auth_rules/velocity_limit_params" require_relative "lithic/models/auth_rules/velocity_limit_period" require_relative "lithic/models/auth_rules_backtest_report_created_webhook_event" diff --git a/lib/lithic/models/auth_rules/auth_rule.rb b/lib/lithic/models/auth_rules/auth_rule.rb index 7dcf0db0..ab012eb7 100644 --- a/lib/lithic/models/auth_rules/auth_rule.rb +++ b/lib/lithic/models/auth_rules/auth_rule.rb @@ -81,7 +81,8 @@ class AuthRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # @@ -145,7 +146,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::CurrentVersion::Parameters } response_only do @@ -161,7 +162,7 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::AuthRule::CurrentVersion} for more details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule # # @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan @@ -186,11 +187,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end end @@ -206,7 +209,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRule::DraftVersion::Parameters } # @!attribute state @@ -239,7 +242,7 @@ class DraftVersion < Lithic::Internal::Type::BaseModel # # @param error [String, nil] An error message if the draft version failed compilation. Populated when `state` # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule # # @param state [Symbol, Lithic::Models::AuthRules::AuthRule::DraftVersion::State] The state of the draft version. Most rules are created synchronously and the sta # @@ -266,11 +269,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end # The state of the draft version. Most rules are created synchronously and the @@ -320,7 +325,8 @@ module State # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # diff --git a/lib/lithic/models/auth_rules/auth_rule_version.rb b/lib/lithic/models/auth_rules/auth_rule_version.rb index 8732239e..efa11b4e 100644 --- a/lib/lithic/models/auth_rules/auth_rule_version.rb +++ b/lib/lithic/models/auth_rules/auth_rule_version.rb @@ -13,7 +13,7 @@ class AuthRuleVersion < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::AuthRuleVersion::Parameters } # @!attribute state @@ -37,7 +37,7 @@ class AuthRuleVersion < Lithic::Internal::Type::BaseModel # # @param created [Time] Timestamp of when this version was created. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule # # @param state [Symbol, Lithic::Models::AuthRules::AuthRuleVersion::State] The current state of this version. # @@ -64,11 +64,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end # The current state of this version. diff --git a/lib/lithic/models/auth_rules/card_transaction_update_action.rb b/lib/lithic/models/auth_rules/card_transaction_update_action.rb new file mode 100644 index 00000000..774eaa3d --- /dev/null +++ b/lib/lithic/models/auth_rules/card_transaction_update_action.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + module CardTransactionUpdateAction + extend Lithic::Internal::Type::Union + + variant -> { Lithic::AuthRules::CardTransactionUpdateAction::TagAction } + + variant -> { Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction } + + class TagAction < Lithic::Internal::Type::BaseModel + # @!attribute key + # The key of the tag to apply to the transaction + # + # @return [String] + required :key, String + + # @!attribute type + # Tag the transaction with key-value metadata + # + # @return [Symbol, Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::Type] + required :type, enum: -> { Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type } + + # @!attribute value + # The value of the tag to apply to the transaction + # + # @return [String] + required :value, String + + # @!method initialize(key:, type:, value:) + # @param key [String] The key of the tag to apply to the transaction + # + # @param type [Symbol, Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::Type] Tag the transaction with key-value metadata + # + # @param value [String] The value of the tag to apply to the transaction + + # Tag the transaction with key-value metadata + # + # @see Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction#type + module Type + extend Lithic::Internal::Type::Enum + + TAG = :TAG + + # @!method self.values + # @return [Array] + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + # @!attribute queue_token + # The token of the queue to create the case in + # + # @return [String] + required :queue_token, String + + # @!attribute scope + # The scope of the case to create + # + # @return [Symbol, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope] + required :scope, enum: -> { Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope } + + # @!attribute type + # Create a case for the transaction + # + # @return [Symbol, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type] + required :type, enum: -> { Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type } + + # @!method initialize(queue_token:, scope:, type:) + # @param queue_token [String] The token of the queue to create the case in + # + # @param scope [Symbol, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope] The scope of the case to create + # + # @param type [Symbol, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type] Create a case for the transaction + + # The scope of the case to create + # + # @see Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + + # @!method self.values + # @return [Array] + end + + # Create a case for the transaction + # + # @see Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction#type + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE = :CREATE_CASE + + # @!method self.values + # @return [Array] + end + end + + # @!method self.variants + # @return [Array(Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction)] + end + end + end +end diff --git a/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb b/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb new file mode 100644 index 00000000..0aa09379 --- /dev/null +++ b/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb @@ -0,0 +1,244 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class ConditionalCardTransactionUpdateActionParameters < Lithic::Internal::Type::BaseModel + # @!attribute action + # The action to take if the conditions are met. + # + # @return [Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction] + required :action, union: -> { Lithic::AuthRules::CardTransactionUpdateAction } + + # @!attribute conditions + # + # @return [Array] + required :conditions, + -> { Lithic::Internal::Type::ArrayOf[Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition] } + + # @!method initialize(action:, conditions:) + # @param action [Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction, Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction] The action to take if the conditions are met. + # + # @param conditions [Array] + + class Condition < Lithic::Internal::Type::BaseModel + # @!attribute attribute + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. + # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are + # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, + # `EXPIRED`. + # - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid + # values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`, + # `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`, + # `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`, + # `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`, + # `RETURN_REVERSAL`. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, or `CREDENTIAL_ON_FILE`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the + # transaction. + # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified + # filters within the given period. Requires `parameters` with `scope`, `period`, + # and optional `filters`. + # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions + # matching the specified filters within the given period. Requires `parameters` + # with `scope`, `period`, and optional `filters`. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute] + required :attribute, + enum: -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute } + + # @!attribute operation + # The operation to apply to the attribute + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalOperation] + required :operation, enum: -> { Lithic::AuthRules::ConditionalOperation } + + # @!attribute value + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # + # @return [String, Integer, Array, Time] + required :value, union: -> { Lithic::AuthRules::ConditionalValue } + + # @!attribute parameters + # Additional parameters for spend velocity attributes. Required when `attribute` + # is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + # attributes. + # + # @return [Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters, nil] + optional :parameters, + -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters } + + # @!method initialize(attribute:, operation:, value:, parameters: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition} + # for more details. + # + # @param attribute [Symbol, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute] The attribute to target. + # + # @param operation [Symbol, Lithic::Models::AuthRules::ConditionalOperation] The operation to apply to the attribute + # + # @param value [String, Integer, Array, Time] A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + # + # @param parameters [Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters] Additional parameters for spend velocity attributes. Required when `attribute` i + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. + # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are + # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, + # `EXPIRED`. + # - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid + # values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`, + # `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`, + # `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`, + # `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`, + # `RETURN_REVERSAL`. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, or `CREDENTIAL_ON_FILE`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the + # transaction. + # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified + # filters within the given period. Requires `parameters` with `scope`, `period`, + # and optional `filters`. + # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions + # matching the specified filters within the given period. Requires `parameters` + # with `scope`, `period`, and optional `filters`. + # + # @see Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition#attribute + module Attribute + extend Lithic::Internal::Type::Enum + + MCC = :MCC + COUNTRY = :COUNTRY + CURRENCY = :CURRENCY + MERCHANT_ID = :MERCHANT_ID + DESCRIPTOR = :DESCRIPTOR + TRANSACTION_AMOUNT = :TRANSACTION_AMOUNT + RISK_SCORE = :RISK_SCORE + TRANSACTION_STATUS = :TRANSACTION_STATUS + LAST_EVENT_TYPE = :LAST_EVENT_TYPE + LIABILITY_SHIFT = :LIABILITY_SHIFT + PAN_ENTRY_MODE = :PAN_ENTRY_MODE + WALLET_TYPE = :WALLET_TYPE + CARD_AGE = :CARD_AGE + ACCOUNT_AGE = :ACCOUNT_AGE + SPEND_VELOCITY_COUNT = :SPEND_VELOCITY_COUNT + SPEND_VELOCITY_AMOUNT = :SPEND_VELOCITY_AMOUNT + + # @!method self.values + # @return [Array] + end + + # @see Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition#parameters + class Parameters < Lithic::Internal::Type::BaseModel + # @!attribute filters + # + # @return [Lithic::Models::AuthRules::SpendVelocityFilters, nil] + optional :filters, -> { Lithic::AuthRules::SpendVelocityFilters } + + # @!attribute period + # The time period over which to calculate the spend velocity. + # + # @return [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear, nil] + optional :period, union: -> { Lithic::AuthRules::VelocityLimitPeriod } + + # @!attribute scope + # The entity scope to evaluate the attribute against. + # + # @return [Symbol, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope, nil] + optional :scope, + enum: -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope } + + # @!method initialize(filters: nil, period: nil, scope: nil) + # Additional parameters for spend velocity attributes. Required when `attribute` + # is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + # attributes. + # + # @param filters [Lithic::Models::AuthRules::SpendVelocityFilters] + # + # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] The time period over which to calculate the spend velocity. + # + # @param scope [Symbol, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope] The entity scope to evaluate the attribute against. + + # The entity scope to evaluate the attribute against. + # + # @see Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters#scope + module Scope + extend Lithic::Internal::Type::Enum + + CARD = :CARD + ACCOUNT = :ACCOUNT + GLOBAL = :GLOBAL + + # @!method self.values + # @return [Array] + end + end + end + end + end + end +end diff --git a/lib/lithic/models/auth_rules/event_stream.rb b/lib/lithic/models/auth_rules/event_stream.rb index 0ca058a1..8b9f023b 100644 --- a/lib/lithic/models/auth_rules/event_stream.rb +++ b/lib/lithic/models/auth_rules/event_stream.rb @@ -12,6 +12,7 @@ module EventStream TOKENIZATION = :TOKENIZATION ACH_CREDIT_RECEIPT = :ACH_CREDIT_RECEIPT ACH_DEBIT_RECEIPT = :ACH_DEBIT_RECEIPT + CARD_TRANSACTION_UPDATE = :CARD_TRANSACTION_UPDATE # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/spend_velocity_filters.rb b/lib/lithic/models/auth_rules/spend_velocity_filters.rb new file mode 100644 index 00000000..b5dfaaa4 --- /dev/null +++ b/lib/lithic/models/auth_rules/spend_velocity_filters.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module Lithic + module Models + module AuthRules + class SpendVelocityFilters < Lithic::Models::AuthRules::VelocityLimitFilters + # @!attribute exclude_tags + # Tag key-value pairs to exclude from the velocity calculation. Transactions + # matching all specified tag key-value pairs will be excluded from the calculated + # velocity. + # + # @return [Hash{Symbol=>String}, nil] + optional :exclude_tags, Lithic::Internal::Type::HashOf[String], nil?: true + + # @!attribute include_tags + # Tag key-value pairs to include in the velocity calculation. Only transactions + # matching all specified tag key-value pairs will be included in the calculated + # velocity. + # + # @return [Hash{Symbol=>String}, nil] + optional :include_tags, Lithic::Internal::Type::HashOf[String], nil?: true + + # @!method initialize(exclude_tags: nil, include_tags: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::AuthRules::SpendVelocityFilters} for more details. + # + # @param exclude_tags [Hash{Symbol=>String}, nil] Tag key-value pairs to exclude from the velocity calculation. Transactions match + # + # @param include_tags [Hash{Symbol=>String}, nil] Tag key-value pairs to include in the velocity calculation. Only transactions ma + end + end + end +end diff --git a/lib/lithic/models/auth_rules/v2_create_params.rb b/lib/lithic/models/auth_rules/v2_create_params.rb index 0c795bf5..07a4631f 100644 --- a/lib/lithic/models/auth_rules/v2_create_params.rb +++ b/lib/lithic/models/auth_rules/v2_create_params.rb @@ -30,7 +30,7 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::AccountLevelRule::Parameters } # @!attribute type @@ -44,7 +44,8 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # @@ -80,7 +81,7 @@ class AccountLevelRule < Lithic::Internal::Type::BaseModel # {Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule} for more # details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule # # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::AccountLevelRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # @@ -113,11 +114,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -130,7 +133,8 @@ module Parameters # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # @@ -159,7 +163,7 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::CardLevelRule::Parameters } # @!attribute type @@ -173,7 +177,8 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # @@ -199,7 +204,7 @@ class CardLevelRule < Lithic::Internal::Type::BaseModel # # @param card_tokens [Array] Card tokens to which the Auth Rule applies. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule # # @param type [Symbol, Lithic::Models::AuthRules::V2CreateParams::Body::CardLevelRule::Type] The type of Auth Rule. For certain rule types, this determines the event stream # @@ -228,11 +233,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -245,7 +252,8 @@ module Parameters # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # @@ -268,7 +276,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] required :parameters, union: -> { Lithic::AuthRules::V2CreateParams::Body::ProgramLevelRule::Parameters } # @!attribute program_level @@ -288,7 +296,8 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # @@ -330,7 +339,7 @@ class ProgramLevelRule < Lithic::Internal::Type::BaseModel # {Lithic::Models::AuthRules::V2CreateParams::Body::ProgramLevelRule} for more # details. # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters] Parameters for the Auth Rule # # @param program_level [Boolean] Whether the Auth Rule applies to all authorizations on the card program. # @@ -367,11 +376,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end # The type of Auth Rule. For certain rule types, this determines the event stream @@ -384,7 +395,8 @@ module Parameters # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. # diff --git a/lib/lithic/models/auth_rules/v2_draft_params.rb b/lib/lithic/models/auth_rules/v2_draft_params.rb index 022e5927..f379d1ec 100644 --- a/lib/lithic/models/auth_rules/v2_draft_params.rb +++ b/lib/lithic/models/auth_rules/v2_draft_params.rb @@ -16,13 +16,13 @@ class V2DraftParams < Lithic::Internal::Type::BaseModel # @!attribute parameters # Parameters for the Auth Rule # - # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] + # @return [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] optional :parameters, union: -> { Lithic::AuthRules::V2DraftParams::Parameters }, nil?: true # @!method initialize(auth_rule_token:, parameters: nil, request_options: {}) # @param auth_rule_token [String] # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] @@ -45,11 +45,13 @@ module Parameters variant -> { Lithic::AuthRules::ConditionalTokenizationActionParameters } + variant -> { Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters } + # Parameters for defining a TypeScript code rule variant -> { Lithic::AuthRules::TypescriptCodeParameters } # @!method self.variants - # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] + # @return [Array(Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters)] end end end diff --git a/lib/lithic/resources/auth_rules/v2.rb b/lib/lithic/resources/auth_rules/v2.rb index 46ca0306..3656122c 100644 --- a/lib/lithic/resources/auth_rules/v2.rb +++ b/lib/lithic/resources/auth_rules/v2.rb @@ -144,7 +144,7 @@ def delete(auth_rule_token, params = {}) # # @param auth_rule_token [String] # - # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] Parameters for the Auth Rule + # @param parameters [Lithic::Models::AuthRules::ConditionalBlockParameters, Lithic::Models::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::MerchantLockParameters, Lithic::Models::AuthRules::Conditional3DSActionParameters, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters, Lithic::Models::AuthRules::ConditionalACHActionParameters, Lithic::Models::AuthRules::ConditionalTokenizationActionParameters, Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::Models::AuthRules::TypescriptCodeParameters, nil] Parameters for the Auth Rule # # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] # diff --git a/rbi/lithic/models/auth_rules/auth_rule.rbi b/rbi/lithic/models/auth_rules/auth_rule.rbi index 302170cc..bff611b7 100644 --- a/rbi/lithic/models/auth_rules/auth_rule.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule.rbi @@ -80,7 +80,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig { returns(Lithic::AuthRules::AuthRule::Type::TaggedSymbol) } @@ -160,7 +161,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, @@ -232,6 +234,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ), version: Integer @@ -272,6 +275,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end @@ -344,6 +348,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ), state: Lithic::AuthRules::AuthRule::DraftVersion::State::OrSymbol, @@ -402,6 +407,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end @@ -496,7 +502,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type diff --git a/rbi/lithic/models/auth_rules/auth_rule_version.rbi b/rbi/lithic/models/auth_rules/auth_rule_version.rbi index e9c48f7d..e36a21ac 100644 --- a/rbi/lithic/models/auth_rules/auth_rule_version.rbi +++ b/rbi/lithic/models/auth_rules/auth_rule_version.rbi @@ -42,6 +42,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ), state: Lithic::AuthRules::AuthRuleVersion::State::OrSymbol, @@ -89,6 +90,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end diff --git a/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi b/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi new file mode 100644 index 00000000..9801b902 --- /dev/null +++ b/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi @@ -0,0 +1,242 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + module CardTransactionUpdateAction + extend Lithic::Internal::Type::Union + + Variants = + T.type_alias do + T.any( + Lithic::AuthRules::CardTransactionUpdateAction::TagAction, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction + ) + end + + class TagAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::CardTransactionUpdateAction::TagAction, + Lithic::Internal::AnyHash + ) + end + + # The key of the tag to apply to the transaction + sig { returns(String) } + attr_accessor :key + + # Tag the transaction with key-value metadata + sig do + returns( + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type::OrSymbol + ) + end + attr_accessor :type + + # The value of the tag to apply to the transaction + sig { returns(String) } + attr_accessor :value + + sig do + params( + key: String, + type: + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The key of the tag to apply to the transaction + key:, + # Tag the transaction with key-value metadata + type:, + # The value of the tag to apply to the transaction + value: + ) + end + + sig do + override.returns( + { + key: String, + type: + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type::OrSymbol, + value: String + } + ) + end + def to_hash + end + + # Tag the transaction with key-value metadata + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + TAG = + T.let( + :TAG, + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction, + Lithic::Internal::AnyHash + ) + end + + # The token of the queue to create the case in + sig { returns(String) } + attr_accessor :queue_token + + # The scope of the case to create + sig do + returns( + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::OrSymbol + ) + end + attr_accessor :scope + + # Create a case for the transaction + sig do + returns( + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type::OrSymbol + ) + end + attr_accessor :type + + sig do + params( + queue_token: String, + scope: + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::OrSymbol, + type: + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The token of the queue to create the case in + queue_token:, + # The scope of the case to create + scope:, + # Create a case for the transaction + type: + ) + end + + sig do + override.returns( + { + queue_token: String, + scope: + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::OrSymbol, + type: + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type::OrSymbol + } + ) + end + def to_hash + end + + # The scope of the case to create + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Create a case for the transaction + module Type + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CREATE_CASE = + T.let( + :CREATE_CASE, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + sig do + override.returns( + T::Array[Lithic::AuthRules::CardTransactionUpdateAction::Variants] + ) + end + def self.variants + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi b/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi new file mode 100644 index 00000000..3aa0ec7f --- /dev/null +++ b/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi @@ -0,0 +1,573 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class ConditionalCardTransactionUpdateActionParameters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, + Lithic::Internal::AnyHash + ) + end + + # The action to take if the conditions are met. + sig do + returns( + T.any( + Lithic::AuthRules::CardTransactionUpdateAction::TagAction, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction + ) + ) + end + attr_accessor :action + + sig do + returns( + T::Array[ + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition + ] + ) + end + attr_accessor :conditions + + sig do + params( + action: + T.any( + Lithic::AuthRules::CardTransactionUpdateAction::TagAction::OrHash, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::OrHash + ), + conditions: + T::Array[ + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::OrHash + ] + ).returns(T.attached_class) + end + def self.new( + # The action to take if the conditions are met. + action:, + conditions: + ) + end + + sig do + override.returns( + { + action: + T.any( + Lithic::AuthRules::CardTransactionUpdateAction::TagAction, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction + ), + conditions: + T::Array[ + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition + ] + } + ) + end + def to_hash + end + + class Condition < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition, + Lithic::Internal::AnyHash + ) + end + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. + # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are + # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, + # `EXPIRED`. + # - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid + # values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`, + # `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`, + # `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`, + # `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`, + # `RETURN_REVERSAL`. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, or `CREDENTIAL_ON_FILE`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the + # transaction. + # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified + # filters within the given period. Requires `parameters` with `scope`, `period`, + # and optional `filters`. + # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions + # matching the specified filters within the given period. Requires `parameters` + # with `scope`, `period`, and optional `filters`. + sig do + returns( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol + ) + end + attr_accessor :attribute + + # The operation to apply to the attribute + sig { returns(Lithic::AuthRules::ConditionalOperation::OrSymbol) } + attr_accessor :operation + + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + sig { returns(Lithic::AuthRules::ConditionalValue::Variants) } + attr_accessor :value + + # Additional parameters for spend velocity attributes. Required when `attribute` + # is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + # attributes. + sig do + returns( + T.nilable( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + ) + ) + end + attr_reader :parameters + + sig do + params( + parameters: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::OrHash + ).void + end + attr_writer :parameters + + sig do + params( + attribute: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol, + operation: Lithic::AuthRules::ConditionalOperation::OrSymbol, + value: Lithic::AuthRules::ConditionalValue::Variants, + parameters: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::OrHash + ).returns(T.attached_class) + end + def self.new( + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. + # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are + # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, + # `EXPIRED`. + # - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid + # values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`, + # `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`, + # `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`, + # `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`, + # `RETURN_REVERSAL`. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, or `CREDENTIAL_ON_FILE`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the + # transaction. + # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified + # filters within the given period. Requires `parameters` with `scope`, `period`, + # and optional `filters`. + # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions + # matching the specified filters within the given period. Requires `parameters` + # with `scope`, `period`, and optional `filters`. + attribute:, + # The operation to apply to the attribute + operation:, + # A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` + value:, + # Additional parameters for spend velocity attributes. Required when `attribute` + # is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + # attributes. + parameters: nil + ) + end + + sig do + override.returns( + { + attribute: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::OrSymbol, + operation: Lithic::AuthRules::ConditionalOperation::OrSymbol, + value: Lithic::AuthRules::ConditionalValue::Variants, + parameters: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + } + ) + end + def to_hash + end + + # The attribute to target. + # + # The following attributes may be targeted: + # + # - `MCC`: A four-digit number listed in ISO 18245. An MCC is used to classify a + # business by the types of goods or services it provides. + # - `COUNTRY`: Country of entity of card acceptor. Possible values are: (1) all + # ISO 3166-1 alpha-3 country codes, (2) QZZ for Kosovo, and (3) ANT for + # Netherlands Antilles. + # - `CURRENCY`: 3-character alphabetic ISO 4217 code for the merchant currency of + # the transaction. + # - `MERCHANT_ID`: Unique alphanumeric identifier for the payment card acceptor + # (merchant). + # - `DESCRIPTOR`: Short description of card acceptor. + # - `TRANSACTION_AMOUNT`: The base transaction amount (in cents) plus the acquirer + # fee field in the settlement/cardholder billing currency. This is the amount + # the issuer should authorize against unless the issuer is paying the acquirer + # fee on behalf of the cardholder. + # - `RISK_SCORE`: Network-provided score assessing risk level associated with a + # given authorization. Scores are on a range of 0-999, with 0 representing the + # lowest risk and 999 representing the highest risk. For Visa transactions, + # where the raw score has a range of 0-99, Lithic will normalize the score by + # multiplying the raw score by 10x. + # - `TRANSACTION_STATUS`: The status of the transaction. Valid values are + # `PENDING`, `VOIDED`, `SETTLING`, `SETTLED`, `BOUNCED`, `RETURNED`, `DECLINED`, + # `EXPIRED`. + # - `LAST_EVENT_TYPE`: The type of the most recent event on the transaction. Valid + # values are `AUTHORIZATION`, `AUTHORIZATION_ADVICE`, `AUTHORIZATION_EXPIRY`, + # `AUTHORIZATION_REVERSAL`, `BALANCE_INQUIRY`, `CLEARING`, `CORRECTION_CREDIT`, + # `CORRECTION_DEBIT`, `CREDIT_AUTHORIZATION`, `CREDIT_AUTHORIZATION_ADVICE`, + # `FINANCIAL_AUTHORIZATION`, `FINANCIAL_CREDIT_AUTHORIZATION`, `RETURN`, + # `RETURN_REVERSAL`. + # - `LIABILITY_SHIFT`: Indicates whether chargeback liability shift to the issuer + # applies to the transaction. Valid values are `NONE`, `3DS_AUTHENTICATED`, or + # `TOKEN_AUTHENTICATED`. + # - `PAN_ENTRY_MODE`: The method by which the cardholder's primary account number + # (PAN) was entered. Valid values are `AUTO_ENTRY`, `BAR_CODE`, `CONTACTLESS`, + # `ECOMMERCE`, `ERROR_KEYED`, `ERROR_MAGNETIC_STRIPE`, `ICC`, `KEY_ENTERED`, + # `MAGNETIC_STRIPE`, `MANUAL`, `OCR`, `SECURE_CARDLESS`, `UNSPECIFIED`, + # `UNKNOWN`, or `CREDENTIAL_ON_FILE`. + # - `WALLET_TYPE`: For transactions using a digital wallet token, indicates the + # source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`, + # `SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`. + # - `CARD_AGE`: The age of the card in seconds at the time of the transaction. + # - `ACCOUNT_AGE`: The age of the account in seconds at the time of the + # transaction. + # - `SPEND_VELOCITY_COUNT`: The number of transactions matching the specified + # filters within the given period. Requires `parameters` with `scope`, `period`, + # and optional `filters`. + # - `SPEND_VELOCITY_AMOUNT`: The total spend amount (in cents) of transactions + # matching the specified filters within the given period. Requires `parameters` + # with `scope`, `period`, and optional `filters`. + module Attribute + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MCC = + T.let( + :MCC, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + COUNTRY = + T.let( + :COUNTRY, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + CURRENCY = + T.let( + :CURRENCY, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + MERCHANT_ID = + T.let( + :MERCHANT_ID, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + DESCRIPTOR = + T.let( + :DESCRIPTOR, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + TRANSACTION_AMOUNT = + T.let( + :TRANSACTION_AMOUNT, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + RISK_SCORE = + T.let( + :RISK_SCORE, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + TRANSACTION_STATUS = + T.let( + :TRANSACTION_STATUS, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + LAST_EVENT_TYPE = + T.let( + :LAST_EVENT_TYPE, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + LIABILITY_SHIFT = + T.let( + :LIABILITY_SHIFT, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + PAN_ENTRY_MODE = + T.let( + :PAN_ENTRY_MODE, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + WALLET_TYPE = + T.let( + :WALLET_TYPE, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + CARD_AGE = + T.let( + :CARD_AGE, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + ACCOUNT_AGE = + T.let( + :ACCOUNT_AGE, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + SPEND_VELOCITY_COUNT = + T.let( + :SPEND_VELOCITY_COUNT, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + SPEND_VELOCITY_AMOUNT = + T.let( + :SPEND_VELOCITY_AMOUNT, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Attribute::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Parameters < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters, + Lithic::Internal::AnyHash + ) + end + + sig { returns(T.nilable(Lithic::AuthRules::SpendVelocityFilters)) } + attr_reader :filters + + sig do + params( + filters: Lithic::AuthRules::SpendVelocityFilters::OrHash + ).void + end + attr_writer :filters + + # The time period over which to calculate the spend velocity. + sig do + returns( + T.nilable( + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear + ) + ) + ) + end + attr_reader :period + + sig do + params( + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash + ) + ).void + end + attr_writer :period + + # The entity scope to evaluate the attribute against. + sig do + returns( + T.nilable( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol + ) + ) + end + attr_reader :scope + + sig do + params( + scope: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol + ).void + end + attr_writer :scope + + # Additional parameters for spend velocity attributes. Required when `attribute` + # is `SPEND_VELOCITY_COUNT` or `SPEND_VELOCITY_AMOUNT`. Not used for other + # attributes. + sig do + params( + filters: Lithic::AuthRules::SpendVelocityFilters::OrHash, + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth::OrHash, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash + ), + scope: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol + ).returns(T.attached_class) + end + def self.new( + filters: nil, + # The time period over which to calculate the spend velocity. + period: nil, + # The entity scope to evaluate the attribute against. + scope: nil + ) + end + + sig do + override.returns( + { + filters: Lithic::AuthRules::SpendVelocityFilters, + period: + T.any( + Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowDay, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowWeek, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowMonth, + Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear + ), + scope: + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::OrSymbol + } + ) + end + def to_hash + end + + # The entity scope to evaluate the attribute against. + module Scope + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD = + T.let( + :CARD, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol + ) + ACCOUNT = + T.let( + :ACCOUNT, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol + ) + GLOBAL = + T.let( + :GLOBAL, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::Scope::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/event_stream.rbi b/rbi/lithic/models/auth_rules/event_stream.rbi index dc64c203..d86de88c 100644 --- a/rbi/lithic/models/auth_rules/event_stream.rbi +++ b/rbi/lithic/models/auth_rules/event_stream.rbi @@ -30,6 +30,11 @@ module Lithic :ACH_DEBIT_RECEIPT, Lithic::AuthRules::EventStream::TaggedSymbol ) + CARD_TRANSACTION_UPDATE = + T.let( + :CARD_TRANSACTION_UPDATE, + Lithic::AuthRules::EventStream::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/spend_velocity_filters.rbi b/rbi/lithic/models/auth_rules/spend_velocity_filters.rbi new file mode 100644 index 00000000..0bafc15e --- /dev/null +++ b/rbi/lithic/models/auth_rules/spend_velocity_filters.rbi @@ -0,0 +1,58 @@ +# typed: strong + +module Lithic + module Models + module AuthRules + class SpendVelocityFilters < Lithic::Models::AuthRules::VelocityLimitFilters + OrHash = + T.type_alias do + T.any( + Lithic::AuthRules::SpendVelocityFilters, + Lithic::Internal::AnyHash + ) + end + + # Tag key-value pairs to exclude from the velocity calculation. Transactions + # matching all specified tag key-value pairs will be excluded from the calculated + # velocity. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_accessor :exclude_tags + + # Tag key-value pairs to include in the velocity calculation. Only transactions + # matching all specified tag key-value pairs will be included in the calculated + # velocity. + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_accessor :include_tags + + sig do + params( + exclude_tags: T.nilable(T::Hash[Symbol, String]), + include_tags: T.nilable(T::Hash[Symbol, String]) + ).returns(T.attached_class) + end + def self.new( + # Tag key-value pairs to exclude from the velocity calculation. Transactions + # matching all specified tag key-value pairs will be excluded from the calculated + # velocity. + exclude_tags: nil, + # Tag key-value pairs to include in the velocity calculation. Only transactions + # matching all specified tag key-value pairs will be included in the calculated + # velocity. + include_tags: nil + ) + end + + sig do + override.returns( + { + exclude_tags: T.nilable(T::Hash[Symbol, String]), + include_tags: T.nilable(T::Hash[Symbol, String]) + } + ) + end + def to_hash + end + end + end + end +end diff --git a/rbi/lithic/models/auth_rules/v2_create_params.rbi b/rbi/lithic/models/auth_rules/v2_create_params.rbi index 513ef472..258e3066 100644 --- a/rbi/lithic/models/auth_rules/v2_create_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_create_params.rbi @@ -85,6 +85,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) ) @@ -101,7 +102,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig do @@ -151,6 +153,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ), type: @@ -174,7 +177,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, @@ -201,6 +205,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ), type: @@ -229,6 +234,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end @@ -254,7 +260,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type @@ -331,6 +338,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) ) @@ -347,7 +355,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig do @@ -384,6 +393,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ), type: @@ -407,7 +417,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, @@ -431,6 +442,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ), type: @@ -457,6 +469,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end @@ -482,7 +495,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type @@ -555,6 +569,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) ) @@ -575,7 +590,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. sig do @@ -634,6 +650,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ), program_level: T::Boolean, @@ -661,7 +678,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. type:, @@ -690,6 +708,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ), program_level: T::Boolean, @@ -720,6 +739,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end @@ -745,7 +765,8 @@ module Lithic # - `VELOCITY_LIMIT`: AUTHORIZATION event stream. # - `MERCHANT_LOCK`: AUTHORIZATION event stream. # - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, - # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. + # ACH_CREDIT_RECEIPT, ACH_DEBIT_RECEIPT, or CARD_TRANSACTION_UPDATE event + # stream. # - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION, # ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream. module Type diff --git a/rbi/lithic/models/auth_rules/v2_draft_params.rbi b/rbi/lithic/models/auth_rules/v2_draft_params.rbi index 7d72e691..68c08f36 100644 --- a/rbi/lithic/models/auth_rules/v2_draft_params.rbi +++ b/rbi/lithic/models/auth_rules/v2_draft_params.rbi @@ -27,6 +27,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) ) @@ -47,6 +48,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ) ), @@ -75,6 +77,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) ), @@ -99,6 +102,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters, Lithic::AuthRules::ConditionalACHActionParameters, Lithic::AuthRules::ConditionalTokenizationActionParameters, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters, Lithic::AuthRules::TypescriptCodeParameters ) end diff --git a/rbi/lithic/resources/auth_rules/v2.rbi b/rbi/lithic/resources/auth_rules/v2.rbi index dcca7b61..4dd0cb26 100644 --- a/rbi/lithic/resources/auth_rules/v2.rbi +++ b/rbi/lithic/resources/auth_rules/v2.rbi @@ -122,6 +122,7 @@ module Lithic Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash, Lithic::AuthRules::ConditionalACHActionParameters::OrHash, Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash, + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::OrHash, Lithic::AuthRules::TypescriptCodeParameters::OrHash ) ), diff --git a/sig/lithic/models/auth_rules/auth_rule.rbs b/sig/lithic/models/auth_rules/auth_rule.rbs index e1b1d8c1..cb228886 100644 --- a/sig/lithic/models/auth_rules/auth_rule.rbs +++ b/sig/lithic/models/auth_rules/auth_rule.rbs @@ -126,6 +126,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters @@ -174,6 +175,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters diff --git a/sig/lithic/models/auth_rules/auth_rule_version.rbs b/sig/lithic/models/auth_rules/auth_rule_version.rbs index bc0aa6f2..15562cf9 100644 --- a/sig/lithic/models/auth_rules/auth_rule_version.rbs +++ b/sig/lithic/models/auth_rules/auth_rule_version.rbs @@ -42,6 +42,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters diff --git a/sig/lithic/models/auth_rules/card_transaction_update_action.rbs b/sig/lithic/models/auth_rules/card_transaction_update_action.rbs new file mode 100644 index 00000000..70f2af02 --- /dev/null +++ b/sig/lithic/models/auth_rules/card_transaction_update_action.rbs @@ -0,0 +1,100 @@ +module Lithic + module Models + module AuthRules + type card_transaction_update_action = + Lithic::AuthRules::CardTransactionUpdateAction::TagAction + | Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction + + module CardTransactionUpdateAction + extend Lithic::Internal::Type::Union + + type tag_action = + { + key: String, + type: Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::type_, + value: String + } + + class TagAction < Lithic::Internal::Type::BaseModel + attr_accessor key: String + + attr_accessor type: Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::type_ + + attr_accessor value: String + + def initialize: ( + key: String, + type: Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::type_, + value: String + ) -> void + + def to_hash: -> { + key: String, + type: Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::type_, + value: String + } + + type type_ = :TAG + + module Type + extend Lithic::Internal::Type::Enum + + TAG: :TAG + + def self?.values: -> ::Array[Lithic::Models::AuthRules::CardTransactionUpdateAction::TagAction::type_] + end + end + + type create_case_action = + { + queue_token: String, + scope: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_ + } + + class CreateCaseAction < Lithic::Internal::Type::BaseModel + attr_accessor queue_token: String + + attr_accessor scope: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope + + attr_accessor type: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_ + + def initialize: ( + queue_token: String, + scope: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_ + ) -> void + + def to_hash: -> { + queue_token: String, + scope: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope, + type: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_ + } + + type scope = :CARD | :ACCOUNT + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope] + end + + type type_ = :CREATE_CASE + + module Type + extend Lithic::Internal::Type::Enum + + CREATE_CASE: :CREATE_CASE + + def self?.values: -> ::Array[Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_] + end + end + + def self?.variants: -> ::Array[Lithic::Models::AuthRules::card_transaction_update_action] + end + end + end +end diff --git a/sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs b/sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs new file mode 100644 index 00000000..ec5eb63b --- /dev/null +++ b/sig/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbs @@ -0,0 +1,155 @@ +module Lithic + module Models + module AuthRules + type conditional_card_transaction_update_action_parameters = + { + action: Lithic::Models::AuthRules::card_transaction_update_action, + conditions: ::Array[Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition] + } + + class ConditionalCardTransactionUpdateActionParameters < Lithic::Internal::Type::BaseModel + attr_accessor action: Lithic::Models::AuthRules::card_transaction_update_action + + attr_accessor conditions: ::Array[Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition] + + def initialize: ( + action: Lithic::Models::AuthRules::card_transaction_update_action, + conditions: ::Array[Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition] + ) -> void + + def to_hash: -> { + action: Lithic::Models::AuthRules::card_transaction_update_action, + conditions: ::Array[Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition] + } + + type condition = + { + attribute: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value, + parameters: Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + } + + class Condition < Lithic::Internal::Type::BaseModel + attr_accessor attribute: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::attribute + + attr_accessor operation: Lithic::Models::AuthRules::conditional_operation + + attr_accessor value: Lithic::Models::AuthRules::conditional_value + + attr_reader parameters: Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters? + + def parameters=: ( + Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + ) -> Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + + def initialize: ( + attribute: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value, + ?parameters: Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + ) -> void + + def to_hash: -> { + attribute: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::attribute, + operation: Lithic::Models::AuthRules::conditional_operation, + value: Lithic::Models::AuthRules::conditional_value, + parameters: Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters + } + + type attribute = + :MCC + | :COUNTRY + | :CURRENCY + | :MERCHANT_ID + | :DESCRIPTOR + | :TRANSACTION_AMOUNT + | :RISK_SCORE + | :TRANSACTION_STATUS + | :LAST_EVENT_TYPE + | :LIABILITY_SHIFT + | :PAN_ENTRY_MODE + | :WALLET_TYPE + | :CARD_AGE + | :ACCOUNT_AGE + | :SPEND_VELOCITY_COUNT + | :SPEND_VELOCITY_AMOUNT + + module Attribute + extend Lithic::Internal::Type::Enum + + MCC: :MCC + COUNTRY: :COUNTRY + CURRENCY: :CURRENCY + MERCHANT_ID: :MERCHANT_ID + DESCRIPTOR: :DESCRIPTOR + TRANSACTION_AMOUNT: :TRANSACTION_AMOUNT + RISK_SCORE: :RISK_SCORE + TRANSACTION_STATUS: :TRANSACTION_STATUS + LAST_EVENT_TYPE: :LAST_EVENT_TYPE + LIABILITY_SHIFT: :LIABILITY_SHIFT + PAN_ENTRY_MODE: :PAN_ENTRY_MODE + WALLET_TYPE: :WALLET_TYPE + CARD_AGE: :CARD_AGE + ACCOUNT_AGE: :ACCOUNT_AGE + SPEND_VELOCITY_COUNT: :SPEND_VELOCITY_COUNT + SPEND_VELOCITY_AMOUNT: :SPEND_VELOCITY_AMOUNT + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::attribute] + end + + type parameters = + { + filters: Lithic::AuthRules::SpendVelocityFilters, + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope + } + + class Parameters < Lithic::Internal::Type::BaseModel + attr_reader filters: Lithic::AuthRules::SpendVelocityFilters? + + def filters=: ( + Lithic::AuthRules::SpendVelocityFilters + ) -> Lithic::AuthRules::SpendVelocityFilters + + attr_reader period: Lithic::Models::AuthRules::velocity_limit_period? + + def period=: ( + Lithic::Models::AuthRules::velocity_limit_period + ) -> Lithic::Models::AuthRules::velocity_limit_period + + attr_reader scope: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope? + + def scope=: ( + Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope + ) -> Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope + + def initialize: ( + ?filters: Lithic::AuthRules::SpendVelocityFilters, + ?period: Lithic::Models::AuthRules::velocity_limit_period, + ?scope: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope + ) -> void + + def to_hash: -> { + filters: Lithic::AuthRules::SpendVelocityFilters, + period: Lithic::Models::AuthRules::velocity_limit_period, + scope: Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope + } + + type scope = :CARD | :ACCOUNT | :GLOBAL + + module Scope + extend Lithic::Internal::Type::Enum + + CARD: :CARD + ACCOUNT: :ACCOUNT + GLOBAL: :GLOBAL + + def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalCardTransactionUpdateActionParameters::Condition::Parameters::scope] + end + end + end + end + end + end +end diff --git a/sig/lithic/models/auth_rules/event_stream.rbs b/sig/lithic/models/auth_rules/event_stream.rbs index f8261bad..60b698c5 100644 --- a/sig/lithic/models/auth_rules/event_stream.rbs +++ b/sig/lithic/models/auth_rules/event_stream.rbs @@ -7,6 +7,7 @@ module Lithic | :TOKENIZATION | :ACH_CREDIT_RECEIPT | :ACH_DEBIT_RECEIPT + | :CARD_TRANSACTION_UPDATE module EventStream extend Lithic::Internal::Type::Enum @@ -16,6 +17,7 @@ module Lithic TOKENIZATION: :TOKENIZATION ACH_CREDIT_RECEIPT: :ACH_CREDIT_RECEIPT ACH_DEBIT_RECEIPT: :ACH_DEBIT_RECEIPT + CARD_TRANSACTION_UPDATE: :CARD_TRANSACTION_UPDATE def self?.values: -> ::Array[Lithic::Models::AuthRules::event_stream] end diff --git a/sig/lithic/models/auth_rules/spend_velocity_filters.rbs b/sig/lithic/models/auth_rules/spend_velocity_filters.rbs new file mode 100644 index 00000000..195aa6b2 --- /dev/null +++ b/sig/lithic/models/auth_rules/spend_velocity_filters.rbs @@ -0,0 +1,35 @@ +module Lithic + module Models + module AuthRules + type spend_velocity_filters = + { + exclude_tags: ::Hash[Symbol, String]?, + include_tags: ::Hash[Symbol, String]? + } + + class SpendVelocityFilters < Lithic::Models::AuthRules::VelocityLimitFilters + def exclude_tags: -> ::Hash[Symbol, String]? + + def exclude_tags=: ( + ::Hash[Symbol, String]? _ + ) -> ::Hash[Symbol, String]? + + def include_tags: -> ::Hash[Symbol, String]? + + def include_tags=: ( + ::Hash[Symbol, String]? _ + ) -> ::Hash[Symbol, String]? + + def initialize: ( + ?exclude_tags: ::Hash[Symbol, String]?, + ?include_tags: ::Hash[Symbol, String]? + ) -> void + + def to_hash: -> { + exclude_tags: ::Hash[Symbol, String]?, + include_tags: ::Hash[Symbol, String]? + } + end + end + end +end diff --git a/sig/lithic/models/auth_rules/v2_create_params.rbs b/sig/lithic/models/auth_rules/v2_create_params.rbs index f674471f..ac85aca8 100644 --- a/sig/lithic/models/auth_rules/v2_create_params.rbs +++ b/sig/lithic/models/auth_rules/v2_create_params.rbs @@ -86,6 +86,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters @@ -162,6 +163,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters @@ -261,6 +263,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters diff --git a/sig/lithic/models/auth_rules/v2_draft_params.rbs b/sig/lithic/models/auth_rules/v2_draft_params.rbs index 005a0955..7f429771 100644 --- a/sig/lithic/models/auth_rules/v2_draft_params.rbs +++ b/sig/lithic/models/auth_rules/v2_draft_params.rbs @@ -36,6 +36,7 @@ module Lithic | Lithic::AuthRules::ConditionalAuthorizationActionParameters | Lithic::AuthRules::ConditionalACHActionParameters | Lithic::AuthRules::ConditionalTokenizationActionParameters + | Lithic::AuthRules::ConditionalCardTransactionUpdateActionParameters | Lithic::AuthRules::TypescriptCodeParameters module Parameters From d64092298474a61abec888af0edffc76d320996c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 May 2026 10:39:37 +0000 Subject: [PATCH 14/14] release: 0.13.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/lithic/version.rb | 2 +- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a7130553..d52d2b97 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.12.0" + ".": "0.13.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ae7832..2d93c054 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 0.13.0 (2026-05-06) + +Full Changelog: [v0.12.0...v0.13.0](https://github.com/lithic-com/lithic-ruby/compare/v0.12.0...v0.13.0) + +### Features + +* **api:** add AMEX network value to settlement models ([a209f16](https://github.com/lithic-com/lithic-ruby/commit/a209f16480d3a19ba50c00ea1c5b8c6b3950129e)) +* **api:** add CARD_TRANSACTION_UPDATE event stream to auth_rules ([7f395eb](https://github.com/lithic-com/lithic-ruby/commit/7f395eb5b666d1d5563705da6ebe8dd7d8d98787)) +* **api:** add IS_NEW_MERCHANT attribute to auth rules conditional authorization ([48b6bd5](https://github.com/lithic-com/lithic-ruby/commit/48b6bd5a7a5076b8e59b6b6f30730c4d1c706a0b)) +* support setting headers via env ([01b4c63](https://github.com/lithic-com/lithic-ruby/commit/01b4c634e91f47513e26619946ab010f5f1decec)) + + +### Bug Fixes + +* **api:** Allow null values for optional enum and object fields in schema validation ([9ebb823](https://github.com/lithic-com/lithic-ruby/commit/9ebb8239e22dc3f680560918ac628af6707a3114)) + + +### Chores + +* **internal:** codegen related update ([7da8cdf](https://github.com/lithic-com/lithic-ruby/commit/7da8cdf24a46edc1a7cdd8764275542590c729a7)) +* **internal:** more robust bootstrap script ([b03a0eb](https://github.com/lithic-com/lithic-ruby/commit/b03a0eb40e63ea3c40ffe90eaa30796a7722feac)) + + +### Documentation + +* **api:** update exp_month/exp_year descriptions in card create/renew params ([02db7be](https://github.com/lithic-com/lithic-ruby/commit/02db7be84225c5782bdcf2de90c55890bd2b0358)) +* **types:** clarify event_tokens and transaction_token fields in SettlementDetail ([5eacf6f](https://github.com/lithic-com/lithic-ruby/commit/5eacf6f69073956549ff4d3e2141d56650dd0ba7)) + ## 0.12.0 (2026-04-20) Full Changelog: [v0.11.0...v0.12.0](https://github.com/lithic-com/lithic-ruby/compare/v0.11.0...v0.12.0) diff --git a/Gemfile.lock b/Gemfile.lock index 4eba03fe..1c6d5542 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.12.0) + lithic (0.13.0) cgi connection_pool diff --git a/README.md b/README.md index e1731131..057c6c36 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "lithic", "~> 0.12.0" +gem "lithic", "~> 0.13.0" ``` diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 297e5449..6760a97d 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.12.0" + VERSION = "0.13.0" end