diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e7562934..0c2ecec6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.19.0" + ".": "0.20.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a5715819..fa1ea91c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-59c09c7355b21b663e001d2ee1086ebd0a70d9b5433823282bca296eedff9eb0.yml -openapi_spec_hash: d9c3b932c810809abc6e973d662ad376 -config_hash: 337a99d8cc30006358b7bc2531401669 +configured_endpoints: 215 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-113e179e6007c80abd835ff26bfdce4dd24beee5174678687431cb672ce06be8.yml +openapi_spec_hash: 0f42308e15d062d48e3d4857c39ac749 +config_hash: f6d04d790aaddf639fc04b7f0092e7ec diff --git a/CHANGELOG.md b/CHANGELOG.md index e65cdb43..21bec1ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.20.0 (2026-08-14) + +Full Changelog: [v0.19.0...v0.20.0](https://github.com/lithic-com/lithic-ruby/compare/v0.19.0...v0.20.0) + +### Features + +* **api:** add blockchain_addresses field to FinancialAccount model ([c46e82c](https://github.com/lithic-com/lithic-ruby/commit/c46e82cc5bf4560c31adc1ebd6e991b55a1c3f2d)) +* **api:** add blockchain_recipients resource ([437d522](https://github.com/lithic-com/lithic-ruby/commit/437d5226c1c6b1dfd8faaa70787e8b2ea533f14a)) +* **api:** add claim_token field/param and WRITE_OFF_REVERSED to disputes v2 ([d32fe12](https://github.com/lithic-com/lithic-ruby/commit/d32fe12d9edaa339a12b61333e542f24c67f3c2e)) +* **api:** add limit_cash_amount and limit_cash_count to velocity limit params ([4e4dfb7](https://github.com/lithic-com/lithic-ruby/commit/4e4dfb78069500939027ed67d445d63160cd9e1c)) +* **api:** add PROGRAM scope to auth rules, FINANCIAL_ACCOUNT/PROGRAM to case_entity ([1520693](https://github.com/lithic-com/lithic-ruby/commit/15206930f871b13afd3852083c6bf778a83e6eb9)) +* **api:** add STABLECOIN enum value to payment type ([5151e5d](https://github.com/lithic-com/lithic-ruby/commit/5151e5d6276054b59f41d32af07efae6badabcbb)) +* **api:** add stablecoin event types to payment/financial_event/statement_line_items ([2f1fbca](https://github.com/lithic-com/lithic-ruby/commit/2f1fbca332e111e3624d834a774db3f7d979f4a4)) +* **api:** add STABLECOIN method, make method_attributes nullable in Payment ([6ecbe70](https://github.com/lithic-com/lithic-ruby/commit/6ecbe702c2e3d1cd3e5623cecf46e4bc02fb3b41)) +* **api:** add stablecoin payment method type to payments ([80e026a](https://github.com/lithic-com/lithic-ruby/commit/80e026ae4b67579db63140dcaa70c44409b47b83)) + + +### Documentation + +* **api:** update cvv field documentation in Card and tokenization ([b520213](https://github.com/lithic-com/lithic-ruby/commit/b520213ceec3af853f96b5ca9e8ef32a34169a0a)) + ## 0.19.0 (2026-07-30) Full Changelog: [v0.18.1...v0.19.0](https://github.com/lithic-com/lithic-ruby/compare/v0.18.1...v0.19.0) diff --git a/Gemfile.lock b/Gemfile.lock index 310ca168..53f1b0d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - lithic (0.19.0) + lithic (0.20.0) cgi connection_pool diff --git a/README.md b/README.md index 18e8a51b..55ac7cac 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.19.0" +gem "lithic", "~> 0.20.0" ``` diff --git a/lib/lithic.rb b/lib/lithic.rb index 5a390511..79f7a288 100644 --- a/lib/lithic.rb +++ b/lib/lithic.rb @@ -167,6 +167,8 @@ require_relative "lithic/models/balance" require_relative "lithic/models/balance_list_params" require_relative "lithic/models/balance_updated_webhook_event" +require_relative "lithic/models/blockchain_recipient" +require_relative "lithic/models/blockchain_recipient_create_params" require_relative "lithic/models/book_transfer_create_params" require_relative "lithic/models/book_transfer_list_params" require_relative "lithic/models/book_transfer_retrieve_params" @@ -523,6 +525,7 @@ require_relative "lithic/resources/auth_rules/v2/backtests" require_relative "lithic/resources/auth_stream_enrollment" require_relative "lithic/resources/balances" +require_relative "lithic/resources/blockchain_recipients" require_relative "lithic/resources/book_transfers" require_relative "lithic/resources/card_authorizations" require_relative "lithic/resources/card_bulk_orders" diff --git a/lib/lithic/client.rb b/lib/lithic/client.rb index a6e1ea35..4aa7b80b 100644 --- a/lib/lithic/client.rb +++ b/lib/lithic/client.rb @@ -83,6 +83,9 @@ class Client < Lithic::Internal::Transport::BaseClient # @return [Lithic::Resources::ExternalBankAccounts] attr_reader :external_bank_accounts + # @return [Lithic::Resources::BlockchainRecipients] + attr_reader :blockchain_recipients + # @return [Lithic::Resources::Payments] attr_reader :payments @@ -240,6 +243,7 @@ def initialize( @transactions = Lithic::Resources::Transactions.new(client: self) @responder_endpoints = Lithic::Resources::ResponderEndpoints.new(client: self) @external_bank_accounts = Lithic::Resources::ExternalBankAccounts.new(client: self) + @blockchain_recipients = Lithic::Resources::BlockchainRecipients.new(client: self) @payments = Lithic::Resources::Payments.new(client: self) @three_ds = Lithic::Resources::ThreeDS.new(client: self) @reports = Lithic::Resources::Reports.new(client: self) diff --git a/lib/lithic/models.rb b/lib/lithic/models.rb index 5f573ad8..e942c266 100644 --- a/lib/lithic/models.rb +++ b/lib/lithic/models.rb @@ -112,6 +112,10 @@ module Lithic BalanceUpdatedWebhookEvent = Lithic::Models::BalanceUpdatedWebhookEvent + BlockchainRecipient = Lithic::Models::BlockchainRecipient + + BlockchainRecipientCreateParams = Lithic::Models::BlockchainRecipientCreateParams + BookTransferCreateParams = Lithic::Models::BookTransferCreateParams BookTransferListParams = Lithic::Models::BookTransferListParams diff --git a/lib/lithic/models/auth_rules/ach_payment_update_action.rb b/lib/lithic/models/auth_rules/ach_payment_update_action.rb index 1a8e7528..2d99f5e1 100644 --- a/lib/lithic/models/auth_rules/ach_payment_update_action.rb +++ b/lib/lithic/models/auth_rules/ach_payment_update_action.rb @@ -82,6 +82,7 @@ module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/card_transaction_update_action.rb b/lib/lithic/models/auth_rules/card_transaction_update_action.rb index 774eaa3d..419ff35a 100644 --- a/lib/lithic/models/auth_rules/card_transaction_update_action.rb +++ b/lib/lithic/models/auth_rules/card_transaction_update_action.rb @@ -83,6 +83,7 @@ module Scope CARD = :CARD ACCOUNT = :ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/v2_list_results_response.rb b/lib/lithic/models/auth_rules/v2_list_results_response.rb index 7c4bf805..f5721d2f 100644 --- a/lib/lithic/models/auth_rules/v2_list_results_response.rb +++ b/lib/lithic/models/auth_rules/v2_list_results_response.rb @@ -1059,6 +1059,7 @@ module Scope CARD = :CARD ACCOUNT = :ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] @@ -1269,6 +1270,7 @@ module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/auth_rules/velocity_limit_params.rb b/lib/lithic/models/auth_rules/velocity_limit_params.rb index fab01fca..27cb0d30 100644 --- a/lib/lithic/models/auth_rules/velocity_limit_params.rb +++ b/lib/lithic/models/auth_rules/velocity_limit_params.rb @@ -29,6 +29,25 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @return [Integer, nil] optional :limit_amount, Integer, nil?: true + # @!attribute limit_cash_amount + # The maximum amount of cash spend velocity allowed in the period in minor units + # (the smallest unit of a currency, e.g. cents for USD). Cash spend covers ATM + # withdrawals, cash disbursements, and purchases with cashback. Transactions + # exceeding this limit will be declined. + # + # @return [Integer, nil] + optional :limit_cash_amount, Integer, nil?: true + + # @!attribute limit_cash_count + # The number of cash spend velocity impacting transactions may not exceed this + # limit in the period. Transactions exceeding this limit will be declined. A cash + # velocity impacting transaction is an ATM withdrawal, cash disbursement, or + # purchase with cashback that has been authorized, and optionally settled, or a + # force post (a transaction that settled without prior authorization). + # + # @return [Integer, nil] + optional :limit_cash_count, Integer, nil?: true + # @!attribute limit_count # The number of spend velocity impacting transactions may not exceed this limit in # the period. Transactions exceeding this limit will be declined. A spend velocity @@ -39,7 +58,7 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # @return [Integer, nil] optional :limit_count, Integer, nil?: true - # @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_count: nil) + # @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_cash_amount: nil, limit_cash_count: nil, limit_count: nil) # Some parameter documentations has been truncated, see # {Lithic::Models::AuthRules::VelocityLimitParams} for more details. # @@ -51,6 +70,10 @@ class VelocityLimitParams < Lithic::Internal::Type::BaseModel # # @param limit_amount [Integer, nil] The maximum amount of spend velocity allowed in the period in minor units (the s # + # @param limit_cash_amount [Integer, nil] The maximum amount of cash spend velocity allowed in the period in minor units ( + # + # @param limit_cash_count [Integer, nil] The number of cash spend velocity impacting transactions may not exceed this lim + # # @param limit_count [Integer, nil] The number of spend velocity impacting transactions may not exceed this limit in # The scope the velocity is calculated for diff --git a/lib/lithic/models/blockchain_recipient.rb b/lib/lithic/models/blockchain_recipient.rb new file mode 100644 index 00000000..be3aae98 --- /dev/null +++ b/lib/lithic/models/blockchain_recipient.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::BlockchainRecipients#create + class BlockchainRecipient < Lithic::Internal::Type::BaseModel + # @!attribute token + # A globally unique identifier for this blockchain recipient + # + # @return [String] + required :token, String + + # @!attribute account_token + # The financial account the blockchain recipient belongs to + # + # @return [String] + required :account_token, String + + # @!attribute address_tag + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + # + # @return [String, nil] + required :address_tag, String, nil?: true + + # @!attribute chain + # The blockchain network that the address belongs to + # + # @return [String] + required :chain, String + + # @!attribute created + # An ISO 8601 string representing when this blockchain recipient was created + # + # @return [Time] + required :created, Time + + # @!attribute external_id + # The identifier the recipient is registered under with the payment provider + # + # @return [String, nil] + required :external_id, String, nil?: true + + # @!attribute name + # The nickname for this blockchain recipient + # + # @return [String, nil] + required :name, String, nil?: true + + # @!attribute owner + # Legal name of the business or individual who owns the blockchain address + # + # @return [String] + required :owner, String + + # @!attribute owner_type + # Owner Type + # + # @return [Symbol, Lithic::Models::OwnerType] + required :owner_type, enum: -> { Lithic::OwnerType } + + # @!attribute program_id + # Globally unique identifier for the program the blockchain recipient is + # associated with + # + # @return [String] + required :program_id, String + + # @!attribute state + # Account State + # + # @return [Symbol, Lithic::Models::BlockchainRecipient::State] + required :state, enum: -> { Lithic::BlockchainRecipient::State } + + # @!attribute updated + # An ISO 8601 string representing when this blockchain recipient was last updated + # + # @return [Time] + required :updated, Time + + # @!attribute verification_state + # Verification State + # + # @return [Symbol, Lithic::Models::BlockchainRecipient::VerificationState] + required :verification_state, enum: -> { Lithic::BlockchainRecipient::VerificationState } + + # @!method initialize(token:, account_token:, address_tag:, chain:, created:, external_id:, name:, owner:, owner_type:, program_id:, state:, updated:, verification_state:) + # Some parameter documentations has been truncated, see + # {Lithic::Models::BlockchainRecipient} for more details. + # + # @param token [String] A globally unique identifier for this blockchain recipient + # + # @param account_token [String] The financial account the blockchain recipient belongs to + # + # @param address_tag [String, nil] An optional tag or memo used by some chains to identify the destination of a tra + # + # @param chain [String] The blockchain network that the address belongs to + # + # @param created [Time] An ISO 8601 string representing when this blockchain recipient was created + # + # @param external_id [String, nil] The identifier the recipient is registered under with the payment provider + # + # @param name [String, nil] The nickname for this blockchain recipient + # + # @param owner [String] Legal name of the business or individual who owns the blockchain address + # + # @param owner_type [Symbol, Lithic::Models::OwnerType] Owner Type + # + # @param program_id [String] Globally unique identifier for the program the blockchain recipient is associate + # + # @param state [Symbol, Lithic::Models::BlockchainRecipient::State] Account State + # + # @param updated [Time] An ISO 8601 string representing when this blockchain recipient was last updated + # + # @param verification_state [Symbol, Lithic::Models::BlockchainRecipient::VerificationState] Verification State + + # Account State + # + # @see Lithic::Models::BlockchainRecipient#state + module State + extend Lithic::Internal::Type::Enum + + ENABLED = :ENABLED + CLOSED = :CLOSED + PAUSED = :PAUSED + + # @!method self.values + # @return [Array] + end + + # Verification State + # + # @see Lithic::Models::BlockchainRecipient#verification_state + module VerificationState + extend Lithic::Internal::Type::Enum + + PENDING = :PENDING + ENABLED = :ENABLED + FAILED_VERIFICATION = :FAILED_VERIFICATION + INSUFFICIENT_FUNDS = :INSUFFICIENT_FUNDS + + # @!method self.values + # @return [Array] + end + end + end +end diff --git a/lib/lithic/models/blockchain_recipient_create_params.rb b/lib/lithic/models/blockchain_recipient_create_params.rb new file mode 100644 index 00000000..95fe5e98 --- /dev/null +++ b/lib/lithic/models/blockchain_recipient_create_params.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +module Lithic + module Models + # @see Lithic::Resources::BlockchainRecipients#create + class BlockchainRecipientCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + # @!attribute account_token + # The financial account the blockchain recipient belongs to + # + # @return [String] + required :account_token, String + + # @!attribute address + # The blockchain address funds will be withdrawn to + # + # @return [String] + required :address, String + + # @!attribute chain + # The blockchain network that the address belongs to + # + # @return [String] + required :chain, String + + # @!attribute owner + # Legal name of the business or individual who owns the blockchain address + # + # @return [String] + required :owner, String + + # @!attribute owner_type + # Owner Type + # + # @return [Symbol, Lithic::Models::OwnerType] + required :owner_type, enum: -> { Lithic::OwnerType } + + # @!attribute address_tag + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + # + # @return [String, nil] + optional :address_tag, String + + # @!attribute name + # The nickname for this blockchain recipient + # + # @return [String, nil] + optional :name, String + + # @!method initialize(account_token:, address:, chain:, owner:, owner_type:, address_tag: nil, name: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {Lithic::Models::BlockchainRecipientCreateParams} for more details. + # + # @param account_token [String] The financial account the blockchain recipient belongs to + # + # @param address [String] The blockchain address funds will be withdrawn to + # + # @param chain [String] The blockchain network that the address belongs to + # + # @param owner [String] Legal name of the business or individual who owns the blockchain address + # + # @param owner_type [Symbol, Lithic::Models::OwnerType] Owner Type + # + # @param address_tag [String] An optional tag or memo used by some chains to identify the destination of a tra + # + # @param name [String] The nickname for this blockchain recipient + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}] + end + end +end diff --git a/lib/lithic/models/card.rb b/lib/lithic/models/card.rb index cf117a9b..84bc3062 100644 --- a/lib/lithic/models/card.rb +++ b/lib/lithic/models/card.rb @@ -5,7 +5,7 @@ module Models # @see Lithic::Resources::Cards#create class Card < Lithic::Models::NonPCICard # @!attribute cvv - # Three digit cvv printed on the back of the card. + # Three or four digit CVV printed on the card. Amex cards use four digit CVVs # # @return [String, nil] optional :cvv, String @@ -24,7 +24,7 @@ class Card < Lithic::Models::NonPCICard # # Card details with potentially PCI sensitive information for Enterprise customers # - # @param cvv [String] Three digit cvv printed on the back of the card. + # @param cvv [String] Three or four digit CVV printed on the card. Amex cards use four digit CVVs # # @param pan [String] Primary Account Number (PAN) (i.e. the card number). Customers must be PCI compl end diff --git a/lib/lithic/models/dispute_v2.rb b/lib/lithic/models/dispute_v2.rb index 33775e17..92ed7d19 100644 --- a/lib/lithic/models/dispute_v2.rb +++ b/lib/lithic/models/dispute_v2.rb @@ -28,6 +28,13 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # @return [String, nil] required :case_id, String, nil?: true + # @!attribute claim_token + # Token for the claim this dispute was filed under, in UUID format. Null for + # disputes not initiated through the Dispute Intake API. + # + # @return [String, nil] + required :claim_token, String, nil?: true + # @!attribute created # When the dispute was created. # @@ -88,7 +95,7 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # @return [Time] required :updated, Time - # @!method initialize(token:, account_token:, card_token:, case_id:, created:, currency:, disposition:, events:, liability_allocation:, merchant:, network:, status:, transaction_series:, updated:) + # @!method initialize(token:, account_token:, card_token:, case_id:, claim_token:, created:, currency:, disposition:, events:, liability_allocation:, merchant:, network:, status:, transaction_series:, updated:) # Some parameter documentations has been truncated, see # {Lithic::Models::DisputeV2} for more details. # @@ -102,6 +109,8 @@ class DisputeV2 < Lithic::Internal::Type::BaseModel # # @param case_id [String, nil] Identifier assigned by the network for this dispute. # + # @param claim_token [String, nil] Token for the claim this dispute was filed under, in UUID format. Null for dispu + # # @param created [Time] When the dispute was created. # # @param currency [String] Three-letter ISO 4217 currency code. @@ -401,6 +410,7 @@ module Action PROVISIONAL_CREDIT_GRANTED = :PROVISIONAL_CREDIT_GRANTED PROVISIONAL_CREDIT_REVERSED = :PROVISIONAL_CREDIT_REVERSED WRITTEN_OFF = :WRITTEN_OFF + WRITE_OFF_REVERSED = :WRITE_OFF_REVERSED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/disputes_v2_list_params.rb b/lib/lithic/models/disputes_v2_list_params.rb index 04be824a..71c38ed2 100644 --- a/lib/lithic/models/disputes_v2_list_params.rb +++ b/lib/lithic/models/disputes_v2_list_params.rb @@ -25,6 +25,13 @@ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :card_token, String + # @!attribute claim_token + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + # + # @return [String, nil] + optional :claim_token, String + # @!attribute disputed_transaction_token # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. @@ -58,7 +65,7 @@ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :starting_after, String - # @!method initialize(account_token: nil, begin_: nil, card_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # @!method initialize(account_token: nil, begin_: nil, card_token: nil, claim_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Lithic::Models::DisputesV2ListParams} for more details. # @@ -68,6 +75,8 @@ class DisputesV2ListParams < Lithic::Internal::Type::BaseModel # # @param card_token [String] Filter by card token. # + # @param claim_token [String] Filter by the token of the claim the dispute was filed under. Returns the disput + # # @param disputed_transaction_token [String] Filter by the token of the transaction being disputed. Corresponds with transact # # @param end_ [Time] RFC 3339 timestamp for filtering by created date, inclusive. diff --git a/lib/lithic/models/financial_account.rb b/lib/lithic/models/financial_account.rb index 2cb731e3..2db52b0d 100644 --- a/lib/lithic/models/financial_account.rb +++ b/lib/lithic/models/financial_account.rb @@ -69,12 +69,23 @@ class FinancialAccount < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :account_number, String, nil?: true + # @!attribute blockchain_addresses + # Provisioned blockchain deposit addresses for this financial account, keyed by + # the full name of the blockchain network that each address belongs to (e.g. + # `ETHEREUM`) + # + # @return [Hash{Symbol=>String}, nil] + optional :blockchain_addresses, Lithic::Internal::Type::HashOf[String], nil?: true + # @!attribute routing_number # # @return [String, nil] optional :routing_number, String, nil?: true - # @!method initialize(token:, account_token:, created:, credit_configuration:, is_for_benefit_of:, nickname:, status:, substatus:, type:, updated:, user_defined_status:, account_number: nil, routing_number: nil) + # @!method initialize(token:, account_token:, created:, credit_configuration:, is_for_benefit_of:, nickname:, status:, substatus:, type:, updated:, user_defined_status:, account_number: nil, blockchain_addresses: nil, routing_number: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::FinancialAccount} for more details. + # # @param token [String] Globally unique identifier for the account # # @param account_token [String, nil] @@ -99,6 +110,8 @@ class FinancialAccount < Lithic::Internal::Type::BaseModel # # @param account_number [String, nil] # + # @param blockchain_addresses [Hash{Symbol=>String}, nil] Provisioned blockchain deposit addresses for this financial account, keyed by th + # # @param routing_number [String, nil] # @see Lithic::Models::FinancialAccount#credit_configuration diff --git a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb index 3041c2ff..5023e2b2 100644 --- a/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +++ b/lib/lithic/models/financial_accounts/statements/statement_line_items.rb @@ -272,8 +272,11 @@ module EventType MONTHLY_REVERSAL = :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED = :STABLECOIN_RECEIVED + STABLECOIN_INITIATED = :STABLECOIN_INITIATED STABLECOIN_REVIEWED = :STABLECOIN_REVIEWED + STABLECOIN_SENT = :STABLECOIN_SENT STABLECOIN_SETTLED = :STABLECOIN_SETTLED + STABLECOIN_REJECTED = :STABLECOIN_REJECTED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/financial_event.rb b/lib/lithic/models/financial_event.rb index 2dadb051..1e111999 100644 --- a/lib/lithic/models/financial_event.rb +++ b/lib/lithic/models/financial_event.rb @@ -159,8 +159,11 @@ module Type MONTHLY_REVERSAL = :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED = :STABLECOIN_RECEIVED + STABLECOIN_INITIATED = :STABLECOIN_INITIATED STABLECOIN_REVIEWED = :STABLECOIN_REVIEWED + STABLECOIN_SENT = :STABLECOIN_SENT STABLECOIN_SETTLED = :STABLECOIN_SETTLED + STABLECOIN_REJECTED = :STABLECOIN_REJECTED # @!method self.values # @return [Array] diff --git a/lib/lithic/models/payment.rb b/lib/lithic/models/payment.rb index 99d200f1..ce118684 100644 --- a/lib/lithic/models/payment.rb +++ b/lib/lithic/models/payment.rb @@ -61,7 +61,7 @@ class Payment < Lithic::Internal::Type::BaseModel # @!attribute method_attributes # Method-specific attributes # - # @return [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes] + # @return [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes, Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes] required :method_attributes, union: -> { Lithic::Payment::MethodAttributes } # @!attribute pending_amount @@ -106,6 +106,12 @@ class Payment < Lithic::Internal::Type::BaseModel # @return [Time] required :updated, Time + # @!attribute blockchain_recipient_token + # Token of the blockchain recipient the payout is sent to + # + # @return [String, nil] + optional :blockchain_recipient_token, String, nil?: true + # @!attribute currency # Currency of the transaction in ISO 4217 format # @@ -142,7 +148,7 @@ class Payment < Lithic::Internal::Type::BaseModel # @return [String, nil] optional :user_defined_id, String, nil?: true - # @!method initialize(token:, category:, created:, descriptor:, direction:, events:, financial_account_token:, method_:, method_attributes:, pending_amount:, related_account_tokens:, result:, settled_amount:, source:, status:, updated:, currency: nil, expected_release_date: nil, external_bank_account_token: nil, tags: nil, type: nil, user_defined_id: nil, family: :PAYMENT) + # @!method initialize(token:, category:, created:, descriptor:, direction:, events:, financial_account_token:, method_:, method_attributes:, pending_amount:, related_account_tokens:, result:, settled_amount:, source:, status:, updated:, blockchain_recipient_token: nil, currency: nil, expected_release_date: nil, external_bank_account_token: nil, tags: nil, type: nil, user_defined_id: nil, family: :PAYMENT) # Some parameter documentations has been truncated, see {Lithic::Models::Payment} # for more details. # @@ -164,7 +170,7 @@ class Payment < Lithic::Internal::Type::BaseModel # # @param method_ [Symbol, Lithic::Models::Payment::Method] Transfer method # - # @param method_attributes [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes] Method-specific attributes + # @param method_attributes [Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes, Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes] Method-specific attributes # # @param pending_amount [Integer] Pending amount in cents # @@ -180,6 +186,8 @@ class Payment < Lithic::Internal::Type::BaseModel # # @param updated [Time] ISO 8601 timestamp of when the transaction was last updated # + # @param blockchain_recipient_token [String, nil] Token of the blockchain recipient the payout is sent to + # # @param currency [String] Currency of the transaction in ISO 4217 format # # @param expected_release_date [Date, nil] Expected release date for the transaction @@ -327,8 +335,16 @@ class Event < Lithic::Internal::Type::BaseModel # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. # # @return [Symbol, Lithic::Models::Payment::Event::Type] required :type, enum: -> { Lithic::Payment::Event::Type } @@ -343,7 +359,9 @@ class Event < Lithic::Internal::Type::BaseModel # @!attribute external_id # Payment event external ID. For ACH transactions, this is the ACH trace number. # For inbound wire transfers, this is the IMAD (Input Message Accountability - # Data). + # Data). For stablecoin payments, this is the on-chain transaction hash of the + # transfer; it is present on events that reflect on-chain activity and null on + # internal lifecycle events. # # @return [String, nil] optional :external_id, String, nil?: true @@ -443,8 +461,16 @@ module Result # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. # # @see Lithic::Models::Payment::Event#type module Type @@ -473,8 +499,11 @@ module Type WIRE_RETURN_OUTBOUND_SETTLED = :WIRE_RETURN_OUTBOUND_SETTLED WIRE_RETURN_OUTBOUND_REJECTED = :WIRE_RETURN_OUTBOUND_REJECTED STABLECOIN_RECEIVED = :STABLECOIN_RECEIVED + STABLECOIN_INITIATED = :STABLECOIN_INITIATED STABLECOIN_REVIEWED = :STABLECOIN_REVIEWED + STABLECOIN_SENT = :STABLECOIN_SENT STABLECOIN_SETTLED = :STABLECOIN_SETTLED + STABLECOIN_REJECTED = :STABLECOIN_REJECTED # @!method self.values # @return [Array] @@ -505,6 +534,7 @@ module Method ACH_NEXT_DAY = :ACH_NEXT_DAY ACH_SAME_DAY = :ACH_SAME_DAY WIRE = :WIRE + STABLECOIN = :STABLECOIN # @!method self.values # @return [Array] @@ -520,6 +550,8 @@ module MethodAttributes variant -> { Lithic::Payment::MethodAttributes::WireMethodAttributes } + variant -> { Lithic::Payment::MethodAttributes::StablecoinMethodAttributes } + class ACHMethodAttributes < Lithic::Internal::Type::BaseModel # @!attribute sec_code # SEC code for ACH transaction @@ -692,8 +724,32 @@ module WireNetwork end end + class StablecoinMethodAttributes < Lithic::Internal::Type::BaseModel + # @!attribute chain + # Blockchain the stablecoin transfer settled on + # + # @return [String] + required :chain, String + + # @!attribute transaction_hash + # On-chain transaction hash of the transfer. Null until the transfer has settled + # on chain + # + # @return [String, nil] + optional :transaction_hash, String, nil?: true + + # @!method initialize(chain:, transaction_hash: nil) + # Some parameter documentations has been truncated, see + # {Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes} for more + # details. + # + # @param chain [String] Blockchain the stablecoin transfer settled on + # + # @param transaction_hash [String, nil] On-chain transaction hash of the transfer. Null until the transfer has settled o + end + # @!method self.variants - # @return [Array(Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes)] + # @return [Array(Lithic::Models::Payment::MethodAttributes::ACHMethodAttributes, Lithic::Models::Payment::MethodAttributes::WireMethodAttributes, Lithic::Models::Payment::MethodAttributes::StablecoinMethodAttributes)] end # @see Lithic::Models::Payment#related_account_tokens @@ -775,6 +831,7 @@ module Type WIRE_OUTBOUND_PAYMENT = :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN = :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST = :WIRE_INBOUND_DRAWDOWN_REQUEST + STABLECOIN = :STABLECOIN # @!method self.values # @return [Array] diff --git a/lib/lithic/models/tokenization_simulate_params.rb b/lib/lithic/models/tokenization_simulate_params.rb index ef9106f9..a8a79c02 100644 --- a/lib/lithic/models/tokenization_simulate_params.rb +++ b/lib/lithic/models/tokenization_simulate_params.rb @@ -8,7 +8,7 @@ class TokenizationSimulateParams < Lithic::Internal::Type::BaseModel include Lithic::Internal::Type::RequestParameters # @!attribute cvv - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. # # @return [String] required :cvv, String @@ -63,7 +63,7 @@ class TokenizationSimulateParams < Lithic::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {Lithic::Models::TokenizationSimulateParams} for more details. # - # @param cvv [String] The three digit cvv for the card. + # @param cvv [String] The three or four digit CVV for the card. AMEX cards use four digit CVVs. # # @param expiration_date [String] The expiration date of the card in 'MM/YY' format. # diff --git a/lib/lithic/models/transaction_monitoring/case_entity.rb b/lib/lithic/models/transaction_monitoring/case_entity.rb index c81e36f6..97589445 100644 --- a/lib/lithic/models/transaction_monitoring/case_entity.rb +++ b/lib/lithic/models/transaction_monitoring/case_entity.rb @@ -5,16 +5,21 @@ module Models module TransactionMonitoring class CaseEntity < Lithic::Internal::Type::BaseModel # @!attribute entity_token - # Globally unique identifier for the associated entity + # Globally unique identifier for the associated entity: the card token for `CARD`, + # the account token for `ACCOUNT`, and the financial account token for + # `FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual + # entity # - # @return [String] - required :entity_token, String + # @return [String, nil] + required :entity_token, String, nil?: true # @!attribute entity_type # The type of entity a case is associated with: # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program # # @return [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] required :entity_type, enum: -> { Lithic::TransactionMonitoring::CaseEntity::EntityType } @@ -25,7 +30,7 @@ class CaseEntity < Lithic::Internal::Type::BaseModel # # The entity a case is associated with # - # @param entity_token [String] Globally unique identifier for the associated entity + # @param entity_token [String, nil] Globally unique identifier for the associated entity: the card token for `CARD`, # # @param entity_type [Symbol, Lithic::Models::TransactionMonitoring::CaseEntity::EntityType] The type of entity a case is associated with: @@ -33,6 +38,8 @@ class CaseEntity < Lithic::Internal::Type::BaseModel # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program # # @see Lithic::Models::TransactionMonitoring::CaseEntity#entity_type module EntityType @@ -40,6 +47,8 @@ module EntityType CARD = :CARD ACCOUNT = :ACCOUNT + FINANCIAL_ACCOUNT = :FINANCIAL_ACCOUNT + PROGRAM = :PROGRAM # @!method self.values # @return [Array] diff --git a/lib/lithic/models/transaction_monitoring/case_list_params.rb b/lib/lithic/models/transaction_monitoring/case_list_params.rb index 95045da2..f28f309e 100644 --- a/lib/lithic/models/transaction_monitoring/case_list_params.rb +++ b/lib/lithic/models/transaction_monitoring/case_list_params.rb @@ -49,7 +49,9 @@ class CaseListParams < Lithic::Internal::Type::BaseModel optional :ending_before, String # @!attribute entity_token - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. # # @return [String, nil] optional :entity_token, String @@ -113,7 +115,7 @@ class CaseListParams < Lithic::Internal::Type::BaseModel # # @param ending_before [String] A cursor representing an item's token before which a page of results should end. # - # @param entity_token [String] Only return cases associated with the provided entity. + # @param entity_token [String] Only return cases associated with the provided entity. Accepts a card, account, # # @param page_size [Integer] Page size (for pagination). # diff --git a/lib/lithic/resources/blockchain_recipients.rb b/lib/lithic/resources/blockchain_recipients.rb new file mode 100644 index 00000000..e44883c4 --- /dev/null +++ b/lib/lithic/resources/blockchain_recipients.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +module Lithic + module Resources + class BlockchainRecipients + # Some parameter documentations has been truncated, see + # {Lithic::Models::BlockchainRecipientCreateParams} for more details. + # + # Register a blockchain address as a withdrawal destination for a financial + # account + # + # The recipient is created with a `PENDING` verification state and cannot receive + # a payout until screening of the address completes. Registering an address that + # is already registered to the same financial account returns the existing + # recipient and its current verification state, rather than creating a second one + # + # @overload create(account_token:, address:, chain:, owner:, owner_type:, address_tag: nil, name: nil, request_options: {}) + # + # @param account_token [String] The financial account the blockchain recipient belongs to + # + # @param address [String] The blockchain address funds will be withdrawn to + # + # @param chain [String] The blockchain network that the address belongs to + # + # @param owner [String] Legal name of the business or individual who owns the blockchain address + # + # @param owner_type [Symbol, Lithic::Models::OwnerType] Owner Type + # + # @param address_tag [String] An optional tag or memo used by some chains to identify the destination of a tra + # + # @param name [String] The nickname for this blockchain recipient + # + # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [Lithic::Models::BlockchainRecipient] + # + # @see Lithic::Models::BlockchainRecipientCreateParams + def create(params) + parsed, options = Lithic::BlockchainRecipientCreateParams.dump_request(params) + @client.request( + method: :post, + path: "v1/blockchain_recipients", + body: parsed, + model: Lithic::BlockchainRecipient, + options: options + ) + end + + # @api private + # + # @param client [Lithic::Client] + def initialize(client:) + @client = client + end + end + end +end diff --git a/lib/lithic/resources/disputes_v2.rb b/lib/lithic/resources/disputes_v2.rb index d92b14cb..49086abb 100644 --- a/lib/lithic/resources/disputes_v2.rb +++ b/lib/lithic/resources/disputes_v2.rb @@ -28,7 +28,7 @@ def retrieve(dispute_token, params = {}) # # Returns a paginated list of disputes. # - # @overload list(account_token: nil, begin_: nil, card_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) + # @overload list(account_token: nil, begin_: nil, card_token: nil, claim_token: nil, disputed_transaction_token: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, request_options: {}) # # @param account_token [String] Filter by account token. # @@ -36,6 +36,8 @@ def retrieve(dispute_token, params = {}) # # @param card_token [String] Filter by card token. # + # @param claim_token [String] Filter by the token of the claim the dispute was filed under. Returns the disput + # # @param disputed_transaction_token [String] Filter by the token of the transaction being disputed. Corresponds with transact # # @param end_ [Time] RFC 3339 timestamp for filtering by created date, inclusive. diff --git a/lib/lithic/resources/tokenizations.rb b/lib/lithic/resources/tokenizations.rb index 5ab741d8..7052a142 100644 --- a/lib/lithic/resources/tokenizations.rb +++ b/lib/lithic/resources/tokenizations.rb @@ -190,7 +190,7 @@ def resend_activation_code(tokenization_token, params = {}) # # @overload simulate(cvv:, expiration_date:, pan:, tokenization_source:, account_score: nil, device_score: nil, entity: nil, wallet_recommended_decision: nil, request_options: {}) # - # @param cvv [String] The three digit cvv for the card. + # @param cvv [String] The three or four digit CVV for the card. AMEX cards use four digit CVVs. # # @param expiration_date [String] The expiration date of the card in 'MM/YY' format. # diff --git a/lib/lithic/resources/transaction_monitoring/cases.rb b/lib/lithic/resources/transaction_monitoring/cases.rb index 3aabab5c..1b5c4960 100644 --- a/lib/lithic/resources/transaction_monitoring/cases.rb +++ b/lib/lithic/resources/transaction_monitoring/cases.rb @@ -92,7 +92,7 @@ def update(case_token, params = {}) # # @param ending_before [String] A cursor representing an item's token before which a page of results should end. # - # @param entity_token [String] Only return cases associated with the provided entity. + # @param entity_token [String] Only return cases associated with the provided entity. Accepts a card, account, # # @param page_size [Integer] Page size (for pagination). # diff --git a/lib/lithic/version.rb b/lib/lithic/version.rb index 2a47352e..125be3f9 100644 --- a/lib/lithic/version.rb +++ b/lib/lithic/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lithic - VERSION = "0.19.0" + VERSION = "0.20.0" end diff --git a/rbi/lithic/client.rbi b/rbi/lithic/client.rbi index 3ec35230..39761f9b 100644 --- a/rbi/lithic/client.rbi +++ b/rbi/lithic/client.rbi @@ -82,6 +82,9 @@ module Lithic sig { returns(Lithic::Resources::ExternalBankAccounts) } attr_reader :external_bank_accounts + sig { returns(Lithic::Resources::BlockchainRecipients) } + attr_reader :blockchain_recipients + sig { returns(Lithic::Resources::Payments) } attr_reader :payments diff --git a/rbi/lithic/models.rbi b/rbi/lithic/models.rbi index 7a10292c..80bceebc 100644 --- a/rbi/lithic/models.rbi +++ b/rbi/lithic/models.rbi @@ -87,6 +87,11 @@ module Lithic BalanceUpdatedWebhookEvent = Lithic::Models::BalanceUpdatedWebhookEvent + BlockchainRecipient = Lithic::Models::BlockchainRecipient + + BlockchainRecipientCreateParams = + Lithic::Models::BlockchainRecipientCreateParams + BookTransferCreateParams = Lithic::Models::BookTransferCreateParams BookTransferListParams = Lithic::Models::BookTransferListParams diff --git a/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi b/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi index acb88ec5..f1a212d9 100644 --- a/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi +++ b/rbi/lithic/models/auth_rules/ach_payment_update_action.rbi @@ -181,6 +181,11 @@ module Lithic :FINANCIAL_ACCOUNT, Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi b/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi index 9801b902..53104e00 100644 --- a/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi +++ b/rbi/lithic/models/auth_rules/card_transaction_update_action.rbi @@ -186,6 +186,11 @@ module Lithic :ACCOUNT, Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::AuthRules::CardTransactionUpdateAction::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi index 801431f6..e8df13df 100644 --- a/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +++ b/rbi/lithic/models/auth_rules/v2_list_results_response.rbi @@ -2594,6 +2594,11 @@ module Lithic :ACCOUNT, Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( @@ -3003,6 +3008,11 @@ module Lithic :FINANCIAL_ACCOUNT, Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::Scope::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi index d050b654..c25e5ae5 100644 --- a/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +++ b/rbi/lithic/models/auth_rules/velocity_limit_params.rbi @@ -44,6 +44,21 @@ module Lithic sig { returns(T.nilable(Integer)) } attr_accessor :limit_amount + # The maximum amount of cash spend velocity allowed in the period in minor units + # (the smallest unit of a currency, e.g. cents for USD). Cash spend covers ATM + # withdrawals, cash disbursements, and purchases with cashback. Transactions + # exceeding this limit will be declined. + sig { returns(T.nilable(Integer)) } + attr_accessor :limit_cash_amount + + # The number of cash spend velocity impacting transactions may not exceed this + # limit in the period. Transactions exceeding this limit will be declined. A cash + # velocity impacting transaction is an ATM withdrawal, cash disbursement, or + # purchase with cashback that has been authorized, and optionally settled, or a + # force post (a transaction that settled without prior authorization). + sig { returns(T.nilable(Integer)) } + attr_accessor :limit_cash_count + # The number of spend velocity impacting transactions may not exceed this limit in # the period. Transactions exceeding this limit will be declined. A spend velocity # impacting transaction is a transaction that has been authorized, and optionally @@ -65,6 +80,8 @@ module Lithic scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, filters: Lithic::AuthRules::VelocityLimitFilters::OrHash, limit_amount: T.nilable(Integer), + limit_cash_amount: T.nilable(Integer), + limit_cash_count: T.nilable(Integer), limit_count: T.nilable(Integer) ).returns(T.attached_class) end @@ -78,6 +95,17 @@ module Lithic # smallest unit of a currency, e.g. cents for USD). Transactions exceeding this # limit will be declined. limit_amount: nil, + # The maximum amount of cash spend velocity allowed in the period in minor units + # (the smallest unit of a currency, e.g. cents for USD). Cash spend covers ATM + # withdrawals, cash disbursements, and purchases with cashback. Transactions + # exceeding this limit will be declined. + limit_cash_amount: nil, + # The number of cash spend velocity impacting transactions may not exceed this + # limit in the period. Transactions exceeding this limit will be declined. A cash + # velocity impacting transaction is an ATM withdrawal, cash disbursement, or + # purchase with cashback that has been authorized, and optionally settled, or a + # force post (a transaction that settled without prior authorization). + limit_cash_count: nil, # The number of spend velocity impacting transactions may not exceed this limit in # the period. Transactions exceeding this limit will be declined. A spend velocity # impacting transaction is a transaction that has been authorized, and optionally @@ -101,6 +129,8 @@ module Lithic scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol, filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: T.nilable(Integer), + limit_cash_amount: T.nilable(Integer), + limit_cash_count: T.nilable(Integer), limit_count: T.nilable(Integer) } ) diff --git a/rbi/lithic/models/blockchain_recipient.rbi b/rbi/lithic/models/blockchain_recipient.rbi new file mode 100644 index 00000000..222c4da3 --- /dev/null +++ b/rbi/lithic/models/blockchain_recipient.rbi @@ -0,0 +1,207 @@ +# typed: strong + +module Lithic + module Models + class BlockchainRecipient < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any(Lithic::BlockchainRecipient, Lithic::Internal::AnyHash) + end + + # A globally unique identifier for this blockchain recipient + sig { returns(String) } + attr_accessor :token + + # The financial account the blockchain recipient belongs to + sig { returns(String) } + attr_accessor :account_token + + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + sig { returns(T.nilable(String)) } + attr_accessor :address_tag + + # The blockchain network that the address belongs to + sig { returns(String) } + attr_accessor :chain + + # An ISO 8601 string representing when this blockchain recipient was created + sig { returns(Time) } + attr_accessor :created + + # The identifier the recipient is registered under with the payment provider + sig { returns(T.nilable(String)) } + attr_accessor :external_id + + # The nickname for this blockchain recipient + sig { returns(T.nilable(String)) } + attr_accessor :name + + # Legal name of the business or individual who owns the blockchain address + sig { returns(String) } + attr_accessor :owner + + # Owner Type + sig { returns(Lithic::OwnerType::TaggedSymbol) } + attr_accessor :owner_type + + # Globally unique identifier for the program the blockchain recipient is + # associated with + sig { returns(String) } + attr_accessor :program_id + + # Account State + sig { returns(Lithic::BlockchainRecipient::State::TaggedSymbol) } + attr_accessor :state + + # An ISO 8601 string representing when this blockchain recipient was last updated + sig { returns(Time) } + attr_accessor :updated + + # Verification State + sig do + returns(Lithic::BlockchainRecipient::VerificationState::TaggedSymbol) + end + attr_accessor :verification_state + + sig do + params( + token: String, + account_token: String, + address_tag: T.nilable(String), + chain: String, + created: Time, + external_id: T.nilable(String), + name: T.nilable(String), + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + program_id: String, + state: Lithic::BlockchainRecipient::State::OrSymbol, + updated: Time, + verification_state: + Lithic::BlockchainRecipient::VerificationState::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # A globally unique identifier for this blockchain recipient + token:, + # The financial account the blockchain recipient belongs to + account_token:, + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + address_tag:, + # The blockchain network that the address belongs to + chain:, + # An ISO 8601 string representing when this blockchain recipient was created + created:, + # The identifier the recipient is registered under with the payment provider + external_id:, + # The nickname for this blockchain recipient + name:, + # Legal name of the business or individual who owns the blockchain address + owner:, + # Owner Type + owner_type:, + # Globally unique identifier for the program the blockchain recipient is + # associated with + program_id:, + # Account State + state:, + # An ISO 8601 string representing when this blockchain recipient was last updated + updated:, + # Verification State + verification_state: + ) + end + + sig do + override.returns( + { + token: String, + account_token: String, + address_tag: T.nilable(String), + chain: String, + created: Time, + external_id: T.nilable(String), + name: T.nilable(String), + owner: String, + owner_type: Lithic::OwnerType::TaggedSymbol, + program_id: String, + state: Lithic::BlockchainRecipient::State::TaggedSymbol, + updated: Time, + verification_state: + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + } + ) + end + def to_hash + end + + # Account State + module State + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias { T.all(Symbol, Lithic::BlockchainRecipient::State) } + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ENABLED = + T.let(:ENABLED, Lithic::BlockchainRecipient::State::TaggedSymbol) + CLOSED = + T.let(:CLOSED, Lithic::BlockchainRecipient::State::TaggedSymbol) + PAUSED = + T.let(:PAUSED, Lithic::BlockchainRecipient::State::TaggedSymbol) + + sig do + override.returns( + T::Array[Lithic::BlockchainRecipient::State::TaggedSymbol] + ) + end + def self.values + end + end + + # Verification State + module VerificationState + extend Lithic::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Lithic::BlockchainRecipient::VerificationState) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PENDING = + T.let( + :PENDING, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + ENABLED = + T.let( + :ENABLED, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + FAILED_VERIFICATION = + T.let( + :FAILED_VERIFICATION, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + INSUFFICIENT_FUNDS = + T.let( + :INSUFFICIENT_FUNDS, + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Lithic::BlockchainRecipient::VerificationState::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end +end diff --git a/rbi/lithic/models/blockchain_recipient_create_params.rbi b/rbi/lithic/models/blockchain_recipient_create_params.rbi new file mode 100644 index 00000000..f7465e8e --- /dev/null +++ b/rbi/lithic/models/blockchain_recipient_create_params.rbi @@ -0,0 +1,102 @@ +# typed: strong + +module Lithic + module Models + class BlockchainRecipientCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + Lithic::BlockchainRecipientCreateParams, + Lithic::Internal::AnyHash + ) + end + + # The financial account the blockchain recipient belongs to + sig { returns(String) } + attr_accessor :account_token + + # The blockchain address funds will be withdrawn to + sig { returns(String) } + attr_accessor :address + + # The blockchain network that the address belongs to + sig { returns(String) } + attr_accessor :chain + + # Legal name of the business or individual who owns the blockchain address + sig { returns(String) } + attr_accessor :owner + + # Owner Type + sig { returns(Lithic::OwnerType::OrSymbol) } + attr_accessor :owner_type + + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + sig { returns(T.nilable(String)) } + attr_reader :address_tag + + sig { params(address_tag: String).void } + attr_writer :address_tag + + # The nickname for this blockchain recipient + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + sig do + params( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The financial account the blockchain recipient belongs to + account_token:, + # The blockchain address funds will be withdrawn to + address:, + # The blockchain network that the address belongs to + chain:, + # Legal name of the business or individual who owns the blockchain address + owner:, + # Owner Type + owner_type:, + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + address_tag: nil, + # The nickname for this blockchain recipient + name: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions + } + ) + end + def to_hash + end + end + end +end diff --git a/rbi/lithic/models/card.rbi b/rbi/lithic/models/card.rbi index 61acefb0..8717c308 100644 --- a/rbi/lithic/models/card.rbi +++ b/rbi/lithic/models/card.rbi @@ -5,7 +5,7 @@ module Lithic class Card < Lithic::Models::NonPCICard OrHash = T.type_alias { T.any(Lithic::Card, Lithic::Internal::AnyHash) } - # Three digit cvv printed on the back of the card. + # Three or four digit CVV printed on the card. Amex cards use four digit CVVs sig { returns(T.nilable(String)) } attr_reader :cvv @@ -24,7 +24,7 @@ module Lithic # Card details with potentially PCI sensitive information for Enterprise customers sig { params(cvv: String, pan: String).returns(T.attached_class) } def self.new( - # Three digit cvv printed on the back of the card. + # Three or four digit CVV printed on the card. Amex cards use four digit CVVs cvv: nil, # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI # compliant to have PAN returned as a field in production. Please contact diff --git a/rbi/lithic/models/dispute_v2.rbi b/rbi/lithic/models/dispute_v2.rbi index f7a8f41b..510e74d2 100644 --- a/rbi/lithic/models/dispute_v2.rbi +++ b/rbi/lithic/models/dispute_v2.rbi @@ -22,6 +22,11 @@ module Lithic sig { returns(T.nilable(String)) } attr_accessor :case_id + # Token for the claim this dispute was filed under, in UUID format. Null for + # disputes not initiated through the Dispute Intake API. + sig { returns(T.nilable(String)) } + attr_accessor :claim_token + # When the dispute was created. sig { returns(Time) } attr_accessor :created @@ -87,6 +92,7 @@ module Lithic account_token: String, card_token: String, case_id: T.nilable(String), + claim_token: T.nilable(String), created: Time, currency: String, disposition: T.nilable(Lithic::DisputeV2::Disposition::OrSymbol), @@ -109,6 +115,9 @@ module Lithic card_token:, # Identifier assigned by the network for this dispute. case_id:, + # Token for the claim this dispute was filed under, in UUID format. Null for + # disputes not initiated through the Dispute Intake API. + claim_token:, # When the dispute was created. created:, # Three-letter ISO 4217 currency code. @@ -139,6 +148,7 @@ module Lithic account_token: String, card_token: String, case_id: T.nilable(String), + claim_token: T.nilable(String), created: Time, currency: String, disposition: @@ -722,6 +732,11 @@ module Lithic :WRITTEN_OFF, Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol ) + WRITE_OFF_REVERSED = + T.let( + :WRITE_OFF_REVERSED, + Lithic::DisputeV2::Event::Data::CardholderLiability::Action::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/disputes_v2_list_params.rbi b/rbi/lithic/models/disputes_v2_list_params.rbi index 4dd93783..569cd40e 100644 --- a/rbi/lithic/models/disputes_v2_list_params.rbi +++ b/rbi/lithic/models/disputes_v2_list_params.rbi @@ -32,6 +32,14 @@ module Lithic sig { params(card_token: String).void } attr_writer :card_token + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + sig { returns(T.nilable(String)) } + attr_reader :claim_token + + sig { params(claim_token: String).void } + attr_writer :claim_token + # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. sig { returns(T.nilable(String)) } @@ -75,6 +83,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, @@ -90,6 +99,9 @@ module Lithic begin_: nil, # Filter by card token. card_token: nil, + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + claim_token: nil, # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. disputed_transaction_token: nil, @@ -113,6 +125,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, diff --git a/rbi/lithic/models/financial_account.rbi b/rbi/lithic/models/financial_account.rbi index c80f0ef0..421ac2ac 100644 --- a/rbi/lithic/models/financial_account.rbi +++ b/rbi/lithic/models/financial_account.rbi @@ -59,6 +59,12 @@ module Lithic sig { returns(T.nilable(String)) } attr_accessor :account_number + # Provisioned blockchain deposit addresses for this financial account, keyed by + # the full name of the blockchain network that each address belongs to (e.g. + # `ETHEREUM`) + sig { returns(T.nilable(T::Hash[Symbol, String])) } + attr_accessor :blockchain_addresses + sig { returns(T.nilable(String)) } attr_accessor :routing_number @@ -77,6 +83,7 @@ module Lithic updated: Time, user_defined_status: T.nilable(String), account_number: T.nilable(String), + blockchain_addresses: T.nilable(T::Hash[Symbol, String]), routing_number: T.nilable(String) ).returns(T.attached_class) end @@ -98,6 +105,10 @@ module Lithic # User-defined status for the financial account user_defined_status:, account_number: nil, + # Provisioned blockchain deposit addresses for this financial account, keyed by + # the full name of the blockchain network that each address belongs to (e.g. + # `ETHEREUM`) + blockchain_addresses: nil, routing_number: nil ) end @@ -119,6 +130,7 @@ module Lithic updated: Time, user_defined_status: T.nilable(String), account_number: T.nilable(String), + blockchain_addresses: T.nilable(T::Hash[Symbol, String]), routing_number: T.nilable(String) } ) diff --git a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi index 6a526d5a..d170987e 100644 --- a/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +++ b/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi @@ -822,16 +822,31 @@ module Lithic :STABLECOIN_RECEIVED, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + STABLECOIN_INITIATED = + T.let( + :STABLECOIN_INITIATED, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) STABLECOIN_REVIEWED = T.let( :STABLECOIN_REVIEWED, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + STABLECOIN_SENT = + T.let( + :STABLECOIN_SENT, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) STABLECOIN_SETTLED = T.let( :STABLECOIN_SETTLED, Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol ) + STABLECOIN_REJECTED = + T.let( + :STABLECOIN_REJECTED, + Lithic::FinancialAccounts::Statements::StatementLineItems::Data::EventType::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/financial_event.rbi b/rbi/lithic/models/financial_event.rbi index 3b74a113..7de815e5 100644 --- a/rbi/lithic/models/financial_event.rbi +++ b/rbi/lithic/models/financial_event.rbi @@ -474,13 +474,25 @@ module Lithic :STABLECOIN_RECEIVED, Lithic::FinancialEvent::Type::TaggedSymbol ) + STABLECOIN_INITIATED = + T.let( + :STABLECOIN_INITIATED, + Lithic::FinancialEvent::Type::TaggedSymbol + ) STABLECOIN_REVIEWED = T.let( :STABLECOIN_REVIEWED, Lithic::FinancialEvent::Type::TaggedSymbol ) + STABLECOIN_SENT = + T.let(:STABLECOIN_SENT, Lithic::FinancialEvent::Type::TaggedSymbol) STABLECOIN_SETTLED = T.let(:STABLECOIN_SETTLED, Lithic::FinancialEvent::Type::TaggedSymbol) + STABLECOIN_REJECTED = + T.let( + :STABLECOIN_REJECTED, + Lithic::FinancialEvent::Type::TaggedSymbol + ) sig do override.returns(T::Array[Lithic::FinancialEvent::Type::TaggedSymbol]) diff --git a/rbi/lithic/models/payment.rbi b/rbi/lithic/models/payment.rbi index 85121151..de9e9396 100644 --- a/rbi/lithic/models/payment.rbi +++ b/rbi/lithic/models/payment.rbi @@ -82,6 +82,10 @@ module Lithic sig { returns(Time) } attr_accessor :updated + # Token of the blockchain recipient the payout is sent to + sig { returns(T.nilable(String)) } + attr_accessor :blockchain_recipient_token + # Currency of the transaction in ISO 4217 format sig { returns(T.nilable(String)) } attr_reader :currency @@ -129,7 +133,8 @@ module Lithic method_attributes: T.any( Lithic::Payment::MethodAttributes::ACHMethodAttributes::OrHash, - Lithic::Payment::MethodAttributes::WireMethodAttributes::OrHash + Lithic::Payment::MethodAttributes::WireMethodAttributes::OrHash, + Lithic::Payment::MethodAttributes::StablecoinMethodAttributes::OrHash ), pending_amount: Integer, related_account_tokens: @@ -139,6 +144,7 @@ module Lithic source: Lithic::Payment::Source::OrSymbol, status: Lithic::Payment::Status::OrSymbol, updated: Time, + blockchain_recipient_token: T.nilable(String), currency: String, expected_release_date: T.nilable(Date), external_bank_account_token: T.nilable(String), @@ -181,6 +187,8 @@ module Lithic status:, # ISO 8601 timestamp of when the transaction was last updated updated:, + # Token of the blockchain recipient the payout is sent to + blockchain_recipient_token: nil, # Currency of the transaction in ISO 4217 format currency: nil, # Expected release date for the transaction @@ -219,6 +227,7 @@ module Lithic source: Lithic::Payment::Source::TaggedSymbol, status: Lithic::Payment::Status::TaggedSymbol, updated: Time, + blockchain_recipient_token: T.nilable(String), currency: String, expected_release_date: T.nilable(Date), external_bank_account_token: T.nilable(String), @@ -387,8 +396,16 @@ module Lithic # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. sig { returns(Lithic::Payment::Event::Type::TaggedSymbol) } attr_accessor :type @@ -412,7 +429,9 @@ module Lithic # Payment event external ID. For ACH transactions, this is the ACH trace number. # For inbound wire transfers, this is the IMAD (Input Message Accountability - # Data). + # Data). For stablecoin payments, this is the on-chain transaction hash of the + # transfer; it is present on events that reflect on-chain activity and null on + # internal lifecycle events. sig { returns(T.nilable(String)) } attr_accessor :external_id @@ -501,14 +520,24 @@ module Lithic # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. type:, # More detailed reasons for the event detailed_results: nil, # Payment event external ID. For ACH transactions, this is the ACH trace number. # For inbound wire transfers, this is the IMAD (Input Message Accountability - # Data). + # Data). For stablecoin payments, this is the on-chain transaction hash of the + # transfer; it is present on events that reflect on-chain activity and null on + # internal lifecycle events. external_id: nil ) end @@ -610,8 +639,16 @@ module Lithic # # - `STABLECOIN_RECEIVED` - Stablecoin pay-in received on-chain and pending # release to available balance. - # - `STABLECOIN_REVIEWED` - Stablecoin pay-in has completed the review process. - # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance. + # - `STABLECOIN_INITIATED` - Stablecoin withdrawal initiated, with the funds + # placed on hold. + # - `STABLECOIN_REVIEWED` - Stablecoin pay-in or withdrawal has completed the + # review process. + # - `STABLECOIN_SENT` - Stablecoin withdrawal accepted for on-chain submission to + # the destination address, and pending confirmation. + # - `STABLECOIN_SETTLED` - Stablecoin pay-in funds released to available balance, + # or stablecoin withdrawal confirmed on-chain. + # - `STABLECOIN_REJECTED` - Stablecoin withdrawal failed and the hold placed at + # initiation has been reversed. module Type extend Lithic::Internal::Type::Enum @@ -734,16 +771,28 @@ module Lithic :STABLECOIN_RECEIVED, Lithic::Payment::Event::Type::TaggedSymbol ) + STABLECOIN_INITIATED = + T.let( + :STABLECOIN_INITIATED, + Lithic::Payment::Event::Type::TaggedSymbol + ) STABLECOIN_REVIEWED = T.let( :STABLECOIN_REVIEWED, Lithic::Payment::Event::Type::TaggedSymbol ) + STABLECOIN_SENT = + T.let(:STABLECOIN_SENT, Lithic::Payment::Event::Type::TaggedSymbol) STABLECOIN_SETTLED = T.let( :STABLECOIN_SETTLED, Lithic::Payment::Event::Type::TaggedSymbol ) + STABLECOIN_REJECTED = + T.let( + :STABLECOIN_REJECTED, + Lithic::Payment::Event::Type::TaggedSymbol + ) sig do override.returns( @@ -821,6 +870,7 @@ module Lithic ACH_SAME_DAY = T.let(:ACH_SAME_DAY, Lithic::Payment::Method::TaggedSymbol) WIRE = T.let(:WIRE, Lithic::Payment::Method::TaggedSymbol) + STABLECOIN = T.let(:STABLECOIN, Lithic::Payment::Method::TaggedSymbol) sig do override.returns(T::Array[Lithic::Payment::Method::TaggedSymbol]) @@ -837,7 +887,8 @@ module Lithic T.type_alias do T.any( Lithic::Payment::MethodAttributes::ACHMethodAttributes, - Lithic::Payment::MethodAttributes::WireMethodAttributes + Lithic::Payment::MethodAttributes::WireMethodAttributes, + Lithic::Payment::MethodAttributes::StablecoinMethodAttributes ) end @@ -1134,6 +1185,47 @@ module Lithic end end + class StablecoinMethodAttributes < Lithic::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Lithic::Payment::MethodAttributes::StablecoinMethodAttributes, + Lithic::Internal::AnyHash + ) + end + + # Blockchain the stablecoin transfer settled on + sig { returns(String) } + attr_accessor :chain + + # On-chain transaction hash of the transfer. Null until the transfer has settled + # on chain + sig { returns(T.nilable(String)) } + attr_accessor :transaction_hash + + sig do + params(chain: String, transaction_hash: T.nilable(String)).returns( + T.attached_class + ) + end + def self.new( + # Blockchain the stablecoin transfer settled on + chain:, + # On-chain transaction hash of the transfer. Null until the transfer has settled + # on chain + transaction_hash: nil + ) + end + + sig do + override.returns( + { chain: String, transaction_hash: T.nilable(String) } + ) + end + def to_hash + end + end + sig do override.returns( T::Array[Lithic::Payment::MethodAttributes::Variants] @@ -1270,6 +1362,7 @@ module Lithic :WIRE_INBOUND_DRAWDOWN_REQUEST, Lithic::Payment::Type::TaggedSymbol ) + STABLECOIN = T.let(:STABLECOIN, Lithic::Payment::Type::TaggedSymbol) sig { override.returns(T::Array[Lithic::Payment::Type::TaggedSymbol]) } def self.values diff --git a/rbi/lithic/models/tokenization_simulate_params.rbi b/rbi/lithic/models/tokenization_simulate_params.rbi index b56b7e96..7f3f0179 100644 --- a/rbi/lithic/models/tokenization_simulate_params.rbi +++ b/rbi/lithic/models/tokenization_simulate_params.rbi @@ -11,7 +11,7 @@ module Lithic T.any(Lithic::TokenizationSimulateParams, Lithic::Internal::AnyHash) end - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. sig { returns(String) } attr_accessor :cvv @@ -89,7 +89,7 @@ module Lithic ).returns(T.attached_class) end def self.new( - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. cvv:, # The expiration date of the card in 'MM/YY' format. expiration_date:, diff --git a/rbi/lithic/models/transaction_monitoring/case_entity.rbi b/rbi/lithic/models/transaction_monitoring/case_entity.rbi index 0c6f5690..c04f09a2 100644 --- a/rbi/lithic/models/transaction_monitoring/case_entity.rbi +++ b/rbi/lithic/models/transaction_monitoring/case_entity.rbi @@ -12,14 +12,19 @@ module Lithic ) end - # Globally unique identifier for the associated entity - sig { returns(String) } + # Globally unique identifier for the associated entity: the card token for `CARD`, + # the account token for `ACCOUNT`, and the financial account token for + # `FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual + # entity + sig { returns(T.nilable(String)) } attr_accessor :entity_token # The type of entity a case is associated with: # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program sig do returns( Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol @@ -30,18 +35,23 @@ module Lithic # The entity a case is associated with sig do params( - entity_token: String, + entity_token: T.nilable(String), entity_type: Lithic::TransactionMonitoring::CaseEntity::EntityType::OrSymbol ).returns(T.attached_class) end def self.new( - # Globally unique identifier for the associated entity + # Globally unique identifier for the associated entity: the card token for `CARD`, + # the account token for `ACCOUNT`, and the financial account token for + # `FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual + # entity entity_token:, # The type of entity a case is associated with: # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program entity_type: ) end @@ -49,7 +59,7 @@ module Lithic sig do override.returns( { - entity_token: String, + entity_token: T.nilable(String), entity_type: Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol } @@ -62,6 +72,8 @@ module Lithic # # - `CARD` - The case is associated with a card # - `ACCOUNT` - The case is associated with an account + # - `FINANCIAL_ACCOUNT` - The case is associated with a financial account + # - `PROGRAM` - The case is associated with the whole program module EntityType extend Lithic::Internal::Type::Enum @@ -84,6 +96,16 @@ module Lithic :ACCOUNT, Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol ) + FINANCIAL_ACCOUNT = + T.let( + :FINANCIAL_ACCOUNT, + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) + PROGRAM = + T.let( + :PROGRAM, + Lithic::TransactionMonitoring::CaseEntity::EntityType::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/lithic/models/transaction_monitoring/case_list_params.rbi b/rbi/lithic/models/transaction_monitoring/case_list_params.rbi index d917f0d9..0d5c2fac 100644 --- a/rbi/lithic/models/transaction_monitoring/case_list_params.rbi +++ b/rbi/lithic/models/transaction_monitoring/case_list_params.rbi @@ -61,7 +61,9 @@ module Lithic sig { params(ending_before: String).void } attr_writer :ending_before - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. sig { returns(T.nilable(String)) } attr_reader :entity_token @@ -170,7 +172,9 @@ module Lithic # A cursor representing an item's token before which a page of results should end. # Used to retrieve the previous page of results before this item. ending_before: nil, - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. entity_token: nil, # Page size (for pagination). page_size: nil, diff --git a/rbi/lithic/resources/blockchain_recipients.rbi b/rbi/lithic/resources/blockchain_recipients.rbi new file mode 100644 index 00000000..5a4926c4 --- /dev/null +++ b/rbi/lithic/resources/blockchain_recipients.rbi @@ -0,0 +1,51 @@ +# typed: strong + +module Lithic + module Resources + class BlockchainRecipients + # Register a blockchain address as a withdrawal destination for a financial + # account + # + # The recipient is created with a `PENDING` verification state and cannot receive + # a payout until screening of the address completes. Registering an address that + # is already registered to the same financial account returns the existing + # recipient and its current verification state, rather than creating a second one + sig do + params( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::OwnerType::OrSymbol, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions::OrHash + ).returns(Lithic::BlockchainRecipient) + end + def create( + # The financial account the blockchain recipient belongs to + account_token:, + # The blockchain address funds will be withdrawn to + address:, + # The blockchain network that the address belongs to + chain:, + # Legal name of the business or individual who owns the blockchain address + owner:, + # Owner Type + owner_type:, + # An optional tag or memo used by some chains to identify the destination of a + # transfer within a shared address + address_tag: nil, + # The nickname for this blockchain recipient + name: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: Lithic::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end +end diff --git a/rbi/lithic/resources/disputes_v2.rbi b/rbi/lithic/resources/disputes_v2.rbi index 23b97002..425134e9 100644 --- a/rbi/lithic/resources/disputes_v2.rbi +++ b/rbi/lithic/resources/disputes_v2.rbi @@ -23,6 +23,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, @@ -38,6 +39,9 @@ module Lithic begin_: nil, # Filter by card token. card_token: nil, + # Filter by the token of the claim the dispute was filed under. Returns the + # disputes created from that claim's disputed transaction events. + claim_token: nil, # Filter by the token of the transaction being disputed. Corresponds with # transaction_series.related_transaction_token in the Dispute. disputed_transaction_token: nil, diff --git a/rbi/lithic/resources/tokenizations.rbi b/rbi/lithic/resources/tokenizations.rbi index 12d04ff9..79a48c69 100644 --- a/rbi/lithic/resources/tokenizations.rbi +++ b/rbi/lithic/resources/tokenizations.rbi @@ -167,7 +167,7 @@ module Lithic ).returns(Lithic::Tokenization) end def simulate( - # The three digit cvv for the card. + # The three or four digit CVV for the card. AMEX cards use four digit CVVs. cvv:, # The expiration date of the card in 'MM/YY' format. expiration_date:, diff --git a/rbi/lithic/resources/transaction_monitoring/cases.rbi b/rbi/lithic/resources/transaction_monitoring/cases.rbi index 830b7f50..ed0487f8 100644 --- a/rbi/lithic/resources/transaction_monitoring/cases.rbi +++ b/rbi/lithic/resources/transaction_monitoring/cases.rbi @@ -120,7 +120,9 @@ module Lithic # A cursor representing an item's token before which a page of results should end. # Used to retrieve the previous page of results before this item. ending_before: nil, - # Only return cases associated with the provided entity. + # Only return cases associated with the provided entity. Accepts a card, account, + # or financial account token. Cases with a `PROGRAM` entity have no entity token + # and are never returned by this filter. entity_token: nil, # Page size (for pagination). page_size: nil, diff --git a/sig/lithic/client.rbs b/sig/lithic/client.rbs index c419da07..8b06370e 100644 --- a/sig/lithic/client.rbs +++ b/sig/lithic/client.rbs @@ -55,6 +55,8 @@ module Lithic attr_reader external_bank_accounts: Lithic::Resources::ExternalBankAccounts + attr_reader blockchain_recipients: Lithic::Resources::BlockchainRecipients + attr_reader payments: Lithic::Resources::Payments attr_reader three_ds: Lithic::Resources::ThreeDS diff --git a/sig/lithic/models.rbs b/sig/lithic/models.rbs index 8e2a2904..78828ae8 100644 --- a/sig/lithic/models.rbs +++ b/sig/lithic/models.rbs @@ -71,6 +71,10 @@ module Lithic class BalanceUpdatedWebhookEvent = Lithic::Models::BalanceUpdatedWebhookEvent + class BlockchainRecipient = Lithic::Models::BlockchainRecipient + + class BlockchainRecipientCreateParams = Lithic::Models::BlockchainRecipientCreateParams + class BookTransferCreateParams = Lithic::Models::BookTransferCreateParams class BookTransferListParams = Lithic::Models::BookTransferListParams diff --git a/sig/lithic/models/auth_rules/ach_payment_update_action.rbs b/sig/lithic/models/auth_rules/ach_payment_update_action.rbs index 6eb6d71c..5e6079e3 100644 --- a/sig/lithic/models/auth_rules/ach_payment_update_action.rbs +++ b/sig/lithic/models/auth_rules/ach_payment_update_action.rbs @@ -71,12 +71,13 @@ module Lithic type: Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::type_ } - type scope = :FINANCIAL_ACCOUNT + type scope = :FINANCIAL_ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::ACHPaymentUpdateAction::CreateCaseAction::scope] end diff --git a/sig/lithic/models/auth_rules/card_transaction_update_action.rbs b/sig/lithic/models/auth_rules/card_transaction_update_action.rbs index 70f2af02..2224c556 100644 --- a/sig/lithic/models/auth_rules/card_transaction_update_action.rbs +++ b/sig/lithic/models/auth_rules/card_transaction_update_action.rbs @@ -71,13 +71,14 @@ module Lithic type: Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::type_ } - type scope = :CARD | :ACCOUNT + type scope = :CARD | :ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum CARD: :CARD ACCOUNT: :ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::CardTransactionUpdateAction::CreateCaseAction::scope] end diff --git a/sig/lithic/models/auth_rules/v2_list_results_response.rbs b/sig/lithic/models/auth_rules/v2_list_results_response.rbs index c6cee1d6..dd15bb09 100644 --- a/sig/lithic/models/auth_rules/v2_list_results_response.rbs +++ b/sig/lithic/models/auth_rules/v2_list_results_response.rbs @@ -1078,13 +1078,14 @@ module Lithic explanation: String } - type scope = :CARD | :ACCOUNT + type scope = :CARD | :ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum CARD: :CARD ACCOUNT: :ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::CardTransactionUpdateResult::Action::CreateCaseAction::scope] end @@ -1255,12 +1256,13 @@ module Lithic explanation: String } - type scope = :FINANCIAL_ACCOUNT + type scope = :FINANCIAL_ACCOUNT | :PROGRAM module Scope extend Lithic::Internal::Type::Enum FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::AuthRules::V2ListResultsResponse::ACHPaymentUpdateResult::Action::CreateCaseAction::scope] end diff --git a/sig/lithic/models/auth_rules/velocity_limit_params.rbs b/sig/lithic/models/auth_rules/velocity_limit_params.rbs index cd93489d..ce06d04f 100644 --- a/sig/lithic/models/auth_rules/velocity_limit_params.rbs +++ b/sig/lithic/models/auth_rules/velocity_limit_params.rbs @@ -7,6 +7,8 @@ module Lithic scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: Integer?, + limit_cash_amount: Integer?, + limit_cash_count: Integer?, limit_count: Integer? } @@ -23,6 +25,10 @@ module Lithic attr_accessor limit_amount: Integer? + attr_accessor limit_cash_amount: Integer? + + attr_accessor limit_cash_count: Integer? + attr_accessor limit_count: Integer? def initialize: ( @@ -30,6 +36,8 @@ module Lithic scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, ?filters: Lithic::AuthRules::VelocityLimitFilters, ?limit_amount: Integer?, + ?limit_cash_amount: Integer?, + ?limit_cash_count: Integer?, ?limit_count: Integer? ) -> void @@ -38,6 +46,8 @@ module Lithic scope: Lithic::Models::AuthRules::VelocityLimitParams::scope, filters: Lithic::AuthRules::VelocityLimitFilters, limit_amount: Integer?, + limit_cash_amount: Integer?, + limit_cash_count: Integer?, limit_count: Integer? } diff --git a/sig/lithic/models/blockchain_recipient.rbs b/sig/lithic/models/blockchain_recipient.rbs new file mode 100644 index 00000000..6192929a --- /dev/null +++ b/sig/lithic/models/blockchain_recipient.rbs @@ -0,0 +1,106 @@ +module Lithic + module Models + type blockchain_recipient = + { + token: String, + account_token: String, + address_tag: String?, + chain: String, + created: Time, + external_id: String?, + name: String?, + owner: String, + owner_type: Lithic::Models::owner_type, + program_id: String, + state: Lithic::Models::BlockchainRecipient::state, + updated: Time, + verification_state: Lithic::Models::BlockchainRecipient::verification_state + } + + class BlockchainRecipient < Lithic::Internal::Type::BaseModel + attr_accessor token: String + + attr_accessor account_token: String + + attr_accessor address_tag: String? + + attr_accessor chain: String + + attr_accessor created: Time + + attr_accessor external_id: String? + + attr_accessor name: String? + + attr_accessor owner: String + + attr_accessor owner_type: Lithic::Models::owner_type + + attr_accessor program_id: String + + attr_accessor state: Lithic::Models::BlockchainRecipient::state + + attr_accessor updated: Time + + attr_accessor verification_state: Lithic::Models::BlockchainRecipient::verification_state + + def initialize: ( + token: String, + account_token: String, + address_tag: String?, + chain: String, + created: Time, + external_id: String?, + name: String?, + owner: String, + owner_type: Lithic::Models::owner_type, + program_id: String, + state: Lithic::Models::BlockchainRecipient::state, + updated: Time, + verification_state: Lithic::Models::BlockchainRecipient::verification_state + ) -> void + + def to_hash: -> { + token: String, + account_token: String, + address_tag: String?, + chain: String, + created: Time, + external_id: String?, + name: String?, + owner: String, + owner_type: Lithic::Models::owner_type, + program_id: String, + state: Lithic::Models::BlockchainRecipient::state, + updated: Time, + verification_state: Lithic::Models::BlockchainRecipient::verification_state + } + + type state = :ENABLED | :CLOSED | :PAUSED + + module State + extend Lithic::Internal::Type::Enum + + ENABLED: :ENABLED + CLOSED: :CLOSED + PAUSED: :PAUSED + + def self?.values: -> ::Array[Lithic::Models::BlockchainRecipient::state] + end + + type verification_state = + :PENDING | :ENABLED | :FAILED_VERIFICATION | :INSUFFICIENT_FUNDS + + module VerificationState + extend Lithic::Internal::Type::Enum + + PENDING: :PENDING + ENABLED: :ENABLED + FAILED_VERIFICATION: :FAILED_VERIFICATION + INSUFFICIENT_FUNDS: :INSUFFICIENT_FUNDS + + def self?.values: -> ::Array[Lithic::Models::BlockchainRecipient::verification_state] + end + end + end +end diff --git a/sig/lithic/models/blockchain_recipient_create_params.rbs b/sig/lithic/models/blockchain_recipient_create_params.rbs new file mode 100644 index 00000000..ccc10b06 --- /dev/null +++ b/sig/lithic/models/blockchain_recipient_create_params.rbs @@ -0,0 +1,60 @@ +module Lithic + module Models + type blockchain_recipient_create_params = + { + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + address_tag: String, + name: String + } + & Lithic::Internal::Type::request_parameters + + class BlockchainRecipientCreateParams < Lithic::Internal::Type::BaseModel + extend Lithic::Internal::Type::RequestParameters::Converter + include Lithic::Internal::Type::RequestParameters + + attr_accessor account_token: String + + attr_accessor address: String + + attr_accessor chain: String + + attr_accessor owner: String + + attr_accessor owner_type: Lithic::Models::owner_type + + attr_reader address_tag: String? + + def address_tag=: (String) -> String + + attr_reader name: String? + + def name=: (String) -> String + + def initialize: ( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + ?address_tag: String, + ?name: String, + ?request_options: Lithic::request_opts + ) -> void + + def to_hash: -> { + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + address_tag: String, + name: String, + request_options: Lithic::RequestOptions + } + end + end +end diff --git a/sig/lithic/models/dispute_v2.rbs b/sig/lithic/models/dispute_v2.rbs index 836a7b7b..5b32411e 100644 --- a/sig/lithic/models/dispute_v2.rbs +++ b/sig/lithic/models/dispute_v2.rbs @@ -6,6 +6,7 @@ module Lithic account_token: String, card_token: String, case_id: String?, + claim_token: String?, created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, @@ -27,6 +28,8 @@ module Lithic attr_accessor case_id: String? + attr_accessor claim_token: String? + attr_accessor created: Time attr_accessor currency: String @@ -52,6 +55,7 @@ module Lithic account_token: String, card_token: String, case_id: String?, + claim_token: String?, created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, @@ -69,6 +73,7 @@ module Lithic account_token: String, card_token: String, case_id: String?, + claim_token: String?, created: Time, currency: String, disposition: Lithic::Models::DisputeV2::disposition?, @@ -310,6 +315,7 @@ module Lithic :PROVISIONAL_CREDIT_GRANTED | :PROVISIONAL_CREDIT_REVERSED | :WRITTEN_OFF + | :WRITE_OFF_REVERSED module Action extend Lithic::Internal::Type::Enum @@ -317,6 +323,7 @@ module Lithic PROVISIONAL_CREDIT_GRANTED: :PROVISIONAL_CREDIT_GRANTED PROVISIONAL_CREDIT_REVERSED: :PROVISIONAL_CREDIT_REVERSED WRITTEN_OFF: :WRITTEN_OFF + WRITE_OFF_REVERSED: :WRITE_OFF_REVERSED def self?.values: -> ::Array[Lithic::Models::DisputeV2::Event::Data::CardholderLiability::action] end diff --git a/sig/lithic/models/disputes_v2_list_params.rbs b/sig/lithic/models/disputes_v2_list_params.rbs index 9e1444a9..8193442d 100644 --- a/sig/lithic/models/disputes_v2_list_params.rbs +++ b/sig/lithic/models/disputes_v2_list_params.rbs @@ -5,6 +5,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, @@ -29,6 +30,10 @@ module Lithic def card_token=: (String) -> String + attr_reader claim_token: String? + + def claim_token=: (String) -> String + attr_reader disputed_transaction_token: String? def disputed_transaction_token=: (String) -> String @@ -53,6 +58,7 @@ module Lithic ?account_token: String, ?begin_: Time, ?card_token: String, + ?claim_token: String, ?disputed_transaction_token: String, ?end_: Time, ?ending_before: String, @@ -65,6 +71,7 @@ module Lithic account_token: String, begin_: Time, card_token: String, + claim_token: String, disputed_transaction_token: String, end_: Time, ending_before: String, diff --git a/sig/lithic/models/financial_account.rbs b/sig/lithic/models/financial_account.rbs index 60fed134..9cb396d8 100644 --- a/sig/lithic/models/financial_account.rbs +++ b/sig/lithic/models/financial_account.rbs @@ -14,6 +14,7 @@ module Lithic updated: Time, user_defined_status: String?, account_number: String?, + blockchain_addresses: ::Hash[Symbol, String]?, routing_number: String? } @@ -42,6 +43,8 @@ module Lithic attr_accessor account_number: String? + attr_accessor blockchain_addresses: ::Hash[Symbol, String]? + attr_accessor routing_number: String? def initialize: ( @@ -57,6 +60,7 @@ module Lithic updated: Time, user_defined_status: String?, ?account_number: String?, + ?blockchain_addresses: ::Hash[Symbol, String]?, ?routing_number: String? ) -> void @@ -73,6 +77,7 @@ module Lithic updated: Time, user_defined_status: String?, account_number: String?, + blockchain_addresses: ::Hash[Symbol, String]?, routing_number: String? } diff --git a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs index 68bfec54..fb3bac8e 100644 --- a/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +++ b/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs @@ -257,8 +257,11 @@ module Lithic | :MONTHLY_REVERSAL | :ACCOUNT_TO_ACCOUNT | :STABLECOIN_RECEIVED + | :STABLECOIN_INITIATED | :STABLECOIN_REVIEWED + | :STABLECOIN_SENT | :STABLECOIN_SETTLED + | :STABLECOIN_REJECTED module EventType extend Lithic::Internal::Type::Enum @@ -354,8 +357,11 @@ module Lithic MONTHLY_REVERSAL: :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT: :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED: :STABLECOIN_RECEIVED + STABLECOIN_INITIATED: :STABLECOIN_INITIATED STABLECOIN_REVIEWED: :STABLECOIN_REVIEWED + STABLECOIN_SENT: :STABLECOIN_SENT STABLECOIN_SETTLED: :STABLECOIN_SETTLED + STABLECOIN_REJECTED: :STABLECOIN_REJECTED def self?.values: -> ::Array[Lithic::Models::FinancialAccounts::Statements::StatementLineItems::Data::event_type] end diff --git a/sig/lithic/models/financial_event.rbs b/sig/lithic/models/financial_event.rbs index 325179cc..a5f3e9ca 100644 --- a/sig/lithic/models/financial_event.rbs +++ b/sig/lithic/models/financial_event.rbs @@ -153,8 +153,11 @@ module Lithic | :MONTHLY_REVERSAL | :ACCOUNT_TO_ACCOUNT | :STABLECOIN_RECEIVED + | :STABLECOIN_INITIATED | :STABLECOIN_REVIEWED + | :STABLECOIN_SENT | :STABLECOIN_SETTLED + | :STABLECOIN_REJECTED module Type extend Lithic::Internal::Type::Enum @@ -250,8 +253,11 @@ module Lithic MONTHLY_REVERSAL: :MONTHLY_REVERSAL ACCOUNT_TO_ACCOUNT: :ACCOUNT_TO_ACCOUNT STABLECOIN_RECEIVED: :STABLECOIN_RECEIVED + STABLECOIN_INITIATED: :STABLECOIN_INITIATED STABLECOIN_REVIEWED: :STABLECOIN_REVIEWED + STABLECOIN_SENT: :STABLECOIN_SENT STABLECOIN_SETTLED: :STABLECOIN_SETTLED + STABLECOIN_REJECTED: :STABLECOIN_REJECTED def self?.values: -> ::Array[Lithic::Models::FinancialEvent::type_] end diff --git a/sig/lithic/models/payment.rbs b/sig/lithic/models/payment.rbs index a5f55aa8..9729d5fd 100644 --- a/sig/lithic/models/payment.rbs +++ b/sig/lithic/models/payment.rbs @@ -19,6 +19,7 @@ module Lithic source: Lithic::Models::Payment::source, status: Lithic::Models::Payment::status, updated: Time, + blockchain_recipient_token: String?, currency: String, expected_release_date: Date?, external_bank_account_token: String?, @@ -62,6 +63,8 @@ module Lithic attr_accessor updated: Time + attr_accessor blockchain_recipient_token: String? + attr_reader currency: String? def currency=: (String) -> String @@ -99,6 +102,7 @@ module Lithic source: Lithic::Models::Payment::source, status: Lithic::Models::Payment::status, updated: Time, + ?blockchain_recipient_token: String?, ?currency: String, ?expected_release_date: Date?, ?external_bank_account_token: String?, @@ -126,6 +130,7 @@ module Lithic source: Lithic::Models::Payment::source, status: Lithic::Models::Payment::status, updated: Time, + blockchain_recipient_token: String?, currency: String, expected_release_date: Date?, external_bank_account_token: String?, @@ -287,8 +292,11 @@ module Lithic | :WIRE_RETURN_OUTBOUND_SETTLED | :WIRE_RETURN_OUTBOUND_REJECTED | :STABLECOIN_RECEIVED + | :STABLECOIN_INITIATED | :STABLECOIN_REVIEWED + | :STABLECOIN_SENT | :STABLECOIN_SETTLED + | :STABLECOIN_REJECTED module Type extend Lithic::Internal::Type::Enum @@ -316,8 +324,11 @@ module Lithic WIRE_RETURN_OUTBOUND_SETTLED: :WIRE_RETURN_OUTBOUND_SETTLED WIRE_RETURN_OUTBOUND_REJECTED: :WIRE_RETURN_OUTBOUND_REJECTED STABLECOIN_RECEIVED: :STABLECOIN_RECEIVED + STABLECOIN_INITIATED: :STABLECOIN_INITIATED STABLECOIN_REVIEWED: :STABLECOIN_REVIEWED + STABLECOIN_SENT: :STABLECOIN_SENT STABLECOIN_SETTLED: :STABLECOIN_SETTLED + STABLECOIN_REJECTED: :STABLECOIN_REJECTED def self?.values: -> ::Array[Lithic::Models::Payment::Event::type_] end @@ -346,7 +357,7 @@ module Lithic end end - type method_ = :ACH_NEXT_DAY | :ACH_SAME_DAY | :WIRE + type method_ = :ACH_NEXT_DAY | :ACH_SAME_DAY | :WIRE | :STABLECOIN module Method extend Lithic::Internal::Type::Enum @@ -354,6 +365,7 @@ module Lithic ACH_NEXT_DAY: :ACH_NEXT_DAY ACH_SAME_DAY: :ACH_SAME_DAY WIRE: :WIRE + STABLECOIN: :STABLECOIN def self?.values: -> ::Array[Lithic::Models::Payment::method_] end @@ -361,6 +373,7 @@ module Lithic type method_attributes = Lithic::Payment::MethodAttributes::ACHMethodAttributes | Lithic::Payment::MethodAttributes::WireMethodAttributes + | Lithic::Payment::MethodAttributes::StablecoinMethodAttributes module MethodAttributes extend Lithic::Internal::Type::Union @@ -501,6 +514,19 @@ module Lithic end end + type stablecoin_method_attributes = + { chain: String, transaction_hash: String? } + + class StablecoinMethodAttributes < Lithic::Internal::Type::BaseModel + attr_accessor chain: String + + attr_accessor transaction_hash: String? + + def initialize: (chain: String, ?transaction_hash: String?) -> void + + def to_hash: -> { chain: String, transaction_hash: String? } + end + def self?.variants: -> ::Array[Lithic::Models::Payment::method_attributes] end @@ -572,6 +598,7 @@ module Lithic | :WIRE_OUTBOUND_PAYMENT | :WIRE_OUTBOUND_ADMIN | :WIRE_INBOUND_DRAWDOWN_REQUEST + | :STABLECOIN module Type extend Lithic::Internal::Type::Enum @@ -585,6 +612,7 @@ module Lithic WIRE_OUTBOUND_PAYMENT: :WIRE_OUTBOUND_PAYMENT WIRE_OUTBOUND_ADMIN: :WIRE_OUTBOUND_ADMIN WIRE_INBOUND_DRAWDOWN_REQUEST: :WIRE_INBOUND_DRAWDOWN_REQUEST + STABLECOIN: :STABLECOIN def self?.values: -> ::Array[Lithic::Models::Payment::type_] end diff --git a/sig/lithic/models/transaction_monitoring/case_entity.rbs b/sig/lithic/models/transaction_monitoring/case_entity.rbs index 5e13dc88..2fdb0473 100644 --- a/sig/lithic/models/transaction_monitoring/case_entity.rbs +++ b/sig/lithic/models/transaction_monitoring/case_entity.rbs @@ -3,32 +3,34 @@ module Lithic module TransactionMonitoring type case_entity = { - entity_token: String, + entity_token: String?, entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type } class CaseEntity < Lithic::Internal::Type::BaseModel - attr_accessor entity_token: String + attr_accessor entity_token: String? attr_accessor entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type def initialize: ( - entity_token: String, + entity_token: String?, entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type ) -> void def to_hash: -> { - entity_token: String, + entity_token: String?, entity_type: Lithic::Models::TransactionMonitoring::CaseEntity::entity_type } - type entity_type = :CARD | :ACCOUNT + type entity_type = :CARD | :ACCOUNT | :FINANCIAL_ACCOUNT | :PROGRAM module EntityType extend Lithic::Internal::Type::Enum CARD: :CARD ACCOUNT: :ACCOUNT + FINANCIAL_ACCOUNT: :FINANCIAL_ACCOUNT + PROGRAM: :PROGRAM def self?.values: -> ::Array[Lithic::Models::TransactionMonitoring::CaseEntity::entity_type] end diff --git a/sig/lithic/resources/blockchain_recipients.rbs b/sig/lithic/resources/blockchain_recipients.rbs new file mode 100644 index 00000000..e14f8c77 --- /dev/null +++ b/sig/lithic/resources/blockchain_recipients.rbs @@ -0,0 +1,18 @@ +module Lithic + module Resources + class BlockchainRecipients + def create: ( + account_token: String, + address: String, + chain: String, + owner: String, + owner_type: Lithic::Models::owner_type, + ?address_tag: String, + ?name: String, + ?request_options: Lithic::request_opts + ) -> Lithic::BlockchainRecipient + + def initialize: (client: Lithic::Client) -> void + end + end +end diff --git a/sig/lithic/resources/disputes_v2.rbs b/sig/lithic/resources/disputes_v2.rbs index 0c961b1c..82019c70 100644 --- a/sig/lithic/resources/disputes_v2.rbs +++ b/sig/lithic/resources/disputes_v2.rbs @@ -10,6 +10,7 @@ module Lithic ?account_token: String, ?begin_: Time, ?card_token: String, + ?claim_token: String, ?disputed_transaction_token: String, ?end_: Time, ?ending_before: String, diff --git a/test/lithic/resources/account_activity_test.rb b/test/lithic/resources/account_activity_test.rb index 43d29a9e..48595731 100644 --- a/test/lithic/resources/account_activity_test.rb +++ b/test/lithic/resources/account_activity_test.rb @@ -82,6 +82,7 @@ def test_list source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, @@ -213,6 +214,7 @@ def test_retrieve_transaction source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, diff --git a/test/lithic/resources/blockchain_recipients_test.rb b/test/lithic/resources/blockchain_recipients_test.rb new file mode 100644 index 00000000..bad4ec8c --- /dev/null +++ b/test/lithic/resources/blockchain_recipients_test.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require_relative "../test_helper" + +class Lithic::Test::Resources::BlockchainRecipientsTest < Lithic::Test::ResourceTest + def test_create_required_params + response = + @lithic.blockchain_recipients.create( + account_token: "dabadb3b-700c-41e3-8801-d5dfc84ebea0", + address: "0x45bfcf1a6289a0b77b4d3f7d12005a05949fd8c3", + chain: "ETHEREUM", + owner: "John Doe", + owner_type: :INDIVIDUAL + ) + + assert_pattern do + response => Lithic::BlockchainRecipient + end + + assert_pattern do + response => { + token: String, + account_token: String, + address_tag: String | nil, + chain: String, + created: Time, + external_id: String | nil, + name: String | nil, + owner: String, + owner_type: Lithic::OwnerType, + program_id: String, + state: Lithic::BlockchainRecipient::State, + updated: Time, + verification_state: Lithic::BlockchainRecipient::VerificationState + } + end + end +end diff --git a/test/lithic/resources/disputes_v2_test.rb b/test/lithic/resources/disputes_v2_test.rb index 5a795435..ef57e09f 100644 --- a/test/lithic/resources/disputes_v2_test.rb +++ b/test/lithic/resources/disputes_v2_test.rb @@ -16,6 +16,7 @@ def test_retrieve account_token: String, card_token: String, case_id: String | nil, + claim_token: String | nil, created: Time, currency: String, disposition: Lithic::DisputeV2::Disposition | nil, @@ -50,6 +51,7 @@ def test_list account_token: String, card_token: String, case_id: String | nil, + claim_token: String | nil, created: Time, currency: String, disposition: Lithic::DisputeV2::Disposition | nil, diff --git a/test/lithic/resources/financial_accounts_test.rb b/test/lithic/resources/financial_accounts_test.rb index 862cf2e7..585a4580 100644 --- a/test/lithic/resources/financial_accounts_test.rb +++ b/test/lithic/resources/financial_accounts_test.rb @@ -24,6 +24,7 @@ def test_create_required_params updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -50,6 +51,7 @@ def test_retrieve updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -76,6 +78,7 @@ def test_update updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -109,6 +112,7 @@ def test_list updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end @@ -152,6 +156,7 @@ def test_update_status_required_params updated: Time, user_defined_status: String | nil, account_number: String | nil, + blockchain_addresses: ^(Lithic::Internal::Type::HashOf[String]) | nil, routing_number: String | nil } end diff --git a/test/lithic/resources/payments_test.rb b/test/lithic/resources/payments_test.rb index 156f1d5a..98a39f25 100644 --- a/test/lithic/resources/payments_test.rb +++ b/test/lithic/resources/payments_test.rb @@ -45,6 +45,7 @@ def test_retrieve source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, @@ -88,6 +89,7 @@ def test_list source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil, @@ -137,6 +139,7 @@ def test_return__required_params source: Lithic::Payment::Source, status: Lithic::Payment::Status, updated: Time, + blockchain_recipient_token: String | nil, currency: String | nil, expected_release_date: Date | nil, external_bank_account_token: String | nil,