diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 407051a9f..f18270d52 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.90.0" + ".": "1.91.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2923d8298..a9120ac7b 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/increase%2Fincrease-3e092c1a52f33e962b8415bfa24a244fdb66783aa093e027501124cb8658881b.yml -openapi_spec_hash: 677f23c2d65201b72074b3effb7d9ad4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-749004bde06df3642fccde727f8e872c02795128db180789d1377c3168bd71ba.yml +openapi_spec_hash: 9058f9b3951c7608de5b67d8d5c87ffd config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/CHANGELOG.md b/CHANGELOG.md index 251c92e44..4df261628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 1.91.0 (2025-09-26) + +Full Changelog: [v1.90.0...v1.91.0](https://github.com/Increase/increase-ruby/compare/v1.90.0...v1.91.0) + +### Features + +* **api:** api update ([cef39bf](https://github.com/Increase/increase-ruby/commit/cef39bf07ee95816d467d7424fe8f2ae7e19ea6b)) + + +### Bug Fixes + +* **internal:** use null byte as file separator in the fast formatting script ([43cc7df](https://github.com/Increase/increase-ruby/commit/43cc7df41e43ab4b28837fc157ee2adfc338f79d)) + + +### Performance Improvements + +* faster code formatting ([8d246f0](https://github.com/Increase/increase-ruby/commit/8d246f096d698f933202fbec1afc1f4a5ecc4e0a)) + ## 1.90.0 (2025-09-24) Full Changelog: [v1.89.0...v1.90.0](https://github.com/Increase/increase-ruby/compare/v1.89.0...v1.90.0) diff --git a/Gemfile.lock b/Gemfile.lock index 2cf0c4c71..90c6a124a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.90.0) + increase (1.91.0) connection_pool GEM diff --git a/README.md b/README.md index f92e88cda..053858432 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "increase", "~> 1.90.0" +gem "increase", "~> 1.91.0" ``` diff --git a/Rakefile b/Rakefile index 31ab8652f..6e42ad6e5 100644 --- a/Rakefile +++ b/Rakefile @@ -12,6 +12,8 @@ tapioca = "sorbet/tapioca" examples = "examples" ignore_file = ".ignore" +FILES_ENV = "FORMAT_FILE" + CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file) CLOBBER.push(*%w[sorbet/rbi/annotations/ sorbet/rbi/gems/], tapioca) @@ -55,21 +57,21 @@ end desc("Format `*.rb`") multitask(:"format:rb") do # while `syntax_tree` is much faster than `rubocop`, `rubocop` is the only formatter with full syntax support - find = %w[find ./lib ./test ./examples -type f -and -name *.rb -print0] + files = ENV.key?(FILES_ENV) ? %w[sed -E -z -n -e /\.rb$/p --] << ENV.fetch(FILES_ENV) : %w[find ./lib ./test ./examples -type f -and -name *.rb -print0] fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --] - sh("#{find.shelljoin} | #{fmt.shelljoin}") + sh("#{files.shelljoin} | #{fmt.shelljoin}") end desc("Format `*.rbi`") multitask(:"format:rbi") do - find = %w[find ./rbi -type f -and -name *.rbi -print0] + files = ENV.key?(FILES_ENV) ? %w[sed -E -z -n -e /\.rbi$/p --] << ENV.fetch(FILES_ENV) : %w[find ./rbi -type f -and -name *.rbi -print0] fmt = xargs + %w[stree write --] - sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") + sh(ruby_opt, "#{files.shelljoin} | #{fmt.shelljoin}") end desc("Format `*.rbs`") multitask(:"format:rbs") do - find = %w[find ./sig -type f -name *.rbs -print0] + files = ENV.key?(FILES_ENV) ? %w[sed -E -z -n -e /\.rbs$/p --] << ENV.fetch(FILES_ENV) : %w[find ./sig -type f -name *.rbs -print0] inplace = /darwin|bsd/ =~ RUBY_PLATFORM ? ["-i", ""] : %w[-i] uuid = SecureRandom.uuid @@ -98,13 +100,13 @@ multitask(:"format:rbs") do success = false # transform class aliases to type aliases, which syntax tree has no trouble with - sh("#{find.shelljoin} | #{pre.shelljoin}") + sh("#{files.shelljoin} | #{pre.shelljoin}") # run syntax tree to format `*.rbs` files - sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") do + sh(ruby_opt, "#{files.shelljoin} | #{fmt.shelljoin}") do success = _1 end # transform type aliases back to class aliases - sh("#{find.shelljoin} | #{pst.shelljoin}") + sh("#{files.shelljoin} | #{pst.shelljoin}") # always run post-processing to remove comment marker fail unless success diff --git a/lib/increase/models/transaction.rb b/lib/increase/models/transaction.rb index 55f67becc..fab7d8923 100644 --- a/lib/increase/models/transaction.rb +++ b/lib/increase/models/transaction.rb @@ -247,6 +247,14 @@ class Source < Increase::Internal::Type::BaseModel # @return [Increase::Models::Transaction::Source::CardDisputeLoss, nil] required :card_dispute_loss, -> { Increase::Transaction::Source::CardDisputeLoss }, nil?: true + # @!attribute card_financial + # A Card Financial object. This field will be present in the JSON response if and + # only if `category` is equal to `card_financial`. Card Financials are temporary + # holds placed on a customers funds with the intent to later clear a transaction. + # + # @return [Increase::Models::Transaction::Source::CardFinancial, nil] + required :card_financial, -> { Increase::Transaction::Source::CardFinancial }, nil?: true + # @!attribute card_push_transfer_acceptance # A Card Push Transfer Acceptance object. This field will be present in the JSON # response if and only if `category` is equal to `card_push_transfer_acceptance`. @@ -530,7 +538,7 @@ class Source < Increase::Internal::Type::BaseModel }, nil?: true - # @!method initialize(account_revenue_payment:, account_transfer_intention:, ach_transfer_intention:, ach_transfer_rejection:, ach_transfer_return:, card_dispute_acceptance:, card_dispute_financial:, card_dispute_loss:, card_push_transfer_acceptance:, card_refund:, card_revenue_payment:, card_settlement:, cashback_payment:, category:, check_deposit_acceptance:, check_deposit_return:, check_transfer_deposit:, fednow_transfer_acknowledgement:, fee_payment:, inbound_ach_transfer:, inbound_ach_transfer_return_intention:, inbound_check_adjustment:, inbound_check_deposit_return_intention:, inbound_fednow_transfer_confirmation:, inbound_real_time_payments_transfer_confirmation:, inbound_wire_reversal:, inbound_wire_transfer:, inbound_wire_transfer_reversal:, interest_payment:, internal_source:, other:, real_time_payments_transfer_acknowledgement:, sample_funds:, swift_transfer_intention:, swift_transfer_return:, wire_transfer_intention:) + # @!method initialize(account_revenue_payment:, account_transfer_intention:, ach_transfer_intention:, ach_transfer_rejection:, ach_transfer_return:, card_dispute_acceptance:, card_dispute_financial:, card_dispute_loss:, card_financial:, card_push_transfer_acceptance:, card_refund:, card_revenue_payment:, card_settlement:, cashback_payment:, category:, check_deposit_acceptance:, check_deposit_return:, check_transfer_deposit:, fednow_transfer_acknowledgement:, fee_payment:, inbound_ach_transfer:, inbound_ach_transfer_return_intention:, inbound_check_adjustment:, inbound_check_deposit_return_intention:, inbound_fednow_transfer_confirmation:, inbound_real_time_payments_transfer_confirmation:, inbound_wire_reversal:, inbound_wire_transfer:, inbound_wire_transfer_reversal:, interest_payment:, internal_source:, other:, real_time_payments_transfer_acknowledgement:, sample_funds:, swift_transfer_intention:, swift_transfer_return:, wire_transfer_intention:) # Some parameter documentations has been truncated, see # {Increase::Models::Transaction::Source} for more details. # @@ -555,6 +563,8 @@ class Source < Increase::Internal::Type::BaseModel # # @param card_dispute_loss [Increase::Models::Transaction::Source::CardDisputeLoss, nil] A Card Dispute Loss object. This field will be present in the JSON response if a # + # @param card_financial [Increase::Models::Transaction::Source::CardFinancial, nil] A Card Financial object. This field will be present in the JSON response if and + # # @param card_push_transfer_acceptance [Increase::Models::Transaction::Source::CardPushTransferAcceptance, nil] A Card Push Transfer Acceptance object. This field will be present in the JSON r # # @param card_refund [Increase::Models::Transaction::Source::CardRefund, nil] A Card Refund object. This field will be present in the JSON response if and onl @@ -1045,230 +1055,1340 @@ module ReturnReasonCode # Code R70. A rare return reason. The receiving bank had not approved this return. PERMISSIBLE_RETURN_ENTRY_NOT_ACCEPTED = :permissible_return_entry_not_accepted - # Code R32. A rare return reason. The receiving bank could not settle this transaction. - RDFI_NON_SETTLEMENT = :rdfi_non_settlement + # Code R32. A rare return reason. The receiving bank could not settle this transaction. + RDFI_NON_SETTLEMENT = :rdfi_non_settlement + + # Code R30. A rare return reason. The receiving bank does not accept Check Truncation ACH transfers. + RDFI_PARTICIPANT_IN_CHECK_TRUNCATION_PROGRAM = :rdfi_participant_in_check_truncation_program + + # Code R14. A rare return reason. The payee is deceased. + REPRESENTATIVE_PAYEE_DECEASED_OR_UNABLE_TO_CONTINUE_IN_THAT_CAPACITY = + :representative_payee_deceased_or_unable_to_continue_in_that_capacity + + # Code R75. A rare return reason. The originating bank disputes that an earlier `duplicate_entry` return was actually a duplicate. + RETURN_NOT_A_DUPLICATE = :return_not_a_duplicate + + # Code R62. A rare return reason. The originating financial institution made a mistake and this return corrects it. + RETURN_OF_ERRONEOUS_OR_REVERSING_DEBIT = :return_of_erroneous_or_reversing_debit + + # Code R36. A rare return reason. Return of a malformed credit entry. + RETURN_OF_IMPROPER_CREDIT_ENTRY = :return_of_improper_credit_entry + + # Code R35. A rare return reason. Return of a malformed debit entry. + RETURN_OF_IMPROPER_DEBIT_ENTRY = :return_of_improper_debit_entry + + # Code R33. A rare return reason. Return of a Destroyed Check ("XKC") entry. + RETURN_OF_XCK_ENTRY = :return_of_xck_entry + + # Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. + SOURCE_DOCUMENT_PRESENTED_FOR_PAYMENT = :source_document_presented_for_payment + + # Code R50. A rare return reason. State law prevents the bank from accepting the Represented Check ("RCK") entry. + STATE_LAW_AFFECTING_RCK_ACCEPTANCE = :state_law_affecting_rck_acceptance + + # Code R52. A rare return reason. A stop payment was issued on a Represented Check ("RCK") entry. + STOP_PAYMENT_ON_ITEM_RELATED_TO_RCK_ENTRY = :stop_payment_on_item_related_to_rck_entry + + # Code R38. A rare return reason. The source attached to the ACH, usually an ACH check conversion, includes a stop payment. + STOP_PAYMENT_ON_SOURCE_DOCUMENT = :stop_payment_on_source_document + + # Code R73. A rare return reason. The bank receiving an `untimely_return` believes it was on time. + TIMELY_ORIGINAL_RETURN = :timely_original_return + + # Code R27. A rare return reason. An ACH return's trace number does not match an originated ACH. + TRACE_NUMBER_ERROR = :trace_number_error + + # Code R72. A rare return reason. The dishonored return was sent too late. + UNTIMELY_DISHONORED_RETURN = :untimely_dishonored_return + + # Code R68. A rare return reason. The return was sent too late. + UNTIMELY_RETURN = :untimely_return + + # @!method self.values + # @return [Array] + end + end + + # @see Increase::Models::Transaction::Source#card_dispute_acceptance + class CardDisputeAcceptance < Increase::Internal::Type::BaseModel + # @!attribute accepted_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Card Dispute was accepted. + # + # @return [Time] + required :accepted_at, Time + + # @!attribute transaction_id + # The identifier of the Transaction that was created to return the disputed funds + # to your account. + # + # @return [String] + required :transaction_id, String + + # @!method initialize(accepted_at:, transaction_id:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardDisputeAcceptance} for more details. + # + # A Card Dispute Acceptance object. This field will be present in the JSON + # response if and only if `category` is equal to `card_dispute_acceptance`. + # Contains the details of a successful Card Dispute. + # + # @param accepted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param transaction_id [String] The identifier of the Transaction that was created to return the disputed funds + end + + # @see Increase::Models::Transaction::Source#card_dispute_financial + class CardDisputeFinancial < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount of the financial event. + # + # @return [Integer] + required :amount, Integer + + # @!attribute network + # The network that the Card Dispute is associated with. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Network] + required :network, enum: -> { Increase::Transaction::Source::CardDisputeFinancial::Network } + + # @!attribute transaction_id + # The identifier of the Transaction that was created to credit or debit the + # disputed funds to or from your account. + # + # @return [String] + required :transaction_id, String + + # @!attribute visa + # Information for events related to card dispute for card payments processed over + # Visa's network. This field will be present in the JSON response if and only if + # `network` is equal to `visa`. + # + # @return [Increase::Models::Transaction::Source::CardDisputeFinancial::Visa, nil] + required :visa, -> { Increase::Transaction::Source::CardDisputeFinancial::Visa }, nil?: true + + # @!method initialize(amount:, network:, transaction_id:, visa:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardDisputeFinancial} for more details. + # + # A Card Dispute Financial object. This field will be present in the JSON response + # if and only if `category` is equal to `card_dispute_financial`. Financial event + # related to a Card Dispute. + # + # @param amount [Integer] The amount of the financial event. + # + # @param network [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Network] The network that the Card Dispute is associated with. + # + # @param transaction_id [String] The identifier of the Transaction that was created to credit or debit the disput + # + # @param visa [Increase::Models::Transaction::Source::CardDisputeFinancial::Visa, nil] Information for events related to card dispute for card payments processed over + + # The network that the Card Dispute is associated with. + # + # @see Increase::Models::Transaction::Source::CardDisputeFinancial#network + module Network + extend Increase::Internal::Type::Enum + + # Visa: details will be under the `visa` object. + VISA = :visa + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::Transaction::Source::CardDisputeFinancial#visa + class Visa < Increase::Internal::Type::BaseModel + # @!attribute event_type + # The type of card dispute financial event. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Visa::EventType] + required :event_type, enum: -> { Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType } + + # @!method initialize(event_type:) + # Information for events related to card dispute for card payments processed over + # Visa's network. This field will be present in the JSON response if and only if + # `network` is equal to `visa`. + # + # @param event_type [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Visa::EventType] The type of card dispute financial event. + + # The type of card dispute financial event. + # + # @see Increase::Models::Transaction::Source::CardDisputeFinancial::Visa#event_type + module EventType + extend Increase::Internal::Type::Enum + + # The user's chargeback was submitted. + CHARGEBACK_SUBMITTED = :chargeback_submitted + + # The user declined the merchant's pre-arbitration submission. + MERCHANT_PREARBITRATION_DECLINE_SUBMITTED = :merchant_prearbitration_decline_submitted + + # The merchant's pre-arbitration submission was received. + MERCHANT_PREARBITRATION_RECEIVED = :merchant_prearbitration_received + + # The transaction was re-presented by the merchant. + REPRESENTED = :represented + + # The user's pre-arbitration was declined by the merchant. + USER_PREARBITRATION_DECLINE_RECEIVED = :user_prearbitration_decline_received + + # The user's pre-arbitration was submitted. + USER_PREARBITRATION_SUBMITTED = :user_prearbitration_submitted + + # The user withdrew from the dispute. + USER_WITHDRAWAL_SUBMITTED = :user_withdrawal_submitted + + # @!method self.values + # @return [Array] + end + end + end + + # @see Increase::Models::Transaction::Source#card_dispute_loss + class CardDisputeLoss < Increase::Internal::Type::BaseModel + # @!attribute explanation + # Why the Card Dispute was lost. + # + # @return [String] + required :explanation, String + + # @!attribute lost_at + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Card Dispute was lost. + # + # @return [Time] + required :lost_at, Time + + # @!attribute transaction_id + # The identifier of the Transaction that was created to debit the disputed funds + # from your account. + # + # @return [String] + required :transaction_id, String + + # @!method initialize(explanation:, lost_at:, transaction_id:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardDisputeLoss} for more details. + # + # A Card Dispute Loss object. This field will be present in the JSON response if + # and only if `category` is equal to `card_dispute_loss`. Contains the details of + # a lost Card Dispute. + # + # @param explanation [String] Why the Card Dispute was lost. + # + # @param lost_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th + # + # @param transaction_id [String] The identifier of the Transaction that was created to debit the disputed funds f + end + + # @see Increase::Models::Transaction::Source#card_financial + class CardFinancial < Increase::Internal::Type::BaseModel + # @!attribute id + # The Card Financial identifier. + # + # @return [String] + required :id, String + + # @!attribute actioner + # Whether this financial was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::Actioner] + required :actioner, enum: -> { Increase::Transaction::Source::CardFinancial::Actioner } + + # @!attribute additional_amounts + # Additional amounts associated with the card authorization, such as ATM + # surcharges fees. These are usually a subset of the `amount` field and are used + # to provide more detailed information about the transaction. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts] + required :additional_amounts, -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts } + + # @!attribute amount + # The pending amount in the minor unit of the transaction's currency. For dollars, + # for example, this is cents. + # + # @return [Integer] + required :amount, Integer + + # @!attribute card_payment_id + # The ID of the Card Payment this transaction belongs to. + # + # @return [String] + required :card_payment_id, String + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's currency. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::Currency] + required :currency, enum: -> { Increase::Transaction::Source::CardFinancial::Currency } + + # @!attribute digital_wallet_token_id + # If the authorization was made via a Digital Wallet Token (such as an Apple Pay + # purchase), the identifier of the token that was used. + # + # @return [String, nil] + required :digital_wallet_token_id, String, nil?: true + + # @!attribute direction + # The direction describes the direction the funds will move, either from the + # cardholder to the merchant or from the merchant to the cardholder. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::Direction] + required :direction, enum: -> { Increase::Transaction::Source::CardFinancial::Direction } + + # @!attribute merchant_acceptor_id + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + # + # @return [String] + required :merchant_acceptor_id, String + + # @!attribute merchant_category_code + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + # + # @return [String] + required :merchant_category_code, String + + # @!attribute merchant_city + # The city the merchant resides in. + # + # @return [String, nil] + required :merchant_city, String, nil?: true + + # @!attribute merchant_country + # The country the merchant resides in. + # + # @return [String] + required :merchant_country, String + + # @!attribute merchant_descriptor + # The merchant descriptor of the merchant the card is transacting with. + # + # @return [String] + required :merchant_descriptor, String + + # @!attribute merchant_postal_code + # The merchant's postal code. For US merchants this is either a 5-digit or 9-digit + # ZIP code, where the first 5 and last 4 are separated by a dash. + # + # @return [String, nil] + required :merchant_postal_code, String, nil?: true + + # @!attribute merchant_state + # The state the merchant resides in. + # + # @return [String, nil] + required :merchant_state, String, nil?: true + + # @!attribute network_details + # Fields specific to the `network`. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::NetworkDetails] + required :network_details, -> { Increase::Transaction::Source::CardFinancial::NetworkDetails } + + # @!attribute network_identifiers + # Network-specific identifiers for a specific request or transaction. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::NetworkIdentifiers] + required :network_identifiers, -> { Increase::Transaction::Source::CardFinancial::NetworkIdentifiers } + + # @!attribute network_risk_score + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + # + # @return [Integer, nil] + required :network_risk_score, Integer, nil?: true + + # @!attribute physical_card_id + # If the authorization was made in-person with a physical card, the Physical Card + # that was used. + # + # @return [String, nil] + required :physical_card_id, String, nil?: true + + # @!attribute presentment_amount + # The pending amount in the minor unit of the transaction's presentment currency. + # + # @return [Integer] + required :presentment_amount, Integer + + # @!attribute presentment_currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + # + # @return [String] + required :presentment_currency, String + + # @!attribute processing_category + # The processing category describes the intent behind the financial, such as + # whether it was used for bill payments or an automatic fuel dispenser. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::ProcessingCategory] + required :processing_category, + enum: -> { Increase::Transaction::Source::CardFinancial::ProcessingCategory } + + # @!attribute real_time_decision_id + # The identifier of the Real-Time Decision sent to approve or decline this + # transaction. + # + # @return [String, nil] + required :real_time_decision_id, String, nil?: true + + # @!attribute terminal_id + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + # + # @return [String, nil] + required :terminal_id, String, nil?: true + + # @!attribute transaction_id + # The identifier of the Transaction associated with this Transaction. + # + # @return [String] + required :transaction_id, String + + # @!attribute type + # A constant representing the object's type. For this resource it will always be + # `card_financial`. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::Type] + required :type, enum: -> { Increase::Transaction::Source::CardFinancial::Type } + + # @!attribute verification + # Fields related to verification of cardholder-provided values. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::Verification] + required :verification, -> { Increase::Transaction::Source::CardFinancial::Verification } + + # @!method initialize(id:, actioner:, additional_amounts:, amount:, card_payment_id:, currency:, digital_wallet_token_id:, direction:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, real_time_decision_id:, terminal_id:, transaction_id:, type:, verification:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial} for more details. + # + # A Card Financial object. This field will be present in the JSON response if and + # only if `category` is equal to `card_financial`. Card Financials are temporary + # holds placed on a customers funds with the intent to later clear a transaction. + # + # @param id [String] The Card Financial identifier. + # + # @param actioner [Symbol, Increase::Models::Transaction::Source::CardFinancial::Actioner] Whether this financial was approved by Increase, the card network through stand- + # + # @param additional_amounts [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge + # + # @param amount [Integer] The pending amount in the minor unit of the transaction's currency. For dollars, + # + # @param card_payment_id [String] The ID of the Card Payment this transaction belongs to. + # + # @param currency [Symbol, Increase::Models::Transaction::Source::CardFinancial::Currency] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction' + # + # @param digital_wallet_token_id [String, nil] If the authorization was made via a Digital Wallet Token (such as an Apple Pay p + # + # @param direction [Symbol, Increase::Models::Transaction::Source::CardFinancial::Direction] The direction describes the direction the funds will move, either from the cardh + # + # @param merchant_acceptor_id [String] The merchant identifier (commonly abbreviated as MID) of the merchant the card i + # + # @param merchant_category_code [String] The Merchant Category Code (commonly abbreviated as MCC) of the merchant the car + # + # @param merchant_city [String, nil] The city the merchant resides in. + # + # @param merchant_country [String] The country the merchant resides in. + # + # @param merchant_descriptor [String] The merchant descriptor of the merchant the card is transacting with. + # + # @param merchant_postal_code [String, nil] The merchant's postal code. For US merchants this is either a 5-digit or 9-digit + # + # @param merchant_state [String, nil] The state the merchant resides in. + # + # @param network_details [Increase::Models::Transaction::Source::CardFinancial::NetworkDetails] Fields specific to the `network`. + # + # @param network_identifiers [Increase::Models::Transaction::Source::CardFinancial::NetworkIdentifiers] Network-specific identifiers for a specific request or transaction. + # + # @param network_risk_score [Integer, nil] The risk score generated by the card network. For Visa this is the Visa Advanced + # + # @param physical_card_id [String, nil] If the authorization was made in-person with a physical card, the Physical Card + # + # @param presentment_amount [Integer] The pending amount in the minor unit of the transaction's presentment currency. + # + # @param presentment_currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction' + # + # @param processing_category [Symbol, Increase::Models::Transaction::Source::CardFinancial::ProcessingCategory] The processing category describes the intent behind the financial, such as wheth + # + # @param real_time_decision_id [String, nil] The identifier of the Real-Time Decision sent to approve or decline this transac + # + # @param terminal_id [String, nil] The terminal identifier (commonly abbreviated as TID) of the terminal the card i + # + # @param transaction_id [String] The identifier of the Transaction associated with this Transaction. + # + # @param type [Symbol, Increase::Models::Transaction::Source::CardFinancial::Type] A constant representing the object's type. For this resource it will always be ` + # + # @param verification [Increase::Models::Transaction::Source::CardFinancial::Verification] Fields related to verification of cardholder-provided values. + + # Whether this financial was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + # + # @see Increase::Models::Transaction::Source::CardFinancial#actioner + module Actioner + extend Increase::Internal::Type::Enum + + # This object was actioned by the user through a real-time decision. + USER = :user + + # This object was actioned by Increase without user intervention. + INCREASE = :increase + + # This object was actioned by the network, through stand-in processing. + NETWORK = :network + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::Transaction::Source::CardFinancial#additional_amounts + class AdditionalAmounts < Increase::Internal::Type::BaseModel + # @!attribute clinic + # The part of this transaction amount that was for clinic-related services. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision }, + nil?: true + + # @!method initialize(clinic:, dental:, prescription:, surcharge:, total_cumulative:, total_healthcare:, transit:, unknown:, vision:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts} for + # more details. + # + # Additional amounts associated with the card authorization, such as ATM + # surcharges fees. These are usually a subset of the `amount` field and are used + # to provide more detailed information about the transaction. + # + # @param clinic [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic} + # for more details. + # + # The part of this transaction amount that was for clinic-related services. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Dental} + # for more details. + # + # The part of this transaction amount that was for dental-related services. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription} + # for more details. + # + # The part of this transaction amount that was for healthcare prescriptions. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge} + # for more details. + # + # The surcharge amount charged for this transaction by the merchant. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative} + # for more details. + # + # The total amount of a series of incremental authorizations, optionally provided. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare} + # for more details. + # + # The total amount of healthcare-related additional amounts. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Transit} + # for more details. + # + # The part of this transaction amount that was for transit-related services. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + # + # @return [Integer] + required :amount, Integer + + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String + + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::AdditionalAmounts::Vision} + # for more details. + # + # The part of this transaction amount that was for vision-related services. + # + # @param amount [Integer] The amount in minor units of the `currency` field. The amount is positive if it + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's currency. + # + # @see Increase::Models::Transaction::Source::CardFinancial#currency + module Currency + extend Increase::Internal::Type::Enum + + # Canadian Dollar (CAD) + CAD = :CAD + + # Swiss Franc (CHF) + CHF = :CHF + + # Euro (EUR) + EUR = :EUR + + # British Pound (GBP) + GBP = :GBP + + # Japanese Yen (JPY) + JPY = :JPY + + # US Dollar (USD) + USD = :USD + + # @!method self.values + # @return [Array] + end + + # The direction describes the direction the funds will move, either from the + # cardholder to the merchant or from the merchant to the cardholder. + # + # @see Increase::Models::Transaction::Source::CardFinancial#direction + module Direction + extend Increase::Internal::Type::Enum + + # A regular card authorization where funds are debited from the cardholder. + SETTLEMENT = :settlement + + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND = :refund + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::Transaction::Source::CardFinancial#network_details + class NetworkDetails < Increase::Internal::Type::BaseModel + # @!attribute category + # The payment network used to process this card authorization. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Category] + required :category, enum: -> { Increase::Transaction::Source::CardFinancial::NetworkDetails::Category } + + # @!attribute visa + # Fields specific to the `visa` network. + # + # @return [Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa, nil] + required :visa, + -> { + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa + }, + nil?: true + + # @!method initialize(category:, visa:) + # Fields specific to the `network`. + # + # @param category [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Category] The payment network used to process this card authorization. + # + # @param visa [Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa, nil] Fields specific to the `visa` network. + + # The payment network used to process this card authorization. + # + # @see Increase::Models::Transaction::Source::CardFinancial::NetworkDetails#category + module Category + extend Increase::Internal::Type::Enum + + # Visa + VISA = :visa + + # @!method self.values + # @return [Array] + end + + # @see Increase::Models::Transaction::Source::CardFinancial::NetworkDetails#visa + class Visa < Increase::Internal::Type::BaseModel + # @!attribute electronic_commerce_indicator + # For electronic commerce transactions, this identifies the level of security used + # in obtaining the customer's payment credential. For mail or telephone order + # transactions, identifies the type of mail or telephone order. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator, nil] + required :electronic_commerce_indicator, + enum: -> { + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator + }, + nil?: true + + # @!attribute point_of_service_entry_mode + # The method used to enter the cardholder's primary account number and card + # expiration date. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode, nil] + required :point_of_service_entry_mode, + enum: -> { + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode + }, + nil?: true + + # @!attribute stand_in_processing_reason + # Only present when `actioner: network`. Describes why a card authorization was + # approved or declined by Visa through stand-in processing. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason, nil] + required :stand_in_processing_reason, + enum: -> { + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason + }, + nil?: true + + # @!method initialize(electronic_commerce_indicator:, point_of_service_entry_mode:, stand_in_processing_reason:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa} for + # more details. + # + # Fields specific to the `visa` network. + # + # @param electronic_commerce_indicator [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator, nil] For electronic commerce transactions, this identifies the level of security used + # + # @param point_of_service_entry_mode [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode, nil] The method used to enter the cardholder's primary account number and card expira + # + # @param stand_in_processing_reason [Symbol, Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason, nil] Only present when `actioner: network`. Describes why a card authorization was ap + + # For electronic commerce transactions, this identifies the level of security used + # in obtaining the customer's payment credential. For mail or telephone order + # transactions, identifies the type of mail or telephone order. + # + # @see Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa#electronic_commerce_indicator + module ElectronicCommerceIndicator + extend Increase::Internal::Type::Enum + + # Single transaction of a mail/phone order: Use to indicate that the transaction is a mail/phone order purchase, not a recurring transaction or installment payment. For domestic transactions in the US region, this value may also indicate one bill payment transaction in the card-present or card-absent environments. + MAIL_PHONE_ORDER = :mail_phone_order + + # Recurring transaction: Payment indicator used to indicate a recurring transaction that originates from an acquirer in the US region. + RECURRING = :recurring + + # Installment payment: Payment indicator used to indicate one purchase of goods or services that is billed to the account in multiple charges over a period of time agreed upon by the cardholder and merchant from transactions that originate from an acquirer in the US region. + INSTALLMENT = :installment + + # Unknown classification: other mail order: Use to indicate that the type of mail/telephone order is unknown. + UNKNOWN_MAIL_PHONE_ORDER = :unknown_mail_phone_order + + # Secure electronic commerce transaction: Use to indicate that the electronic commerce transaction has been authenticated using e.g., 3-D Secure + SECURE_ELECTRONIC_COMMERCE = :secure_electronic_commerce + + # Non-authenticated security transaction at a 3-D Secure-capable merchant, and merchant attempted to authenticate the cardholder using 3-D Secure: Use to identify an electronic commerce transaction where the merchant attempted to authenticate the cardholder using 3-D Secure, but was unable to complete the authentication because the issuer or cardholder does not participate in the 3-D Secure program. + NON_AUTHENTICATED_SECURITY_TRANSACTION_AT_3DS_CAPABLE_MERCHANT = + :non_authenticated_security_transaction_at_3ds_capable_merchant + + # Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data encryption for security however , cardholder authentication is not performed using 3-D Secure. + NON_AUTHENTICATED_SECURITY_TRANSACTION = :non_authenticated_security_transaction + + # Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. + NON_SECURE_TRANSACTION = :non_secure_transaction + + # @!method self.values + # @return [Array] + end + + # The method used to enter the cardholder's primary account number and card + # expiration date. + # + # @see Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa#point_of_service_entry_mode + module PointOfServiceEntryMode + extend Increase::Internal::Type::Enum + + # Unknown + UNKNOWN = :unknown + + # Manual key entry + MANUAL = :manual + + # Magnetic stripe read, without card verification value + MAGNETIC_STRIPE_NO_CVV = :magnetic_stripe_no_cvv + + # Optical code + OPTICAL_CODE = :optical_code + + # Contact chip card + INTEGRATED_CIRCUIT_CARD = :integrated_circuit_card + + # Contactless read of chip card + CONTACTLESS = :contactless + + # Transaction initiated using a credential that has previously been stored on file + CREDENTIAL_ON_FILE = :credential_on_file + + # Magnetic stripe read + MAGNETIC_STRIPE = :magnetic_stripe - # Code R30. A rare return reason. The receiving bank does not accept Check Truncation ACH transfers. - RDFI_PARTICIPANT_IN_CHECK_TRUNCATION_PROGRAM = :rdfi_participant_in_check_truncation_program + # Contactless read of magnetic stripe data + CONTACTLESS_MAGNETIC_STRIPE = :contactless_magnetic_stripe - # Code R14. A rare return reason. The payee is deceased. - REPRESENTATIVE_PAYEE_DECEASED_OR_UNABLE_TO_CONTINUE_IN_THAT_CAPACITY = - :representative_payee_deceased_or_unable_to_continue_in_that_capacity + # Contact chip card, without card verification value + INTEGRATED_CIRCUIT_CARD_NO_CVV = :integrated_circuit_card_no_cvv - # Code R75. A rare return reason. The originating bank disputes that an earlier `duplicate_entry` return was actually a duplicate. - RETURN_NOT_A_DUPLICATE = :return_not_a_duplicate + # @!method self.values + # @return [Array] + end - # Code R62. A rare return reason. The originating financial institution made a mistake and this return corrects it. - RETURN_OF_ERRONEOUS_OR_REVERSING_DEBIT = :return_of_erroneous_or_reversing_debit + # Only present when `actioner: network`. Describes why a card authorization was + # approved or declined by Visa through stand-in processing. + # + # @see Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa#stand_in_processing_reason + module StandInProcessingReason + extend Increase::Internal::Type::Enum - # Code R36. A rare return reason. Return of a malformed credit entry. - RETURN_OF_IMPROPER_CREDIT_ENTRY = :return_of_improper_credit_entry + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR = :issuer_error - # Code R35. A rare return reason. Return of a malformed debit entry. - RETURN_OF_IMPROPER_DEBIT_ENTRY = :return_of_improper_debit_entry + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = :invalid_physical_card - # Code R33. A rare return reason. Return of a Destroyed Check ("XKC") entry. - RETURN_OF_XCK_ENTRY = :return_of_xck_entry + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE = + :invalid_cardholder_authentication_verification_value - # Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. - SOURCE_DOCUMENT_PRESENTED_FOR_PAYMENT = :source_document_presented_for_payment + # An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays. + INTERNAL_VISA_ERROR = :internal_visa_error - # Code R50. A rare return reason. State law prevents the bank from accepting the Represented Check ("RCK") entry. - STATE_LAW_AFFECTING_RCK_ACCEPTANCE = :state_law_affecting_rck_acceptance + # The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED = + :merchant_transaction_advisory_service_authentication_required - # Code R52. A rare return reason. A stop payment was issued on a Represented Check ("RCK") entry. - STOP_PAYMENT_ON_ITEM_RELATED_TO_RCK_ENTRY = :stop_payment_on_item_related_to_rck_entry + # The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing. + PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK = :payment_fraud_disruption_acquirer_block - # Code R38. A rare return reason. The source attached to the ACH, usually an ACH check conversion, includes a stop payment. - STOP_PAYMENT_ON_SOURCE_DOCUMENT = :stop_payment_on_source_document + # An unspecific reason for stand-in processing. + OTHER = :other - # Code R73. A rare return reason. The bank receiving an `untimely_return` believes it was on time. - TIMELY_ORIGINAL_RETURN = :timely_original_return + # @!method self.values + # @return [Array] + end + end + end - # Code R27. A rare return reason. An ACH return's trace number does not match an originated ACH. - TRACE_NUMBER_ERROR = :trace_number_error + # @see Increase::Models::Transaction::Source::CardFinancial#network_identifiers + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + # @!attribute retrieval_reference_number + # A life-cycle identifier used across e.g., an authorization and a reversal. + # Expected to be unique per acquirer within a window of time. For some card + # networks the retrieval reference number includes the trace counter. + # + # @return [String, nil] + required :retrieval_reference_number, String, nil?: true - # Code R72. A rare return reason. The dishonored return was sent too late. - UNTIMELY_DISHONORED_RETURN = :untimely_dishonored_return + # @!attribute trace_number + # A counter used to verify an individual authorization. Expected to be unique per + # acquirer within a window of time. + # + # @return [String, nil] + required :trace_number, String, nil?: true - # Code R68. A rare return reason. The return was sent too late. - UNTIMELY_RETURN = :untimely_return + # @!attribute transaction_id + # A globally unique transaction identifier provided by the card network, used + # across multiple life-cycle requests. + # + # @return [String, nil] + required :transaction_id, String, nil?: true - # @!method self.values - # @return [Array] + # @!method initialize(retrieval_reference_number:, trace_number:, transaction_id:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::NetworkIdentifiers} for + # more details. + # + # Network-specific identifiers for a specific request or transaction. + # + # @param retrieval_reference_number [String, nil] A life-cycle identifier used across e.g., an authorization and a reversal. Expec + # + # @param trace_number [String, nil] A counter used to verify an individual authorization. Expected to be unique per + # + # @param transaction_id [String, nil] A globally unique transaction identifier provided by the card network, used acro end - end - # @see Increase::Models::Transaction::Source#card_dispute_acceptance - class CardDisputeAcceptance < Increase::Internal::Type::BaseModel - # @!attribute accepted_at - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - # the Card Dispute was accepted. + # The processing category describes the intent behind the financial, such as + # whether it was used for bill payments or an automatic fuel dispenser. # - # @return [Time] - required :accepted_at, Time + # @see Increase::Models::Transaction::Source::CardFinancial#processing_category + module ProcessingCategory + extend Increase::Internal::Type::Enum - # @!attribute transaction_id - # The identifier of the Transaction that was created to return the disputed funds - # to your account. - # - # @return [String] - required :transaction_id, String + # Account funding transactions are transactions used to e.g., fund an account or transfer funds between accounts. + ACCOUNT_FUNDING = :account_funding - # @!method initialize(accepted_at:, transaction_id:) - # Some parameter documentations has been truncated, see - # {Increase::Models::Transaction::Source::CardDisputeAcceptance} for more details. - # - # A Card Dispute Acceptance object. This field will be present in the JSON - # response if and only if `category` is equal to `card_dispute_acceptance`. - # Contains the details of a successful Card Dispute. - # - # @param accepted_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th - # - # @param transaction_id [String] The identifier of the Transaction that was created to return the disputed funds - end + # Automatic fuel dispenser authorizations occur when a card is used at a gas pump, prior to the actual transaction amount being known. They are followed by an advice message that updates the amount of the pending transaction. + AUTOMATIC_FUEL_DISPENSER = :automatic_fuel_dispenser - # @see Increase::Models::Transaction::Source#card_dispute_financial - class CardDisputeFinancial < Increase::Internal::Type::BaseModel - # @!attribute amount - # The amount of the financial event. - # - # @return [Integer] - required :amount, Integer + # A transaction used to pay a bill. + BILL_PAYMENT = :bill_payment - # @!attribute network - # The network that the Card Dispute is associated with. - # - # @return [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Network] - required :network, enum: -> { Increase::Transaction::Source::CardDisputeFinancial::Network } + # Original credit transactions are used to send money to a cardholder. + ORIGINAL_CREDIT = :original_credit - # @!attribute transaction_id - # The identifier of the Transaction that was created to credit or debit the - # disputed funds to or from your account. - # - # @return [String] - required :transaction_id, String + # A regular purchase. + PURCHASE = :purchase - # @!attribute visa - # Information for events related to card dispute for card payments processed over - # Visa's network. This field will be present in the JSON response if and only if - # `network` is equal to `visa`. - # - # @return [Increase::Models::Transaction::Source::CardDisputeFinancial::Visa, nil] - required :visa, -> { Increase::Transaction::Source::CardDisputeFinancial::Visa }, nil?: true + # Quasi-cash transactions represent purchases of items which may be convertible to cash. + QUASI_CASH = :quasi_cash - # @!method initialize(amount:, network:, transaction_id:, visa:) - # Some parameter documentations has been truncated, see - # {Increase::Models::Transaction::Source::CardDisputeFinancial} for more details. - # - # A Card Dispute Financial object. This field will be present in the JSON response - # if and only if `category` is equal to `card_dispute_financial`. Financial event - # related to a Card Dispute. - # - # @param amount [Integer] The amount of the financial event. - # - # @param network [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Network] The network that the Card Dispute is associated with. - # - # @param transaction_id [String] The identifier of the Transaction that was created to credit or debit the disput - # - # @param visa [Increase::Models::Transaction::Source::CardDisputeFinancial::Visa, nil] Information for events related to card dispute for card payments processed over + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND = :refund - # The network that the Card Dispute is associated with. + # Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + CASH_DISBURSEMENT = :cash_disbursement + + # The processing category is unknown. + UNKNOWN = :unknown + + # @!method self.values + # @return [Array] + end + + # A constant representing the object's type. For this resource it will always be + # `card_financial`. # - # @see Increase::Models::Transaction::Source::CardDisputeFinancial#network - module Network + # @see Increase::Models::Transaction::Source::CardFinancial#type + module Type extend Increase::Internal::Type::Enum - # Visa: details will be under the `visa` object. - VISA = :visa + CARD_FINANCIAL = :card_financial # @!method self.values # @return [Array] end - # @see Increase::Models::Transaction::Source::CardDisputeFinancial#visa - class Visa < Increase::Internal::Type::BaseModel - # @!attribute event_type - # The type of card dispute financial event. + # @see Increase::Models::Transaction::Source::CardFinancial#verification + class Verification < Increase::Internal::Type::BaseModel + # @!attribute card_verification_code + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. # - # @return [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Visa::EventType] - required :event_type, enum: -> { Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType } + # @return [Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode] + required :card_verification_code, + -> { Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode } - # @!method initialize(event_type:) - # Information for events related to card dispute for card payments processed over - # Visa's network. This field will be present in the JSON response if and only if - # `network` is equal to `visa`. + # @!attribute cardholder_address + # Cardholder address provided in the authorization request and the address on file + # we verified it against. # - # @param event_type [Symbol, Increase::Models::Transaction::Source::CardDisputeFinancial::Visa::EventType] The type of card dispute financial event. + # @return [Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress] + required :cardholder_address, + -> { Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress } - # The type of card dispute financial event. + # @!method initialize(card_verification_code:, cardholder_address:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::Verification} for more + # details. # - # @see Increase::Models::Transaction::Source::CardDisputeFinancial::Visa#event_type - module EventType - extend Increase::Internal::Type::Enum - - # The user's chargeback was submitted. - CHARGEBACK_SUBMITTED = :chargeback_submitted + # Fields related to verification of cardholder-provided values. + # + # @param card_verification_code [Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode] Fields related to verification of the Card Verification Code, a 3-digit code on + # + # @param cardholder_address [Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress] Cardholder address provided in the authorization request and the address on file - # The user declined the merchant's pre-arbitration submission. - MERCHANT_PREARBITRATION_DECLINE_SUBMITTED = :merchant_prearbitration_decline_submitted + # @see Increase::Models::Transaction::Source::CardFinancial::Verification#card_verification_code + class CardVerificationCode < Increase::Internal::Type::BaseModel + # @!attribute result + # The result of verifying the Card Verification Code. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result] + required :result, + enum: -> { Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result } - # The merchant's pre-arbitration submission was received. - MERCHANT_PREARBITRATION_RECEIVED = :merchant_prearbitration_received + # @!method initialize(result:) + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. + # + # @param result [Symbol, Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result] The result of verifying the Card Verification Code. - # The transaction was re-presented by the merchant. - REPRESENTED = :represented + # The result of verifying the Card Verification Code. + # + # @see Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode#result + module Result + extend Increase::Internal::Type::Enum - # The user's pre-arbitration was declined by the merchant. - USER_PREARBITRATION_DECLINE_RECEIVED = :user_prearbitration_decline_received + # No card verification code was provided in the authorization request. + NOT_CHECKED = :not_checked - # The user's pre-arbitration was submitted. - USER_PREARBITRATION_SUBMITTED = :user_prearbitration_submitted + # The card verification code matched the one on file. + MATCH = :match - # The user withdrew from the dispute. - USER_WITHDRAWAL_SUBMITTED = :user_withdrawal_submitted + # The card verification code did not match the one on file. + NO_MATCH = :no_match - # @!method self.values - # @return [Array] + # @!method self.values + # @return [Array] + end end - end - end - # @see Increase::Models::Transaction::Source#card_dispute_loss - class CardDisputeLoss < Increase::Internal::Type::BaseModel - # @!attribute explanation - # Why the Card Dispute was lost. - # - # @return [String] - required :explanation, String + # @see Increase::Models::Transaction::Source::CardFinancial::Verification#cardholder_address + class CardholderAddress < Increase::Internal::Type::BaseModel + # @!attribute actual_line1 + # Line 1 of the address on file for the cardholder. + # + # @return [String, nil] + required :actual_line1, String, nil?: true - # @!attribute lost_at - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - # the Card Dispute was lost. - # - # @return [Time] - required :lost_at, Time + # @!attribute actual_postal_code + # The postal code of the address on file for the cardholder. + # + # @return [String, nil] + required :actual_postal_code, String, nil?: true - # @!attribute transaction_id - # The identifier of the Transaction that was created to debit the disputed funds - # from your account. - # - # @return [String] - required :transaction_id, String + # @!attribute provided_line1 + # The cardholder address line 1 provided for verification in the authorization + # request. + # + # @return [String, nil] + required :provided_line1, String, nil?: true - # @!method initialize(explanation:, lost_at:, transaction_id:) - # Some parameter documentations has been truncated, see - # {Increase::Models::Transaction::Source::CardDisputeLoss} for more details. - # - # A Card Dispute Loss object. This field will be present in the JSON response if - # and only if `category` is equal to `card_dispute_loss`. Contains the details of - # a lost Card Dispute. - # - # @param explanation [String] Why the Card Dispute was lost. - # - # @param lost_at [Time] The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which th - # - # @param transaction_id [String] The identifier of the Transaction that was created to debit the disputed funds f + # @!attribute provided_postal_code + # The postal code provided for verification in the authorization request. + # + # @return [String, nil] + required :provided_postal_code, String, nil?: true + + # @!attribute result + # The address verification result returned to the card network. + # + # @return [Symbol, Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result] + required :result, + enum: -> { Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result } + + # @!method initialize(actual_line1:, actual_postal_code:, provided_line1:, provided_postal_code:, result:) + # Some parameter documentations has been truncated, see + # {Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress} + # for more details. + # + # Cardholder address provided in the authorization request and the address on file + # we verified it against. + # + # @param actual_line1 [String, nil] Line 1 of the address on file for the cardholder. + # + # @param actual_postal_code [String, nil] The postal code of the address on file for the cardholder. + # + # @param provided_line1 [String, nil] The cardholder address line 1 provided for verification in the authorization req + # + # @param provided_postal_code [String, nil] The postal code provided for verification in the authorization request. + # + # @param result [Symbol, Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result] The address verification result returned to the card network. + + # The address verification result returned to the card network. + # + # @see Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress#result + module Result + extend Increase::Internal::Type::Enum + + # No address information was provided in the authorization request. + NOT_CHECKED = :not_checked + + # Postal code matches, but the street address does not match or was not provided. + POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = :postal_code_match_address_no_match + + # Postal code does not match, but the street address matches or was not provided. + POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = :postal_code_no_match_address_match + + # Postal code and street address match. + MATCH = :match + + # Postal code and street address do not match. + NO_MATCH = :no_match + + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = :postal_code_match_address_not_checked + + # @!method self.values + # @return [Array] + end + end + end end # @see Increase::Models::Transaction::Source#card_push_transfer_acceptance @@ -4280,6 +5400,9 @@ module Category # Card Settlement: details will be under the `card_settlement` object. CARD_SETTLEMENT = :card_settlement + # Card Financial: details will be under the `card_financial` object. + CARD_FINANCIAL = :card_financial + # Card Revenue Payment: details will be under the `card_revenue_payment` object. CARD_REVENUE_PAYMENT = :card_revenue_payment diff --git a/lib/increase/models/transaction_list_params.rb b/lib/increase/models/transaction_list_params.rb index ac79b5f12..99cc75e3b 100644 --- a/lib/increase/models/transaction_list_params.rb +++ b/lib/increase/models/transaction_list_params.rb @@ -112,6 +112,9 @@ module In # Card Settlement: details will be under the `card_settlement` object. CARD_SETTLEMENT = :card_settlement + # Card Financial: details will be under the `card_financial` object. + CARD_FINANCIAL = :card_financial + # Card Revenue Payment: details will be under the `card_revenue_payment` object. CARD_REVENUE_PAYMENT = :card_revenue_payment diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 965f016e7..819a213d6 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.90.0" + VERSION = "1.91.0" end diff --git a/rbi/increase/models/transaction.rbi b/rbi/increase/models/transaction.rbi index d8d974ef2..1acd29090 100644 --- a/rbi/increase/models/transaction.rbi +++ b/rbi/increase/models/transaction.rbi @@ -366,6 +366,20 @@ module Increase end attr_writer :card_dispute_loss + # A Card Financial object. This field will be present in the JSON response if and + # only if `category` is equal to `card_financial`. Card Financials are temporary + # holds placed on a customers funds with the intent to later clear a transaction. + sig { returns(T.nilable(Increase::Transaction::Source::CardFinancial)) } + attr_reader :card_financial + + sig do + params( + card_financial: + T.nilable(Increase::Transaction::Source::CardFinancial::OrHash) + ).void + end + attr_writer :card_financial + # A Card Push Transfer Acceptance object. This field will be present in the JSON # response if and only if `category` is equal to `card_push_transfer_acceptance`. # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer @@ -931,6 +945,8 @@ module Increase ), card_dispute_loss: T.nilable(Increase::Transaction::Source::CardDisputeLoss::OrHash), + card_financial: + T.nilable(Increase::Transaction::Source::CardFinancial::OrHash), card_push_transfer_acceptance: T.nilable( Increase::Transaction::Source::CardPushTransferAcceptance::OrHash @@ -1065,6 +1081,10 @@ module Increase # and only if `category` is equal to `card_dispute_loss`. Contains the details of # a lost Card Dispute. card_dispute_loss:, + # A Card Financial object. This field will be present in the JSON response if and + # only if `category` is equal to `card_financial`. Card Financials are temporary + # holds placed on a customers funds with the intent to later clear a transaction. + card_financial:, # A Card Push Transfer Acceptance object. This field will be present in the JSON # response if and only if `category` is equal to `card_push_transfer_acceptance`. # A Card Push Transfer Acceptance is created when an Outbound Card Push Transfer @@ -1230,6 +1250,8 @@ module Increase T.nilable(Increase::Transaction::Source::CardDisputeFinancial), card_dispute_loss: T.nilable(Increase::Transaction::Source::CardDisputeLoss), + card_financial: + T.nilable(Increase::Transaction::Source::CardFinancial), card_push_transfer_acceptance: T.nilable( Increase::Transaction::Source::CardPushTransferAcceptance @@ -2376,30 +2398,2024 @@ module Increase def to_hash end - # The network that the Card Dispute is associated with. - module Network + # The network that the Card Dispute is associated with. + module Network + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardDisputeFinancial::Network + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa: details will be under the `visa` object. + VISA = + T.let( + :visa, + Increase::Transaction::Source::CardDisputeFinancial::Network::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardDisputeFinancial::Network::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Visa < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardDisputeFinancial::Visa, + Increase::Internal::AnyHash + ) + end + + # The type of card dispute financial event. + sig do + returns( + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + end + attr_accessor :event_type + + # Information for events related to card dispute for card payments processed over + # Visa's network. This field will be present in the JSON response if and only if + # `network` is equal to `visa`. + sig do + params( + event_type: + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The type of card dispute financial event. + event_type: + ) + end + + sig do + override.returns( + { + event_type: + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + } + ) + end + def to_hash + end + + # The type of card dispute financial event. + module EventType + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The user's chargeback was submitted. + CHARGEBACK_SUBMITTED = + T.let( + :chargeback_submitted, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + # The user declined the merchant's pre-arbitration submission. + MERCHANT_PREARBITRATION_DECLINE_SUBMITTED = + T.let( + :merchant_prearbitration_decline_submitted, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + # The merchant's pre-arbitration submission was received. + MERCHANT_PREARBITRATION_RECEIVED = + T.let( + :merchant_prearbitration_received, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + # The transaction was re-presented by the merchant. + REPRESENTED = + T.let( + :represented, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + # The user's pre-arbitration was declined by the merchant. + USER_PREARBITRATION_DECLINE_RECEIVED = + T.let( + :user_prearbitration_decline_received, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + # The user's pre-arbitration was submitted. + USER_PREARBITRATION_SUBMITTED = + T.let( + :user_prearbitration_submitted, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + # The user withdrew from the dispute. + USER_WITHDRAWAL_SUBMITTED = + T.let( + :user_withdrawal_submitted, + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + class CardDisputeLoss < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardDisputeLoss, + Increase::Internal::AnyHash + ) + end + + # Why the Card Dispute was lost. + sig { returns(String) } + attr_accessor :explanation + + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Card Dispute was lost. + sig { returns(Time) } + attr_accessor :lost_at + + # The identifier of the Transaction that was created to debit the disputed funds + # from your account. + sig { returns(String) } + attr_accessor :transaction_id + + # A Card Dispute Loss object. This field will be present in the JSON response if + # and only if `category` is equal to `card_dispute_loss`. Contains the details of + # a lost Card Dispute. + sig do + params( + explanation: String, + lost_at: Time, + transaction_id: String + ).returns(T.attached_class) + end + def self.new( + # Why the Card Dispute was lost. + explanation:, + # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + # the Card Dispute was lost. + lost_at:, + # The identifier of the Transaction that was created to debit the disputed funds + # from your account. + transaction_id: + ) + end + + sig do + override.returns( + { explanation: String, lost_at: Time, transaction_id: String } + ) + end + def to_hash + end + end + + class CardFinancial < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial, + Increase::Internal::AnyHash + ) + end + + # The Card Financial identifier. + sig { returns(String) } + attr_accessor :id + + # Whether this financial was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Actioner::TaggedSymbol + ) + end + attr_accessor :actioner + + # Additional amounts associated with the card authorization, such as ATM + # surcharges fees. These are usually a subset of the `amount` field and are used + # to provide more detailed information about the transaction. + sig do + returns( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts + ) + end + attr_reader :additional_amounts + + sig do + params( + additional_amounts: + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::OrHash + ).void + end + attr_writer :additional_amounts + + # The pending amount in the minor unit of the transaction's currency. For dollars, + # for example, this is cents. + sig { returns(Integer) } + attr_accessor :amount + + # The ID of the Card Payment this transaction belongs to. + sig { returns(String) } + attr_accessor :card_payment_id + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's currency. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + end + attr_accessor :currency + + # If the authorization was made via a Digital Wallet Token (such as an Apple Pay + # purchase), the identifier of the token that was used. + sig { returns(T.nilable(String)) } + attr_accessor :digital_wallet_token_id + + # The direction describes the direction the funds will move, either from the + # cardholder to the merchant or from the merchant to the cardholder. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Direction::TaggedSymbol + ) + end + attr_accessor :direction + + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + sig { returns(String) } + attr_accessor :merchant_acceptor_id + + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + sig { returns(String) } + attr_accessor :merchant_category_code + + # The city the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_city + + # The country the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_country + + # The merchant descriptor of the merchant the card is transacting with. + sig { returns(String) } + attr_accessor :merchant_descriptor + + # The merchant's postal code. For US merchants this is either a 5-digit or 9-digit + # ZIP code, where the first 5 and last 4 are separated by a dash. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_postal_code + + # The state the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_state + + # Fields specific to the `network`. + sig do + returns( + Increase::Transaction::Source::CardFinancial::NetworkDetails + ) + end + attr_reader :network_details + + sig do + params( + network_details: + Increase::Transaction::Source::CardFinancial::NetworkDetails::OrHash + ).void + end + attr_writer :network_details + + # Network-specific identifiers for a specific request or transaction. + sig do + returns( + Increase::Transaction::Source::CardFinancial::NetworkIdentifiers + ) + end + attr_reader :network_identifiers + + sig do + params( + network_identifiers: + Increase::Transaction::Source::CardFinancial::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers + + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + sig { returns(T.nilable(Integer)) } + attr_accessor :network_risk_score + + # If the authorization was made in-person with a physical card, the Physical Card + # that was used. + sig { returns(T.nilable(String)) } + attr_accessor :physical_card_id + + # The pending amount in the minor unit of the transaction's presentment currency. + sig { returns(Integer) } + attr_accessor :presentment_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + sig { returns(String) } + attr_accessor :presentment_currency + + # The processing category describes the intent behind the financial, such as + # whether it was used for bill payments or an automatic fuel dispenser. + sig do + returns( + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + end + attr_accessor :processing_category + + # The identifier of the Real-Time Decision sent to approve or decline this + # transaction. + sig { returns(T.nilable(String)) } + attr_accessor :real_time_decision_id + + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + sig { returns(T.nilable(String)) } + attr_accessor :terminal_id + + # The identifier of the Transaction associated with this Transaction. + sig { returns(String) } + attr_accessor :transaction_id + + # A constant representing the object's type. For this resource it will always be + # `card_financial`. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Fields related to verification of cardholder-provided values. + sig do + returns(Increase::Transaction::Source::CardFinancial::Verification) + end + attr_reader :verification + + sig do + params( + verification: + Increase::Transaction::Source::CardFinancial::Verification::OrHash + ).void + end + attr_writer :verification + + # A Card Financial object. This field will be present in the JSON response if and + # only if `category` is equal to `card_financial`. Card Financials are temporary + # holds placed on a customers funds with the intent to later clear a transaction. + sig do + params( + id: String, + actioner: + Increase::Transaction::Source::CardFinancial::Actioner::OrSymbol, + additional_amounts: + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::OrHash, + amount: Integer, + card_payment_id: String, + currency: + Increase::Transaction::Source::CardFinancial::Currency::OrSymbol, + digital_wallet_token_id: T.nilable(String), + direction: + Increase::Transaction::Source::CardFinancial::Direction::OrSymbol, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: T.nilable(String), + merchant_country: String, + merchant_descriptor: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network_details: + Increase::Transaction::Source::CardFinancial::NetworkDetails::OrHash, + network_identifiers: + Increase::Transaction::Source::CardFinancial::NetworkIdentifiers::OrHash, + network_risk_score: T.nilable(Integer), + physical_card_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + processing_category: + Increase::Transaction::Source::CardFinancial::ProcessingCategory::OrSymbol, + real_time_decision_id: T.nilable(String), + terminal_id: T.nilable(String), + transaction_id: String, + type: + Increase::Transaction::Source::CardFinancial::Type::OrSymbol, + verification: + Increase::Transaction::Source::CardFinancial::Verification::OrHash + ).returns(T.attached_class) + end + def self.new( + # The Card Financial identifier. + id:, + # Whether this financial was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + actioner:, + # Additional amounts associated with the card authorization, such as ATM + # surcharges fees. These are usually a subset of the `amount` field and are used + # to provide more detailed information about the transaction. + additional_amounts:, + # The pending amount in the minor unit of the transaction's currency. For dollars, + # for example, this is cents. + amount:, + # The ID of the Card Payment this transaction belongs to. + card_payment_id:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's currency. + currency:, + # If the authorization was made via a Digital Wallet Token (such as an Apple Pay + # purchase), the identifier of the token that was used. + digital_wallet_token_id:, + # The direction describes the direction the funds will move, either from the + # cardholder to the merchant or from the merchant to the cardholder. + direction:, + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + merchant_acceptor_id:, + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + merchant_category_code:, + # The city the merchant resides in. + merchant_city:, + # The country the merchant resides in. + merchant_country:, + # The merchant descriptor of the merchant the card is transacting with. + merchant_descriptor:, + # The merchant's postal code. For US merchants this is either a 5-digit or 9-digit + # ZIP code, where the first 5 and last 4 are separated by a dash. + merchant_postal_code:, + # The state the merchant resides in. + merchant_state:, + # Fields specific to the `network`. + network_details:, + # Network-specific identifiers for a specific request or transaction. + network_identifiers:, + # The risk score generated by the card network. For Visa this is the Visa Advanced + # Authorization risk score, from 0 to 99, where 99 is the riskiest. + network_risk_score:, + # If the authorization was made in-person with a physical card, the Physical Card + # that was used. + physical_card_id:, + # The pending amount in the minor unit of the transaction's presentment currency. + presentment_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + presentment_currency:, + # The processing category describes the intent behind the financial, such as + # whether it was used for bill payments or an automatic fuel dispenser. + processing_category:, + # The identifier of the Real-Time Decision sent to approve or decline this + # transaction. + real_time_decision_id:, + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + terminal_id:, + # The identifier of the Transaction associated with this Transaction. + transaction_id:, + # A constant representing the object's type. For this resource it will always be + # `card_financial`. + type:, + # Fields related to verification of cardholder-provided values. + verification: + ) + end + + sig do + override.returns( + { + id: String, + actioner: + Increase::Transaction::Source::CardFinancial::Actioner::TaggedSymbol, + additional_amounts: + Increase::Transaction::Source::CardFinancial::AdditionalAmounts, + amount: Integer, + card_payment_id: String, + currency: + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol, + digital_wallet_token_id: T.nilable(String), + direction: + Increase::Transaction::Source::CardFinancial::Direction::TaggedSymbol, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: T.nilable(String), + merchant_country: String, + merchant_descriptor: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network_details: + Increase::Transaction::Source::CardFinancial::NetworkDetails, + network_identifiers: + Increase::Transaction::Source::CardFinancial::NetworkIdentifiers, + network_risk_score: T.nilable(Integer), + physical_card_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + processing_category: + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol, + real_time_decision_id: T.nilable(String), + terminal_id: T.nilable(String), + transaction_id: String, + type: + Increase::Transaction::Source::CardFinancial::Type::TaggedSymbol, + verification: + Increase::Transaction::Source::CardFinancial::Verification + } + ) + end + def to_hash + end + + # Whether this financial was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + module Actioner + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::Actioner + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # This object was actioned by the user through a real-time decision. + USER = + T.let( + :user, + Increase::Transaction::Source::CardFinancial::Actioner::TaggedSymbol + ) + + # This object was actioned by Increase without user intervention. + INCREASE = + T.let( + :increase, + Increase::Transaction::Source::CardFinancial::Actioner::TaggedSymbol + ) + + # This object was actioned by the network, through stand-in processing. + NETWORK = + T.let( + :network, + Increase::Transaction::Source::CardFinancial::Actioner::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::Actioner::TaggedSymbol + ] + ) + end + def self.values + end + end + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts, + Increase::Internal::AnyHash + ) + end + + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic + + sig do + params( + clinic: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic::OrHash + ) + ).void + end + attr_writer :clinic + + # The part of this transaction amount that was for dental-related services. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental + ) + ) + end + attr_reader :dental + + sig do + params( + dental: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental::OrHash + ) + ).void + end + attr_writer :dental + + # The part of this transaction amount that was for healthcare prescriptions. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription + ) + ) + end + attr_reader :prescription + + sig do + params( + prescription: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription + + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge + ) + ) + end + attr_reader :surcharge + + sig do + params( + surcharge: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge::OrHash + ) + ).void + end + attr_writer :surcharge + + # The total amount of a series of incremental authorizations, optionally provided. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative + ) + ) + end + attr_reader :total_cumulative + + sig do + params( + total_cumulative: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative + + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare + ) + ) + end + attr_reader :total_healthcare + + sig do + params( + total_healthcare: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare::OrHash + ) + ).void + end + attr_writer :total_healthcare + + # The part of this transaction amount that was for transit-related services. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit + ) + ) + end + attr_reader :transit + + sig do + params( + transit: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit + + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown + ) + ) + end + attr_reader :unknown + + sig do + params( + unknown: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown::OrHash + ) + ).void + end + attr_writer :unknown + + # The part of this transaction amount that was for vision-related services. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision + ) + ) + end + attr_reader :vision + + sig do + params( + vision: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision::OrHash + ) + ).void + end + attr_writer :vision + + # Additional amounts associated with the card authorization, such as ATM + # surcharges fees. These are usually a subset of the `amount` field and are used + # to provide more detailed information about the transaction. + sig do + params( + clinic: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The part of this transaction amount that was for clinic-related services. + clinic:, + # The part of this transaction amount that was for dental-related services. + dental:, + # The part of this transaction amount that was for healthcare prescriptions. + prescription:, + # The surcharge amount charged for this transaction by the merchant. + surcharge:, + # The total amount of a series of incremental authorizations, optionally provided. + total_cumulative:, + # The total amount of healthcare-related additional amounts. + total_healthcare:, + # The part of this transaction amount that was for transit-related services. + transit:, + # An unknown additional amount. + unknown:, + # The part of this transaction amount that was for vision-related services. + vision: + ) + end + + sig do + override.returns( + { + clinic: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision + ) + } + ) + end + def to_hash + end + + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The part of this transaction amount that was for clinic-related services. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Dental < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The part of this transaction amount that was for dental-related services. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Prescription < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The part of this transaction amount that was for healthcare prescriptions. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Surcharge < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The surcharge amount charged for this transaction by the merchant. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class TotalCumulative < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The total amount of a series of incremental authorizations, optionally provided. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class TotalHealthcare < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The total amount of healthcare-related additional amounts. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Transit < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The part of this transaction amount that was for transit-related services. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Unknown < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # An unknown additional amount. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + + class Vision < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + sig { returns(Integer) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency + + # The part of this transaction amount that was for vision-related services. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class + ) + end + def self.new( + # The amount in minor units of the `currency` field. The amount is positive if it + # is added to the amount (such as an ATM surcharge fee) and negative if it is + # subtracted from the amount (such as a discount). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's currency. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The direction describes the direction the funds will move, either from the + # cardholder to the merchant or from the merchant to the cardholder. + module Direction + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::Direction + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # A regular card authorization where funds are debited from the cardholder. + SETTLEMENT = + T.let( + :settlement, + Increase::Transaction::Source::CardFinancial::Direction::TaggedSymbol + ) + + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND = + T.let( + :refund, + Increase::Transaction::Source::CardFinancial::Direction::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::Direction::TaggedSymbol + ] + ) + end + def self.values + end + end + + class NetworkDetails < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::NetworkDetails, + Increase::Internal::AnyHash + ) + end + + # The payment network used to process this card authorization. + sig do + returns( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Category::TaggedSymbol + ) + end + attr_accessor :category + + # Fields specific to the `visa` network. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa + ) + ) + end + attr_reader :visa + + sig do + params( + visa: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::OrHash + ) + ).void + end + attr_writer :visa + + # Fields specific to the `network`. + sig do + params( + category: + Increase::Transaction::Source::CardFinancial::NetworkDetails::Category::OrSymbol, + visa: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # The payment network used to process this card authorization. + category:, + # Fields specific to the `visa` network. + visa: + ) + end + + sig do + override.returns( + { + category: + Increase::Transaction::Source::CardFinancial::NetworkDetails::Category::TaggedSymbol, + visa: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa + ) + } + ) + end + def to_hash + end + + # The payment network used to process this card authorization. + module Category + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa + VISA = + T.let( + :visa, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::NetworkDetails::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Visa < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa, + Increase::Internal::AnyHash + ) + end + + # For electronic commerce transactions, this identifies the level of security used + # in obtaining the customer's payment credential. For mail or telephone order + # transactions, identifies the type of mail or telephone order. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + ) + end + attr_accessor :electronic_commerce_indicator + + # The method used to enter the cardholder's primary account number and card + # expiration date. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + ) + end + attr_accessor :point_of_service_entry_mode + + # Only present when `actioner: network`. Describes why a card authorization was + # approved or declined by Visa through stand-in processing. + sig do + returns( + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + ) + end + attr_accessor :stand_in_processing_reason + + # Fields specific to the `visa` network. + sig do + params( + electronic_commerce_indicator: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::OrSymbol + ), + point_of_service_entry_mode: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::OrSymbol + ), + stand_in_processing_reason: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # For electronic commerce transactions, this identifies the level of security used + # in obtaining the customer's payment credential. For mail or telephone order + # transactions, identifies the type of mail or telephone order. + electronic_commerce_indicator:, + # The method used to enter the cardholder's primary account number and card + # expiration date. + point_of_service_entry_mode:, + # Only present when `actioner: network`. Describes why a card authorization was + # approved or declined by Visa through stand-in processing. + stand_in_processing_reason: + ) + end + + sig do + override.returns( + { + electronic_commerce_indicator: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ), + point_of_service_entry_mode: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ), + stand_in_processing_reason: + T.nilable( + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # For electronic commerce transactions, this identifies the level of security used + # in obtaining the customer's payment credential. For mail or telephone order + # transactions, identifies the type of mail or telephone order. + module ElectronicCommerceIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Single transaction of a mail/phone order: Use to indicate that the transaction is a mail/phone order purchase, not a recurring transaction or installment payment. For domestic transactions in the US region, this value may also indicate one bill payment transaction in the card-present or card-absent environments. + MAIL_PHONE_ORDER = + T.let( + :mail_phone_order, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Recurring transaction: Payment indicator used to indicate a recurring transaction that originates from an acquirer in the US region. + RECURRING = + T.let( + :recurring, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Installment payment: Payment indicator used to indicate one purchase of goods or services that is billed to the account in multiple charges over a period of time agreed upon by the cardholder and merchant from transactions that originate from an acquirer in the US region. + INSTALLMENT = + T.let( + :installment, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Unknown classification: other mail order: Use to indicate that the type of mail/telephone order is unknown. + UNKNOWN_MAIL_PHONE_ORDER = + T.let( + :unknown_mail_phone_order, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Secure electronic commerce transaction: Use to indicate that the electronic commerce transaction has been authenticated using e.g., 3-D Secure + SECURE_ELECTRONIC_COMMERCE = + T.let( + :secure_electronic_commerce, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Non-authenticated security transaction at a 3-D Secure-capable merchant, and merchant attempted to authenticate the cardholder using 3-D Secure: Use to identify an electronic commerce transaction where the merchant attempted to authenticate the cardholder using 3-D Secure, but was unable to complete the authentication because the issuer or cardholder does not participate in the 3-D Secure program. + NON_AUTHENTICATED_SECURITY_TRANSACTION_AT_3DS_CAPABLE_MERCHANT = + T.let( + :non_authenticated_security_transaction_at_3ds_capable_merchant, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data encryption for security however , cardholder authentication is not performed using 3-D Secure. + NON_AUTHENTICATED_SECURITY_TRANSACTION = + T.let( + :non_authenticated_security_transaction, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + # Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. + NON_SECURE_TRANSACTION = + T.let( + :non_secure_transaction, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The method used to enter the cardholder's primary account number and card + # expiration date. + module PointOfServiceEntryMode + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Unknown + UNKNOWN = + T.let( + :unknown, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Manual key entry + MANUAL = + T.let( + :manual, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Magnetic stripe read, without card verification value + MAGNETIC_STRIPE_NO_CVV = + T.let( + :magnetic_stripe_no_cvv, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Optical code + OPTICAL_CODE = + T.let( + :optical_code, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Contact chip card + INTEGRATED_CIRCUIT_CARD = + T.let( + :integrated_circuit_card, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Contactless read of chip card + CONTACTLESS = + T.let( + :contactless, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Transaction initiated using a credential that has previously been stored on file + CREDENTIAL_ON_FILE = + T.let( + :credential_on_file, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Magnetic stripe read + MAGNETIC_STRIPE = + T.let( + :magnetic_stripe, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Contactless read of magnetic stripe data + CONTACTLESS_MAGNETIC_STRIPE = + T.let( + :contactless_magnetic_stripe, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Contact chip card, without card verification value + INTEGRATED_CIRCUIT_CARD_NO_CVV = + T.let( + :integrated_circuit_card_no_cvv, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Only present when `actioner: network`. Describes why a card authorization was + # approved or declined by Visa through stand-in processing. + module StandInProcessingReason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR = + T.let( + :issuer_error, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = + T.let( + :invalid_physical_card, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE = + T.let( + :invalid_cardholder_authentication_verification_value, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays. + INTERNAL_VISA_ERROR = + T.let( + :internal_visa_error, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED = + T.let( + :merchant_transaction_advisory_service_authentication_required, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing. + PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK = + T.let( + :payment_fraud_disruption_acquirer_block, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # An unspecific reason for stand-in processing. + OTHER = + T.let( + :other, + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::NetworkIdentifiers, + Increase::Internal::AnyHash + ) + end + + # A life-cycle identifier used across e.g., an authorization and a reversal. + # Expected to be unique per acquirer within a window of time. For some card + # networks the retrieval reference number includes the trace counter. + sig { returns(T.nilable(String)) } + attr_accessor :retrieval_reference_number + + # A counter used to verify an individual authorization. Expected to be unique per + # acquirer within a window of time. + sig { returns(T.nilable(String)) } + attr_accessor :trace_number + + # A globally unique transaction identifier provided by the card network, used + # across multiple life-cycle requests. + sig { returns(T.nilable(String)) } + attr_accessor :transaction_id + + # Network-specific identifiers for a specific request or transaction. + sig do + params( + retrieval_reference_number: T.nilable(String), + trace_number: T.nilable(String), + transaction_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # A life-cycle identifier used across e.g., an authorization and a reversal. + # Expected to be unique per acquirer within a window of time. For some card + # networks the retrieval reference number includes the trace counter. + retrieval_reference_number:, + # A counter used to verify an individual authorization. Expected to be unique per + # acquirer within a window of time. + trace_number:, + # A globally unique transaction identifier provided by the card network, used + # across multiple life-cycle requests. + transaction_id: + ) + end + + sig do + override.returns( + { + retrieval_reference_number: T.nilable(String), + trace_number: T.nilable(String), + transaction_id: T.nilable(String) + } + ) + end + def to_hash + end + end + + # The processing category describes the intent behind the financial, such as + # whether it was used for bill payments or an automatic fuel dispenser. + module ProcessingCategory + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::ProcessingCategory + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Account funding transactions are transactions used to e.g., fund an account or transfer funds between accounts. + ACCOUNT_FUNDING = + T.let( + :account_funding, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # Automatic fuel dispenser authorizations occur when a card is used at a gas pump, prior to the actual transaction amount being known. They are followed by an advice message that updates the amount of the pending transaction. + AUTOMATIC_FUEL_DISPENSER = + T.let( + :automatic_fuel_dispenser, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # A transaction used to pay a bill. + BILL_PAYMENT = + T.let( + :bill_payment, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # Original credit transactions are used to send money to a cardholder. + ORIGINAL_CREDIT = + T.let( + :original_credit, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # A regular purchase. + PURCHASE = + T.let( + :purchase, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # Quasi-cash transactions represent purchases of items which may be convertible to cash. + QUASI_CASH = + T.let( + :quasi_cash, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND = + T.let( + :refund, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + CASH_DISBURSEMENT = + T.let( + :cash_disbursement, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + # The processing category is unknown. + UNKNOWN = + T.let( + :unknown, + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::ProcessingCategory::TaggedSymbol + ] + ) + end + def self.values + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_financial`. + module Type extend Increase::Internal::Type::Enum TaggedSymbol = T.type_alias do T.all( Symbol, - Increase::Transaction::Source::CardDisputeFinancial::Network + Increase::Transaction::Source::CardFinancial::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # Visa: details will be under the `visa` object. - VISA = + CARD_FINANCIAL = T.let( - :visa, - Increase::Transaction::Source::CardDisputeFinancial::Network::TaggedSymbol + :card_financial, + Increase::Transaction::Source::CardFinancial::Type::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::Transaction::Source::CardDisputeFinancial::Network::TaggedSymbol + Increase::Transaction::Source::CardFinancial::Type::TaggedSymbol ] ) end @@ -2407,175 +4423,311 @@ module Increase end end - class Visa < Increase::Internal::Type::BaseModel + class Verification < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::Transaction::Source::CardDisputeFinancial::Visa, + Increase::Transaction::Source::CardFinancial::Verification, Increase::Internal::AnyHash ) end - # The type of card dispute financial event. + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. sig do returns( - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode ) end - attr_accessor :event_type + attr_reader :card_verification_code - # Information for events related to card dispute for card payments processed over - # Visa's network. This field will be present in the JSON response if and only if - # `network` is equal to `visa`. sig do params( - event_type: - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::OrSymbol + card_verification_code: + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::OrHash + ).void + end + attr_writer :card_verification_code + + # Cardholder address provided in the authorization request and the address on file + # we verified it against. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress + ) + end + attr_reader :cardholder_address + + sig do + params( + cardholder_address: + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::OrHash + ).void + end + attr_writer :cardholder_address + + # Fields related to verification of cardholder-provided values. + sig do + params( + card_verification_code: + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::OrHash, + cardholder_address: + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::OrHash ).returns(T.attached_class) end def self.new( - # The type of card dispute financial event. - event_type: + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. + card_verification_code:, + # Cardholder address provided in the authorization request and the address on file + # we verified it against. + cardholder_address: ) end sig do override.returns( { - event_type: - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + card_verification_code: + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode, + cardholder_address: + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress } ) end def to_hash end - # The type of card dispute financial event. - module EventType - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class CardVerificationCode < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType + T.any( + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - # The user's chargeback was submitted. - CHARGEBACK_SUBMITTED = - T.let( - :chargeback_submitted, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + # The result of verifying the Card Verification Code. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::TaggedSymbol ) + end + attr_accessor :result - # The user declined the merchant's pre-arbitration submission. - MERCHANT_PREARBITRATION_DECLINE_SUBMITTED = - T.let( - :merchant_prearbitration_decline_submitted, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol - ) + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. + sig do + params( + result: + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The result of verifying the Card Verification Code. + result: + ) + end - # The merchant's pre-arbitration submission was received. - MERCHANT_PREARBITRATION_RECEIVED = - T.let( - :merchant_prearbitration_received, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + sig do + override.returns( + { + result: + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::TaggedSymbol + } ) + end + def to_hash + end - # The transaction was re-presented by the merchant. - REPRESENTED = - T.let( - :represented, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol - ) + # The result of verifying the Card Verification Code. + module Result + extend Increase::Internal::Type::Enum - # The user's pre-arbitration was declined by the merchant. - USER_PREARBITRATION_DECLINE_RECEIVED = - T.let( - :user_prearbitration_decline_received, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The user's pre-arbitration was submitted. - USER_PREARBITRATION_SUBMITTED = - T.let( - :user_prearbitration_submitted, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol - ) + # No card verification code was provided in the authorization request. + NOT_CHECKED = + T.let( + :not_checked, + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # The user withdrew from the dispute. - USER_WITHDRAWAL_SUBMITTED = - T.let( - :user_withdrawal_submitted, - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol + # The card verification code matched the one on file. + MATCH = + T.let( + :match, + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::TaggedSymbol + ) + + # The card verification code did not match the one on file. + NO_MATCH = + T.let( + :no_match, + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode::Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CardholderAddress < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress, + Increase::Internal::AnyHash + ) + end + + # Line 1 of the address on file for the cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :actual_line1 + + # The postal code of the address on file for the cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :actual_postal_code + + # The cardholder address line 1 provided for verification in the authorization + # request. + sig { returns(T.nilable(String)) } + attr_accessor :provided_line1 + + # The postal code provided for verification in the authorization request. + sig { returns(T.nilable(String)) } + attr_accessor :provided_postal_code + + # The address verification result returned to the card network. + sig do + returns( + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol ) + end + attr_accessor :result + + # Cardholder address provided in the authorization request and the address on file + # we verified it against. + sig do + params( + actual_line1: T.nilable(String), + actual_postal_code: T.nilable(String), + provided_line1: T.nilable(String), + provided_postal_code: T.nilable(String), + result: + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # Line 1 of the address on file for the cardholder. + actual_line1:, + # The postal code of the address on file for the cardholder. + actual_postal_code:, + # The cardholder address line 1 provided for verification in the authorization + # request. + provided_line1:, + # The postal code provided for verification in the authorization request. + provided_postal_code:, + # The address verification result returned to the card network. + result: + ) + end sig do override.returns( - T::Array[ - Increase::Transaction::Source::CardDisputeFinancial::Visa::EventType::TaggedSymbol - ] + { + actual_line1: T.nilable(String), + actual_postal_code: T.nilable(String), + provided_line1: T.nilable(String), + provided_postal_code: T.nilable(String), + result: + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + } ) end - def self.values + def to_hash end - end - end - end - class CardDisputeLoss < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::Transaction::Source::CardDisputeLoss, - Increase::Internal::AnyHash - ) - end + # The address verification result returned to the card network. + module Result + extend Increase::Internal::Type::Enum - # Why the Card Dispute was lost. - sig { returns(String) } - attr_accessor :explanation + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - # the Card Dispute was lost. - sig { returns(Time) } - attr_accessor :lost_at + # No address information was provided in the authorization request. + NOT_CHECKED = + T.let( + :not_checked, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ) - # The identifier of the Transaction that was created to debit the disputed funds - # from your account. - sig { returns(String) } - attr_accessor :transaction_id + # Postal code matches, but the street address does not match or was not provided. + POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = + T.let( + :postal_code_match_address_no_match, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ) - # A Card Dispute Loss object. This field will be present in the JSON response if - # and only if `category` is equal to `card_dispute_loss`. Contains the details of - # a lost Card Dispute. - sig do - params( - explanation: String, - lost_at: Time, - transaction_id: String - ).returns(T.attached_class) - end - def self.new( - # Why the Card Dispute was lost. - explanation:, - # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - # the Card Dispute was lost. - lost_at:, - # The identifier of the Transaction that was created to debit the disputed funds - # from your account. - transaction_id: - ) - end + # Postal code does not match, but the street address matches or was not provided. + POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = + T.let( + :postal_code_no_match_address_match, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ) - sig do - override.returns( - { explanation: String, lost_at: Time, transaction_id: String } - ) - end - def to_hash + # Postal code and street address match. + MATCH = + T.let( + :match, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code and street address do not match. + NO_MATCH = + T.let( + :no_match, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress::Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end end end @@ -7985,6 +10137,13 @@ module Increase Increase::Transaction::Source::Category::TaggedSymbol ) + # Card Financial: details will be under the `card_financial` object. + CARD_FINANCIAL = + T.let( + :card_financial, + Increase::Transaction::Source::Category::TaggedSymbol + ) + # Card Revenue Payment: details will be under the `card_revenue_payment` object. CARD_REVENUE_PAYMENT = T.let( diff --git a/rbi/increase/models/transaction_list_params.rbi b/rbi/increase/models/transaction_list_params.rbi index 6f1441426..109d3d26d 100644 --- a/rbi/increase/models/transaction_list_params.rbi +++ b/rbi/increase/models/transaction_list_params.rbi @@ -236,6 +236,13 @@ module Increase Increase::TransactionListParams::Category::In::TaggedSymbol ) + # Card Financial: details will be under the `card_financial` object. + CARD_FINANCIAL = + T.let( + :card_financial, + Increase::TransactionListParams::Category::In::TaggedSymbol + ) + # Card Revenue Payment: details will be under the `card_revenue_payment` object. CARD_REVENUE_PAYMENT = T.let( diff --git a/scripts/fast-format b/scripts/fast-format new file mode 100755 index 000000000..8df0aa262 --- /dev/null +++ b/scripts/fast-format @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Script started with $# arguments" +echo "Arguments: $*" +echo "Script location: $(dirname "$0")" + +cd -- "$(dirname "$0")/.." +echo "Changed to directory: $PWD" + +if [ $# -eq 0 ]; then + echo "Usage: $0 [additional-formatter-args...]" + echo "The file should contain one file path per line" + exit 1 +fi + +FILE="$(mktemp)" +tr -- '\n' '\0' < "$1" > "$FILE" + +exec -- bundle exec rake format FORMAT_FILE="$FILE" diff --git a/sig/increase/models/transaction.rbs b/sig/increase/models/transaction.rbs index 7e9ae040a..c9b277eb9 100644 --- a/sig/increase/models/transaction.rbs +++ b/sig/increase/models/transaction.rbs @@ -114,6 +114,7 @@ module Increase card_dispute_acceptance: Increase::Transaction::Source::CardDisputeAcceptance?, card_dispute_financial: Increase::Transaction::Source::CardDisputeFinancial?, card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss?, + card_financial: Increase::Transaction::Source::CardFinancial?, card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance?, card_refund: Increase::Transaction::Source::CardRefund?, card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment?, @@ -161,6 +162,8 @@ module Increase attr_accessor card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss? + attr_accessor card_financial: Increase::Transaction::Source::CardFinancial? + attr_accessor card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance? attr_accessor card_refund: Increase::Transaction::Source::CardRefund? @@ -226,6 +229,7 @@ module Increase card_dispute_acceptance: Increase::Transaction::Source::CardDisputeAcceptance?, card_dispute_financial: Increase::Transaction::Source::CardDisputeFinancial?, card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss?, + card_financial: Increase::Transaction::Source::CardFinancial?, card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance?, card_refund: Increase::Transaction::Source::CardRefund?, card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment?, @@ -265,6 +269,7 @@ module Increase card_dispute_acceptance: Increase::Transaction::Source::CardDisputeAcceptance?, card_dispute_financial: Increase::Transaction::Source::CardDisputeFinancial?, card_dispute_loss: Increase::Transaction::Source::CardDisputeLoss?, + card_financial: Increase::Transaction::Source::CardFinancial?, card_push_transfer_acceptance: Increase::Transaction::Source::CardPushTransferAcceptance?, card_refund: Increase::Transaction::Source::CardRefund?, card_revenue_payment: Increase::Transaction::Source::CardRevenuePayment?, @@ -899,6 +904,765 @@ module Increase } end + type card_financial = + { + id: String, + actioner: Increase::Models::Transaction::Source::CardFinancial::actioner, + additional_amounts: Increase::Transaction::Source::CardFinancial::AdditionalAmounts, + amount: Integer, + card_payment_id: String, + currency: Increase::Models::Transaction::Source::CardFinancial::currency, + digital_wallet_token_id: String?, + direction: Increase::Models::Transaction::Source::CardFinancial::direction, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String?, + merchant_country: String, + merchant_descriptor: String, + merchant_postal_code: String?, + merchant_state: String?, + network_details: Increase::Transaction::Source::CardFinancial::NetworkDetails, + network_identifiers: Increase::Transaction::Source::CardFinancial::NetworkIdentifiers, + network_risk_score: Integer?, + physical_card_id: String?, + presentment_amount: Integer, + presentment_currency: String, + processing_category: Increase::Models::Transaction::Source::CardFinancial::processing_category, + real_time_decision_id: String?, + terminal_id: String?, + transaction_id: String, + type: Increase::Models::Transaction::Source::CardFinancial::type_, + verification: Increase::Transaction::Source::CardFinancial::Verification + } + + class CardFinancial < Increase::Internal::Type::BaseModel + attr_accessor id: String + + attr_accessor actioner: Increase::Models::Transaction::Source::CardFinancial::actioner + + attr_accessor additional_amounts: Increase::Transaction::Source::CardFinancial::AdditionalAmounts + + attr_accessor amount: Integer + + attr_accessor card_payment_id: String + + attr_accessor currency: Increase::Models::Transaction::Source::CardFinancial::currency + + attr_accessor digital_wallet_token_id: String? + + attr_accessor direction: Increase::Models::Transaction::Source::CardFinancial::direction + + attr_accessor merchant_acceptor_id: String + + attr_accessor merchant_category_code: String + + attr_accessor merchant_city: String? + + attr_accessor merchant_country: String + + attr_accessor merchant_descriptor: String + + attr_accessor merchant_postal_code: String? + + attr_accessor merchant_state: String? + + attr_accessor network_details: Increase::Transaction::Source::CardFinancial::NetworkDetails + + attr_accessor network_identifiers: Increase::Transaction::Source::CardFinancial::NetworkIdentifiers + + attr_accessor network_risk_score: Integer? + + attr_accessor physical_card_id: String? + + attr_accessor presentment_amount: Integer + + attr_accessor presentment_currency: String + + attr_accessor processing_category: Increase::Models::Transaction::Source::CardFinancial::processing_category + + attr_accessor real_time_decision_id: String? + + attr_accessor terminal_id: String? + + attr_accessor transaction_id: String + + attr_accessor type: Increase::Models::Transaction::Source::CardFinancial::type_ + + attr_accessor verification: Increase::Transaction::Source::CardFinancial::Verification + + def initialize: ( + id: String, + actioner: Increase::Models::Transaction::Source::CardFinancial::actioner, + additional_amounts: Increase::Transaction::Source::CardFinancial::AdditionalAmounts, + amount: Integer, + card_payment_id: String, + currency: Increase::Models::Transaction::Source::CardFinancial::currency, + digital_wallet_token_id: String?, + direction: Increase::Models::Transaction::Source::CardFinancial::direction, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String?, + merchant_country: String, + merchant_descriptor: String, + merchant_postal_code: String?, + merchant_state: String?, + network_details: Increase::Transaction::Source::CardFinancial::NetworkDetails, + network_identifiers: Increase::Transaction::Source::CardFinancial::NetworkIdentifiers, + network_risk_score: Integer?, + physical_card_id: String?, + presentment_amount: Integer, + presentment_currency: String, + processing_category: Increase::Models::Transaction::Source::CardFinancial::processing_category, + real_time_decision_id: String?, + terminal_id: String?, + transaction_id: String, + type: Increase::Models::Transaction::Source::CardFinancial::type_, + verification: Increase::Transaction::Source::CardFinancial::Verification + ) -> void + + def to_hash: -> { + id: String, + actioner: Increase::Models::Transaction::Source::CardFinancial::actioner, + additional_amounts: Increase::Transaction::Source::CardFinancial::AdditionalAmounts, + amount: Integer, + card_payment_id: String, + currency: Increase::Models::Transaction::Source::CardFinancial::currency, + digital_wallet_token_id: String?, + direction: Increase::Models::Transaction::Source::CardFinancial::direction, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String?, + merchant_country: String, + merchant_descriptor: String, + merchant_postal_code: String?, + merchant_state: String?, + network_details: Increase::Transaction::Source::CardFinancial::NetworkDetails, + network_identifiers: Increase::Transaction::Source::CardFinancial::NetworkIdentifiers, + network_risk_score: Integer?, + physical_card_id: String?, + presentment_amount: Integer, + presentment_currency: String, + processing_category: Increase::Models::Transaction::Source::CardFinancial::processing_category, + real_time_decision_id: String?, + terminal_id: String?, + transaction_id: String, + type: Increase::Models::Transaction::Source::CardFinancial::type_, + verification: Increase::Transaction::Source::CardFinancial::Verification + } + + type actioner = :user | :increase | :network + + module Actioner + extend Increase::Internal::Type::Enum + + # This object was actioned by the user through a real-time decision. + USER: :user + + # This object was actioned by Increase without user intervention. + INCREASE: :increase + + # This object was actioned by the network, through stand-in processing. + NETWORK: :network + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::actioner] + end + + type additional_amounts = + { + clinic: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic?, + dental: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental?, + prescription: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription?, + surcharge: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare?, + transit: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit?, + unknown: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown?, + vision: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic?, + dental: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental?, + prescription: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription?, + surcharge: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare?, + transit: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit?, + unknown: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown?, + vision: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Clinic?, + dental: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Dental?, + prescription: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Prescription?, + surcharge: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::TotalHealthcare?, + transit: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Transit?, + unknown: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Unknown?, + vision: Increase::Transaction::Source::CardFinancial::AdditionalAmounts::Vision? + } + + type clinic = { amount: Integer, currency: String } + + class Clinic < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type dental = { amount: Integer, currency: String } + + class Dental < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type prescription = { amount: Integer, currency: String } + + class Prescription < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type surcharge = { amount: Integer, currency: String } + + class Surcharge < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type total_cumulative = { amount: Integer, currency: String } + + class TotalCumulative < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type total_healthcare = { amount: Integer, currency: String } + + class TotalHealthcare < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type transit = { amount: Integer, currency: String } + + class Transit < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type unknown = { amount: Integer, currency: String } + + class Unknown < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + + type vision = { amount: Integer, currency: String } + + class Vision < Increase::Internal::Type::BaseModel + attr_accessor amount: Integer + + attr_accessor currency: String + + def initialize: (amount: Integer, currency: String) -> void + + def to_hash: -> { amount: Integer, currency: String } + end + end + + type currency = :CAD | :CHF | :EUR | :GBP | :JPY | :USD + + module Currency + extend Increase::Internal::Type::Enum + + # Canadian Dollar (CAD) + CAD: :CAD + + # Swiss Franc (CHF) + CHF: :CHF + + # Euro (EUR) + EUR: :EUR + + # British Pound (GBP) + GBP: :GBP + + # Japanese Yen (JPY) + JPY: :JPY + + # US Dollar (USD) + USD: :USD + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::currency] + end + + type direction = :settlement | :refund + + module Direction + extend Increase::Internal::Type::Enum + + # A regular card authorization where funds are debited from the cardholder. + SETTLEMENT: :settlement + + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND: :refund + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::direction] + end + + type network_details = + { + category: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::category, + visa: Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa? + } + + class NetworkDetails < Increase::Internal::Type::BaseModel + attr_accessor category: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::category + + attr_accessor visa: Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa? + + def initialize: ( + category: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::category, + visa: Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa? + ) -> void + + def to_hash: -> { + category: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::category, + visa: Increase::Transaction::Source::CardFinancial::NetworkDetails::Visa? + } + + type category = :visa + + module Category + extend Increase::Internal::Type::Enum + + # Visa + VISA: :visa + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::category] + end + + type visa = + { + electronic_commerce_indicator: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::electronic_commerce_indicator?, + point_of_service_entry_mode: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::point_of_service_entry_mode?, + stand_in_processing_reason: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::stand_in_processing_reason? + } + + class Visa < Increase::Internal::Type::BaseModel + attr_accessor electronic_commerce_indicator: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::electronic_commerce_indicator? + + attr_accessor point_of_service_entry_mode: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::point_of_service_entry_mode? + + attr_accessor stand_in_processing_reason: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::stand_in_processing_reason? + + def initialize: ( + electronic_commerce_indicator: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::electronic_commerce_indicator?, + point_of_service_entry_mode: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::point_of_service_entry_mode?, + stand_in_processing_reason: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::stand_in_processing_reason? + ) -> void + + def to_hash: -> { + electronic_commerce_indicator: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::electronic_commerce_indicator?, + point_of_service_entry_mode: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::point_of_service_entry_mode?, + stand_in_processing_reason: Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::stand_in_processing_reason? + } + + type electronic_commerce_indicator = + :mail_phone_order + | :recurring + | :installment + | :unknown_mail_phone_order + | :secure_electronic_commerce + | :non_authenticated_security_transaction_at_3ds_capable_merchant + | :non_authenticated_security_transaction + | :non_secure_transaction + + module ElectronicCommerceIndicator + extend Increase::Internal::Type::Enum + + # Single transaction of a mail/phone order: Use to indicate that the transaction is a mail/phone order purchase, not a recurring transaction or installment payment. For domestic transactions in the US region, this value may also indicate one bill payment transaction in the card-present or card-absent environments. + MAIL_PHONE_ORDER: :mail_phone_order + + # Recurring transaction: Payment indicator used to indicate a recurring transaction that originates from an acquirer in the US region. + RECURRING: :recurring + + # Installment payment: Payment indicator used to indicate one purchase of goods or services that is billed to the account in multiple charges over a period of time agreed upon by the cardholder and merchant from transactions that originate from an acquirer in the US region. + INSTALLMENT: :installment + + # Unknown classification: other mail order: Use to indicate that the type of mail/telephone order is unknown. + UNKNOWN_MAIL_PHONE_ORDER: :unknown_mail_phone_order + + # Secure electronic commerce transaction: Use to indicate that the electronic commerce transaction has been authenticated using e.g., 3-D Secure + SECURE_ELECTRONIC_COMMERCE: :secure_electronic_commerce + + # Non-authenticated security transaction at a 3-D Secure-capable merchant, and merchant attempted to authenticate the cardholder using 3-D Secure: Use to identify an electronic commerce transaction where the merchant attempted to authenticate the cardholder using 3-D Secure, but was unable to complete the authentication because the issuer or cardholder does not participate in the 3-D Secure program. + NON_AUTHENTICATED_SECURITY_TRANSACTION_AT_3DS_CAPABLE_MERCHANT: :non_authenticated_security_transaction_at_3ds_capable_merchant + + # Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data encryption for security however , cardholder authentication is not performed using 3-D Secure. + NON_AUTHENTICATED_SECURITY_TRANSACTION: :non_authenticated_security_transaction + + # Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. + NON_SECURE_TRANSACTION: :non_secure_transaction + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::electronic_commerce_indicator] + end + + type point_of_service_entry_mode = + :unknown + | :manual + | :magnetic_stripe_no_cvv + | :optical_code + | :integrated_circuit_card + | :contactless + | :credential_on_file + | :magnetic_stripe + | :contactless_magnetic_stripe + | :integrated_circuit_card_no_cvv + + module PointOfServiceEntryMode + extend Increase::Internal::Type::Enum + + # Unknown + UNKNOWN: :unknown + + # Manual key entry + MANUAL: :manual + + # Magnetic stripe read, without card verification value + MAGNETIC_STRIPE_NO_CVV: :magnetic_stripe_no_cvv + + # Optical code + OPTICAL_CODE: :optical_code + + # Contact chip card + INTEGRATED_CIRCUIT_CARD: :integrated_circuit_card + + # Contactless read of chip card + CONTACTLESS: :contactless + + # Transaction initiated using a credential that has previously been stored on file + CREDENTIAL_ON_FILE: :credential_on_file + + # Magnetic stripe read + MAGNETIC_STRIPE: :magnetic_stripe + + # Contactless read of magnetic stripe data + CONTACTLESS_MAGNETIC_STRIPE: :contactless_magnetic_stripe + + # Contact chip card, without card verification value + INTEGRATED_CIRCUIT_CARD_NO_CVV: :integrated_circuit_card_no_cvv + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::point_of_service_entry_mode] + end + + type stand_in_processing_reason = + :issuer_error + | :invalid_physical_card + | :invalid_cardholder_authentication_verification_value + | :internal_visa_error + | :merchant_transaction_advisory_service_authentication_required + | :payment_fraud_disruption_acquirer_block + | :other + + module StandInProcessingReason + extend Increase::Internal::Type::Enum + + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR: :issuer_error + + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD: :invalid_physical_card + + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE: :invalid_cardholder_authentication_verification_value + + # An internal Visa error occurred. Visa uses this reason code for certain expected occurrences as well, such as Application Transaction Counter (ATC) replays. + INTERNAL_VISA_ERROR: :internal_visa_error + + # The merchant has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + MERCHANT_TRANSACTION_ADVISORY_SERVICE_AUTHENTICATION_REQUIRED: :merchant_transaction_advisory_service_authentication_required + + # The transaction was blocked by Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, such as card testing. + PAYMENT_FRAUD_DISRUPTION_ACQUIRER_BLOCK: :payment_fraud_disruption_acquirer_block + + # An unspecific reason for stand-in processing. + OTHER: :other + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::NetworkDetails::Visa::stand_in_processing_reason] + end + end + end + + type network_identifiers = + { + retrieval_reference_number: String?, + trace_number: String?, + transaction_id: String? + } + + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + attr_accessor retrieval_reference_number: String? + + attr_accessor trace_number: String? + + attr_accessor transaction_id: String? + + def initialize: ( + retrieval_reference_number: String?, + trace_number: String?, + transaction_id: String? + ) -> void + + def to_hash: -> { + retrieval_reference_number: String?, + trace_number: String?, + transaction_id: String? + } + end + + type processing_category = + :account_funding + | :automatic_fuel_dispenser + | :bill_payment + | :original_credit + | :purchase + | :quasi_cash + | :refund + | :cash_disbursement + | :unknown + + module ProcessingCategory + extend Increase::Internal::Type::Enum + + # Account funding transactions are transactions used to e.g., fund an account or transfer funds between accounts. + ACCOUNT_FUNDING: :account_funding + + # Automatic fuel dispenser authorizations occur when a card is used at a gas pump, prior to the actual transaction amount being known. They are followed by an advice message that updates the amount of the pending transaction. + AUTOMATIC_FUEL_DISPENSER: :automatic_fuel_dispenser + + # A transaction used to pay a bill. + BILL_PAYMENT: :bill_payment + + # Original credit transactions are used to send money to a cardholder. + ORIGINAL_CREDIT: :original_credit + + # A regular purchase. + PURCHASE: :purchase + + # Quasi-cash transactions represent purchases of items which may be convertible to cash. + QUASI_CASH: :quasi_cash + + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND: :refund + + # Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + CASH_DISBURSEMENT: :cash_disbursement + + # The processing category is unknown. + UNKNOWN: :unknown + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::processing_category] + end + + type type_ = :card_financial + + module Type + extend Increase::Internal::Type::Enum + + CARD_FINANCIAL: :card_financial + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::type_] + end + + type verification = + { + card_verification_code: Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode, + cardholder_address: Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress + } + + class Verification < Increase::Internal::Type::BaseModel + attr_accessor card_verification_code: Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode + + attr_accessor cardholder_address: Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress + + def initialize: ( + card_verification_code: Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode, + cardholder_address: Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress + ) -> void + + def to_hash: -> { + card_verification_code: Increase::Transaction::Source::CardFinancial::Verification::CardVerificationCode, + cardholder_address: Increase::Transaction::Source::CardFinancial::Verification::CardholderAddress + } + + type card_verification_code = + { + result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::result + } + + class CardVerificationCode < Increase::Internal::Type::BaseModel + attr_accessor result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::result + + def initialize: ( + result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::result + ) -> void + + def to_hash: -> { + result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::result + } + + type result = :not_checked | :match | :no_match + + module Result + extend Increase::Internal::Type::Enum + + # No card verification code was provided in the authorization request. + NOT_CHECKED: :not_checked + + # The card verification code matched the one on file. + MATCH: :match + + # The card verification code did not match the one on file. + NO_MATCH: :no_match + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::Verification::CardVerificationCode::result] + end + end + + type cardholder_address = + { + :actual_line1 => String?, + actual_postal_code: String?, + :provided_line1 => String?, + provided_postal_code: String?, + result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::result + } + + class CardholderAddress < Increase::Internal::Type::BaseModel + attr_accessor actual_line1: String? + + attr_accessor actual_postal_code: String? + + attr_accessor provided_line1: String? + + attr_accessor provided_postal_code: String? + + attr_accessor result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::result + + def initialize: ( + actual_line1: String?, + actual_postal_code: String?, + provided_line1: String?, + provided_postal_code: String?, + result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::result + ) -> void + + def to_hash: -> { + :actual_line1 => String?, + actual_postal_code: String?, + :provided_line1 => String?, + provided_postal_code: String?, + result: Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::result + } + + type result = + :not_checked + | :postal_code_match_address_no_match + | :postal_code_no_match_address_match + | :match + | :no_match + | :postal_code_match_address_not_checked + + module Result + extend Increase::Internal::Type::Enum + + # No address information was provided in the authorization request. + NOT_CHECKED: :not_checked + + # Postal code matches, but the street address does not match or was not provided. + POSTAL_CODE_MATCH_ADDRESS_NO_MATCH: :postal_code_match_address_no_match + + # Postal code does not match, but the street address matches or was not provided. + POSTAL_CODE_NO_MATCH_ADDRESS_MATCH: :postal_code_no_match_address_match + + # Postal code and street address match. + MATCH: :match + + # Postal code and street address do not match. + NO_MATCH: :no_match + + # Postal code matches, but the street address was not verified. (deprecated) + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED: :postal_code_match_address_not_checked + + def self?.values: -> ::Array[Increase::Models::Transaction::Source::CardFinancial::Verification::CardholderAddress::result] + end + end + end + end + type card_push_transfer_acceptance = { amount: Integer, transfer_id: String } @@ -3147,6 +3911,7 @@ module Increase | :card_dispute_loss | :card_refund | :card_settlement + | :card_financial | :card_revenue_payment | :check_deposit_acceptance | :check_deposit_return @@ -3206,6 +3971,9 @@ module Increase # Card Settlement: details will be under the `card_settlement` object. CARD_SETTLEMENT: :card_settlement + # Card Financial: details will be under the `card_financial` object. + CARD_FINANCIAL: :card_financial + # Card Revenue Payment: details will be under the `card_revenue_payment` object. CARD_REVENUE_PAYMENT: :card_revenue_payment diff --git a/sig/increase/models/transaction_list_params.rbs b/sig/increase/models/transaction_list_params.rbs index 6ccbc6022..499f5bae4 100644 --- a/sig/increase/models/transaction_list_params.rbs +++ b/sig/increase/models/transaction_list_params.rbs @@ -92,6 +92,7 @@ module Increase | :card_dispute_loss | :card_refund | :card_settlement + | :card_financial | :card_revenue_payment | :check_deposit_acceptance | :check_deposit_return @@ -151,6 +152,9 @@ module Increase # Card Settlement: details will be under the `card_settlement` object. CARD_SETTLEMENT: :card_settlement + # Card Financial: details will be under the `card_financial` object. + CARD_FINANCIAL: :card_financial + # Card Revenue Payment: details will be under the `card_revenue_payment` object. CARD_REVENUE_PAYMENT: :card_revenue_payment