diff --git a/.release-please-manifest.json b/.release-please-manifest.json index de44c40d8..69eb19a7b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.19.0" + ".": "1.20.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 093b8c5d0..1cc1a647b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-976ae14d2349a3599f9bd33dba52b3c12c265493a8af9e581c71b2e819b8de04.yml -openapi_spec_hash: d8a9fef4dfe082acdf834ac0339e800c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5fa3dfeb071930598ed9243dd96db808cf54d4a455c99b1acceadc3335f1a387.yml +openapi_spec_hash: 18dfa4d31cd512dcd83b646e40fb2c86 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e3f2a9da..7611e6750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.20.0 (2025-07-29) + +Full Changelog: [v1.19.0...v1.20.0](https://github.com/Increase/increase-ruby/compare/v1.19.0...v1.20.0) + +### Features + +* **api:** api update ([a305243](https://github.com/Increase/increase-ruby/commit/a305243b97483889ea225182d92bb9ecd6c6f2e0)) +* **api:** api update ([d7208d2](https://github.com/Increase/increase-ruby/commit/d7208d2033e0cab1197b430876302fc132688459)) + ## 1.19.0 (2025-07-29) Full Changelog: [v1.18.1...v1.19.0](https://github.com/Increase/increase-ruby/compare/v1.18.1...v1.19.0) diff --git a/Gemfile.lock b/Gemfile.lock index 094cf5bf7..1d118919b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.19.0) + increase (1.20.0) connection_pool GEM diff --git a/README.md b/README.md index 77aec3d63..54dd880dd 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.19.0" +gem "increase", "~> 1.20.0" ``` diff --git a/lib/increase/models/card_payment.rb b/lib/increase/models/card_payment.rb index 55fc821e9..b369bf0b9 100644 --- a/lib/increase/models/card_payment.rb +++ b/lib/increase/models/card_payment.rb @@ -643,6 +643,17 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::CardPayment::Element::CardAuthorization::Actioner] required :actioner, enum: -> { Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::AdditionalAmounts] + required :additional_amounts, + -> { + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts + } + # @!attribute amount # The pending amount in the minor unit of the transaction's currency. For dollars, # for example, this is cents. @@ -810,7 +821,7 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Increase::Models::CardPayment::Element::CardAuthorization::Verification] required :verification, -> { Increase::CardPayment::Element::CardAuthorization::Verification } - # @!method initialize(id:, actioner:, amount:, card_payment_id:, currency:, digital_wallet_token_id:, direction:, expires_at:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, pending_transaction_id:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, real_time_decision_id:, terminal_id:, type:, verification:) + # @!method initialize(id:, actioner:, additional_amounts:, amount:, card_payment_id:, currency:, digital_wallet_token_id:, direction:, expires_at:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, pending_transaction_id:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, real_time_decision_id:, terminal_id:, type:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::CardPayment::Element::CardAuthorization} for more details. # @@ -823,6 +834,8 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param actioner [Symbol, Increase::Models::CardPayment::Element::CardAuthorization::Actioner] Whether this authorization was approved by Increase, the card network through st # + # @param additional_amounts [Increase::Models::CardPayment::Element::CardAuthorization::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. @@ -893,6 +906,357 @@ module Actioner # @return [Array] end + # @see Increase::Models::CardPayment::Element::CardAuthorization#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::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription + }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative + }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare + }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardAuthorization::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardAuthorization::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. + # + # @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. # @@ -1520,6 +1884,14 @@ class CardDecline < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::CardPayment::Element::CardDecline::Actioner] required :actioner, enum: -> { Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::AdditionalAmounts] + required :additional_amounts, -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts } + # @!attribute amount # The declined amount in the minor unit of the destination account currency. For # dollars, for example, this is cents. @@ -1690,7 +2062,7 @@ class CardDecline < Increase::Internal::Type::BaseModel # @return [Increase::Models::CardPayment::Element::CardDecline::Verification] required :verification, -> { Increase::CardPayment::Element::CardDecline::Verification } - # @!method initialize(id:, actioner:, amount:, card_payment_id:, currency:, declined_transaction_id:, 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:, real_time_decision_reason:, reason:, terminal_id:, verification:) + # @!method initialize(id:, actioner:, additional_amounts:, amount:, card_payment_id:, currency:, declined_transaction_id:, 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:, real_time_decision_reason:, reason:, terminal_id:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::CardPayment::Element::CardDecline} for more details. # @@ -1701,6 +2073,8 @@ class CardDecline < Increase::Internal::Type::BaseModel # # @param actioner [Symbol, Increase::Models::CardPayment::Element::CardDecline::Actioner] Whether this authorization was approved by Increase, the card network through st # + # @param additional_amounts [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge + # # @param amount [Integer] The declined amount in the minor unit of the destination account currency. For d # # @param card_payment_id [String] The ID of the Card Payment this transaction belongs to. @@ -1771,6 +2145,351 @@ module Actioner # @return [Array] end + # @see Increase::Models::CardPayment::Element::CardDecline#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::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardDecline::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardDecline::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. + # + # @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 destination # account currency. # @@ -2536,6 +3255,17 @@ class CardIncrement < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Actioner] required :actioner, enum: -> { Increase::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardIncrement::AdditionalAmounts] + required :additional_amounts, + -> { + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts + } + # @!attribute amount # The amount of this increment in the minor unit of the transaction's currency. # For dollars, for example, this is cents. @@ -2571,90 +3301,455 @@ class CardIncrement < Increase::Internal::Type::BaseModel Increase::CardPayment::Element::CardIncrement::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 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 pending_transaction_id + # The identifier of the Pending Transaction associated with this Card Increment. + # + # @return [String, nil] + required :pending_transaction_id, String, nil?: true + + # @!attribute presentment_amount + # The amount of this increment 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 real_time_decision_id + # The identifier of the Real-Time Decision sent to approve or decline this + # incremental authorization. + # + # @return [String, nil] + required :real_time_decision_id, String, nil?: true + + # @!attribute type + # A constant representing the object's type. For this resource it will always be + # `card_increment`. + # + # @return [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Type] + required :type, enum: -> { Increase::CardPayment::Element::CardIncrement::Type } + + # @!attribute updated_authorization_amount + # The updated authorization amount after this increment, in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + # + # @return [Integer] + required :updated_authorization_amount, Integer + + # @!method initialize(id:, actioner:, additional_amounts:, amount:, card_authorization_id:, currency:, network:, network_identifiers:, network_risk_score:, pending_transaction_id:, presentment_amount:, presentment_currency:, real_time_decision_id:, type:, updated_authorization_amount:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPayment::Element::CardIncrement} for more details. + # + # A Card Increment object. This field will be present in the JSON response if and + # only if `category` is equal to `card_increment`. Card Increments increase the + # pending amount of an authorized transaction. + # + # @param id [String] The Card Increment identifier. + # + # @param actioner [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Actioner] Whether this authorization was approved by Increase, the card network through st + # + # @param additional_amounts [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge + # + # @param amount [Integer] The amount of this increment in the minor unit of the transaction's currency. Fo + # + # @param card_authorization_id [String] The identifier for the Card Authorization this increments. + # + # @param currency [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Currency] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # + # @param network [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Network] The card network used to process this card authorization. + # + # @param network_identifiers [Increase::Models::CardPayment::Element::CardIncrement::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 pending_transaction_id [String, nil] The identifier of the Pending Transaction associated with this Card Increment. + # + # @param presentment_amount [Integer] The amount of this increment in the minor unit of the transaction's presentment + # + # @param presentment_currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction' + # + # @param real_time_decision_id [String, nil] The identifier of the Real-Time Decision sent to approve or decline this increme + # + # @param type [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Type] A constant representing the object's type. For this resource it will always be ` + # + # @param updated_authorization_amount [Integer] The updated authorization amount after this increment, in the minor unit of the + + # Whether this authorization was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + # + # @see Increase::Models::CardPayment::Element::CardIncrement#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::CardPayment::Element::CardIncrement#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::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @return [Integer] + required :amount, Integer - # @!attribute pending_transaction_id - # The identifier of the Pending Transaction associated with this Card Increment. - # - # @return [String, nil] - required :pending_transaction_id, String, nil?: true + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String - # @!attribute real_time_decision_id - # The identifier of the Real-Time Decision sent to approve or decline this - # incremental authorization. - # - # @return [String, nil] - required :real_time_decision_id, String, nil?: true + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end - # @!attribute type - # A constant representing the object's type. For this resource it will always be - # `card_increment`. - # - # @return [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Type] - required :type, enum: -> { Increase::CardPayment::Element::CardIncrement::Type } + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @return [Integer] + required :amount, Integer - # @!attribute updated_authorization_amount - # The updated authorization amount after this increment, in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - # - # @return [Integer] - required :updated_authorization_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(id:, actioner:, amount:, card_authorization_id:, currency:, network:, network_identifiers:, network_risk_score:, pending_transaction_id:, real_time_decision_id:, type:, updated_authorization_amount:) - # Some parameter documentations has been truncated, see - # {Increase::Models::CardPayment::Element::CardIncrement} for more details. - # - # A Card Increment object. This field will be present in the JSON response if and - # only if `category` is equal to `card_increment`. Card Increments increase the - # pending amount of an authorized transaction. - # - # @param id [String] The Card Increment identifier. - # - # @param actioner [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Actioner] Whether this authorization was approved by Increase, the card network through st - # - # @param amount [Integer] The amount of this increment in the minor unit of the transaction's currency. Fo - # - # @param card_authorization_id [String] The identifier for the Card Authorization this increments. - # - # @param currency [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Currency] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # - # @param network [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Network] The card network used to process this card authorization. - # - # @param network_identifiers [Increase::Models::CardPayment::Element::CardIncrement::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 pending_transaction_id [String, nil] The identifier of the Pending Transaction associated with this Card Increment. - # - # @param real_time_decision_id [String, nil] The identifier of the Real-Time Decision sent to approve or decline this increme - # - # @param type [Symbol, Increase::Models::CardPayment::Element::CardIncrement::Type] A constant representing the object's type. For this resource it will always be ` - # - # @param updated_authorization_amount [Integer] The updated authorization amount after this increment, in the minor unit of the + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPayment::Element::CardIncrement::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - # - # @see Increase::Models::CardPayment::Element::CardIncrement#actioner - module Actioner - extend Increase::Internal::Type::Enum + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @return [Integer] + required :amount, Integer - # This object was actioned by the user through a real-time decision. - USER = :user + # @!attribute currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + # + # @return [String] + required :currency, String - # This object was actioned by Increase without user intervention. - INCREASE = :increase + # @!method initialize(amount:, currency:) + # Some parameter documentations has been truncated, see + # {Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end - # This object was actioned by the network, through stand-in processing. - NETWORK = :network + # @see Increase::Models::CardPayment::Element::CardIncrement::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @return [Integer] + required :amount, Integer - # @!method self.values - # @return [Array] + # @!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::CardPayment::Element::CardIncrement::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. + # + # @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 increment's @@ -5815,6 +6910,17 @@ class CardValidation < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::CardPayment::Element::CardValidation::Actioner] required :actioner, enum: -> { Increase::CardPayment::Element::CardValidation::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::CardPayment::Element::CardValidation::AdditionalAmounts] + required :additional_amounts, + -> { + Increase::CardPayment::Element::CardValidation::AdditionalAmounts + } + # @!attribute card_payment_id # The ID of the Card Payment this transaction belongs to. # @@ -5936,7 +7042,7 @@ class CardValidation < Increase::Internal::Type::BaseModel # @return [Increase::Models::CardPayment::Element::CardValidation::Verification] required :verification, -> { Increase::CardPayment::Element::CardValidation::Verification } - # @!method initialize(id:, actioner:, card_payment_id:, currency:, digital_wallet_token_id:, 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:, real_time_decision_id:, terminal_id:, type:, verification:) + # @!method initialize(id:, actioner:, additional_amounts:, card_payment_id:, currency:, digital_wallet_token_id:, 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:, real_time_decision_id:, terminal_id:, type:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::CardPayment::Element::CardValidation} for more details. # @@ -5949,6 +7055,8 @@ class CardValidation < Increase::Internal::Type::BaseModel # # @param actioner [Symbol, Increase::Models::CardPayment::Element::CardValidation::Actioner] Whether this authorization was approved by Increase, the card network through st # + # @param additional_amounts [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge + # # @param card_payment_id [String] The ID of the Card Payment this transaction belongs to. # # @param currency [Symbol, Increase::Models::CardPayment::Element::CardValidation::Currency] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction' @@ -6005,6 +7113,355 @@ module Actioner # @return [Array] end + # @see Increase::Models::CardPayment::Element::CardValidation#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::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative + }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare + }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::CardPayment::Element::CardValidation::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::CardPayment::Element::CardValidation::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::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::CardPayment::Element::CardValidation::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::CardPayment::Element::CardValidation::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. + # + # @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. # diff --git a/lib/increase/models/declined_transaction.rb b/lib/increase/models/declined_transaction.rb index de867df4f..2f55a0a3f 100644 --- a/lib/increase/models/declined_transaction.rb +++ b/lib/increase/models/declined_transaction.rb @@ -438,6 +438,17 @@ class CardDecline < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::DeclinedTransaction::Source::CardDecline::Actioner] required :actioner, enum: -> { Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts] + required :additional_amounts, + -> { + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts + } + # @!attribute amount # The declined amount in the minor unit of the destination account currency. For # dollars, for example, this is cents. @@ -606,7 +617,7 @@ class CardDecline < Increase::Internal::Type::BaseModel # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::Verification] required :verification, -> { Increase::DeclinedTransaction::Source::CardDecline::Verification } - # @!method initialize(id:, actioner:, amount:, card_payment_id:, currency:, declined_transaction_id:, 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:, real_time_decision_reason:, reason:, terminal_id:, verification:) + # @!method initialize(id:, actioner:, additional_amounts:, amount:, card_payment_id:, currency:, declined_transaction_id:, 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:, real_time_decision_reason:, reason:, terminal_id:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::DeclinedTransaction::Source::CardDecline} for more details. # @@ -617,6 +628,8 @@ class CardDecline < Increase::Internal::Type::BaseModel # # @param actioner [Symbol, Increase::Models::DeclinedTransaction::Source::CardDecline::Actioner] Whether this authorization was approved by Increase, the card network through st # + # @param additional_amounts [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge + # # @param amount [Integer] The declined amount in the minor unit of the destination account currency. For d # # @param card_payment_id [String] The ID of the Card Payment this transaction belongs to. @@ -687,6 +700,357 @@ module Actioner # @return [Array] end + # @see Increase::Models::DeclinedTransaction::Source::CardDecline#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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription + }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative + }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare + }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::DeclinedTransaction::Source::CardDecline::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::DeclinedTransaction::Source::CardDecline::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. + # + # @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 destination # account currency. # diff --git a/lib/increase/models/pending_transaction.rb b/lib/increase/models/pending_transaction.rb index 992106ff3..041672c5c 100644 --- a/lib/increase/models/pending_transaction.rb +++ b/lib/increase/models/pending_transaction.rb @@ -471,6 +471,15 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Symbol, Increase::Models::PendingTransaction::Source::CardAuthorization::Actioner] required :actioner, enum: -> { Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts] + required :additional_amounts, + -> { Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts } + # @!attribute amount # The pending amount in the minor unit of the transaction's currency. For dollars, # for example, this is cents. @@ -641,7 +650,7 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::Verification] required :verification, -> { Increase::PendingTransaction::Source::CardAuthorization::Verification } - # @!method initialize(id:, actioner:, amount:, card_payment_id:, currency:, digital_wallet_token_id:, direction:, expires_at:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, pending_transaction_id:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, real_time_decision_id:, terminal_id:, type:, verification:) + # @!method initialize(id:, actioner:, additional_amounts:, amount:, card_payment_id:, currency:, digital_wallet_token_id:, direction:, expires_at:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, pending_transaction_id:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, real_time_decision_id:, terminal_id:, type:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::PendingTransaction::Source::CardAuthorization} for more # details. @@ -655,6 +664,8 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param actioner [Symbol, Increase::Models::PendingTransaction::Source::CardAuthorization::Actioner] Whether this authorization was approved by Increase, the card network through st # + # @param additional_amounts [Increase::Models::PendingTransaction::Source::CardAuthorization::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. @@ -725,6 +736,369 @@ module Actioner # @return [Array] end + # @see Increase::Models::PendingTransaction::Source::CardAuthorization#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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic + }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental, nil] + required :dental, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental + }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription + }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge + }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative + }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare + }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit, nil] + required :transit, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit + }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown + }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision, nil] + required :vision, + -> { + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::PendingTransaction::Source::CardAuthorization::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::PendingTransaction::Source::CardAuthorization::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. + # + # @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. # diff --git a/lib/increase/models/real_time_decision.rb b/lib/increase/models/real_time_decision.rb index 09450eefd..e19c1aa8d 100644 --- a/lib/increase/models/real_time_decision.rb +++ b/lib/increase/models/real_time_decision.rb @@ -248,6 +248,14 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [String] required :account_id, String + # @!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::RealTimeDecision::CardAuthorization::AdditionalAmounts] + required :additional_amounts, -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts } + # @!attribute card_id # The identifier of the Card that is being authorized. # @@ -411,7 +419,7 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # @return [Increase::Models::RealTimeDecision::CardAuthorization::Verification] required :verification, -> { Increase::RealTimeDecision::CardAuthorization::Verification } - # @!method initialize(account_id:, card_id:, decision:, digital_wallet_token_id:, direction:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, request_details:, settlement_amount:, settlement_currency:, terminal_id:, upcoming_card_payment_id:, verification:) + # @!method initialize(account_id:, additional_amounts:, card_id:, decision:, digital_wallet_token_id:, direction:, merchant_acceptor_id:, merchant_category_code:, merchant_city:, merchant_country:, merchant_descriptor:, merchant_postal_code:, merchant_state:, network_details:, network_identifiers:, network_risk_score:, physical_card_id:, presentment_amount:, presentment_currency:, processing_category:, request_details:, settlement_amount:, settlement_currency:, terminal_id:, upcoming_card_payment_id:, verification:) # Some parameter documentations has been truncated, see # {Increase::Models::RealTimeDecision::CardAuthorization} for more details. # @@ -419,6 +427,8 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param account_id [String] The identifier of the Account the authorization will debit. # + # @param additional_amounts [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts] Additional amounts associated with the card authorization, such as ATM surcharge + # # @param card_id [String] The identifier of the Card that is being authorized. # # @param decision [Symbol, Increase::Models::RealTimeDecision::CardAuthorization::Decision, nil] Whether or not the authorization was approved. @@ -467,6 +477,351 @@ class CardAuthorization < Increase::Internal::Type::BaseModel # # @param verification [Increase::Models::RealTimeDecision::CardAuthorization::Verification] Fields related to verification of cardholder-provided values. + # @see Increase::Models::RealTimeDecision::CardAuthorization#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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic, nil] + required :clinic, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic }, + nil?: true + + # @!attribute dental + # The part of this transaction amount that was for dental-related services. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental, nil] + required :dental, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental }, + nil?: true + + # @!attribute prescription + # The part of this transaction amount that was for healthcare prescriptions. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription, nil] + required :prescription, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription }, + nil?: true + + # @!attribute surcharge + # The surcharge amount charged for this transaction by the merchant. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge, nil] + required :surcharge, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge }, + nil?: true + + # @!attribute total_cumulative + # The total amount of a series of incremental authorizations, optionally provided. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative, nil] + required :total_cumulative, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative }, + nil?: true + + # @!attribute total_healthcare + # The total amount of healthcare-related additional amounts. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare, nil] + required :total_healthcare, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare }, + nil?: true + + # @!attribute transit + # The part of this transaction amount that was for transit-related services. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit, nil] + required :transit, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit }, + nil?: true + + # @!attribute unknown + # An unknown additional amount. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown, nil] + required :unknown, + -> { Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown }, + nil?: true + + # @!attribute vision + # The part of this transaction amount that was for vision-related services. + # + # @return [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision, nil] + required :vision, + -> { Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic, nil] The part of this transaction amount that was for clinic-related services. + # + # @param dental [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental, nil] The part of this transaction amount that was for dental-related services. + # + # @param prescription [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription, nil] The part of this transaction amount that was for healthcare prescriptions. + # + # @param surcharge [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge, nil] The surcharge amount charged for this transaction by the merchant. + # + # @param total_cumulative [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative, nil] The total amount of a series of incremental authorizations, optionally provided. + # + # @param total_healthcare [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare, nil] The total amount of healthcare-related additional amounts. + # + # @param transit [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit, nil] The part of this transaction amount that was for transit-related services. + # + # @param unknown [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown, nil] An unknown additional amount. + # + # @param vision [Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision, nil] The part of this transaction amount that was for vision-related services. + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#clinic + class Clinic < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#dental + class Dental < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#prescription + class Prescription < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#surcharge + class Surcharge < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#total_cumulative + class TotalCumulative < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#total_healthcare + class TotalHealthcare < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#transit + class Transit < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#unknown + class Unknown < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown} + # for more details. + # + # An unknown additional amount. + # + # @param amount [Integer] The amount in minor units of the `currency` field. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + + # @see Increase::Models::RealTimeDecision::CardAuthorization::AdditionalAmounts#vision + class Vision < Increase::Internal::Type::BaseModel + # @!attribute amount + # The amount in minor units of the `currency` field. + # + # @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::RealTimeDecision::CardAuthorization::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. + # + # @param currency [String] The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional a + end + end + # Whether or not the authorization was approved. # # @see Increase::Models::RealTimeDecision::CardAuthorization#decision diff --git a/lib/increase/version.rb b/lib/increase/version.rb index f5ae542e1..9fcc3ef09 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.19.0" + VERSION = "1.20.0" end diff --git a/rbi/increase/models/card_payment.rbi b/rbi/increase/models/card_payment.rbi index 8ab1b4e4e..ac0e20513 100644 --- a/rbi/increase/models/card_payment.rbi +++ b/rbi/increase/models/card_payment.rbi @@ -1192,6 +1192,24 @@ module Increase 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::CardPayment::Element::CardAuthorization::AdditionalAmounts + ) + end + attr_reader :additional_amounts + + sig do + params( + additional_amounts: + Increase::CardPayment::Element::CardAuthorization::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) } @@ -1368,6 +1386,8 @@ module Increase id: String, actioner: Increase::CardPayment::Element::CardAuthorization::Actioner::OrSymbol, + additional_amounts: + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::OrHash, amount: Integer, card_payment_id: String, currency: @@ -1408,6 +1428,10 @@ module Increase # Whether this authorization 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:, @@ -1482,6 +1506,8 @@ module Increase id: String, actioner: Increase::CardPayment::Element::CardAuthorization::Actioner::TaggedSymbol, + additional_amounts: + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: @@ -1566,176 +1592,298 @@ module Increase 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 = + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardAuthorization::Currency + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic + ) ) + end + attr_reader :clinic - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol - ) + sig do + params( + clinic: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic::OrHash + ) + ).void + end + attr_writer :clinic - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol + # The part of this transaction amount that was for dental-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental + ) ) + end + attr_reader :dental - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol - ) + sig do + params( + dental: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental::OrHash + ) + ).void + end + attr_writer :dental - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol + # The part of this transaction amount that was for healthcare prescriptions. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription + ) ) + end + attr_reader :prescription - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol - ) + sig do + params( + prescription: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription + # The surcharge amount charged for this transaction by the merchant. sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol - ] + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge + ) ) end - def self.values - end - end + attr_reader :surcharge - # 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 + sig do + params( + surcharge: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge::OrHash + ) + ).void + end + attr_writer :surcharge - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardAuthorization::Direction + # The total amount of a series of incremental authorizations, optionally provided. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative ) - 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::CardPayment::Element::CardAuthorization::Direction::TaggedSymbol ) + end + attr_reader :total_cumulative - # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. - REFUND = - T.let( - :refund, - Increase::CardPayment::Element::CardAuthorization::Direction::TaggedSymbol - ) + sig do + params( + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative + # The total amount of healthcare-related additional amounts. sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorization::Direction::TaggedSymbol - ] + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare + ) ) end - def self.values + attr_reader :total_healthcare + + sig do + params( + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare::OrHash + ) + ).void end - end + attr_writer :total_healthcare - class NetworkDetails < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails, - Increase::Internal::AnyHash + # The part of this transaction amount that was for transit-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit ) - end + ) + end + attr_reader :transit - # The payment network used to process this card authorization. + sig do + params( + transit: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit + + # An unknown additional amount. sig do returns( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown + ) ) end - attr_accessor :category + attr_reader :unknown - # Fields specific to the `visa` network. + sig do + params( + unknown: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision ) ) end - attr_reader :visa + attr_reader :vision sig do params( - visa: + vision: T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::OrHash + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision::OrHash ) ).void end - attr_writer :visa + attr_writer :vision - # Fields specific to the `network`. + # 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( - category: - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::OrSymbol, - visa: + clinic: T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::OrHash + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision::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: + # 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( { - category: - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol, - visa: + clinic: T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision ) } ) @@ -1743,526 +1891,409 @@ module Increase def to_hash end - # The payment network used to process this card authorization. - module Category - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class Clinic < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - # Visa - VISA = - T.let( - :visa, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + 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 - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol - ] + params(amount: Integer, currency: String).returns( + T.attached_class ) end - def self.values + def self.new( + # The amount in minor units of the `currency` field. + 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 Visa < Increase::Internal::Type::BaseModel + class Dental < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa, + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental, 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. + # The amount in minor units of the `currency` field. + 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 - returns( - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + params(amount: Integer, currency: String).returns( + T.attached_class ) end - attr_accessor :electronic_commerce_indicator + def self.new( + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # The method used to enter the cardholder's primary account number and card - # expiration date. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash end - attr_accessor :point_of_service_entry_mode + end - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + class Prescription < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash ) - ) - end - attr_accessor :stand_in_processing_reason + end - # Fields specific to the `visa` network. + # The amount in minor units of the `currency` field. + 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( - electronic_commerce_indicator: - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::OrSymbol - ), - point_of_service_entry_mode: - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::OrSymbol - ), - stand_in_processing_reason: - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::OrSymbol - ) - ).returns(T.attached_class) + params(amount: Integer, currency: String).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: + # The amount in minor units of the `currency` field. + 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::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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 - override.returns( - { - electronic_commerce_indicator: - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ), - point_of_service_entry_mode: - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ), - stand_in_processing_reason: - T.nilable( - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) - } + params(amount: Integer, currency: String).returns( + T.attached_class ) end + def self.new( + # The amount in minor units of the `currency` field. + 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 - # 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 + class TotalCumulative < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # Recurring transaction: Payment indicator used to indicate a recurring transaction that originates from an acquirer in the US region. - RECURRING = - T.let( - :recurring, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + class TotalHealthcare < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash ) + end - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. - NON_SECURE_TRANSACTION = - T.let( - :non_secure_transaction, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ] + class Transit < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit, + Increase::Internal::AnyHash ) 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 + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # Unknown - UNKNOWN = - T.let( - :unknown, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # Manual key entry - MANUAL = - T.let( - :manual, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + 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::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash ) + end - # Magnetic stripe read, without card verification value - MAGNETIC_STRIPE_NO_CVV = - T.let( - :magnetic_stripe_no_cvv, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - - # Optical code - OPTICAL_CODE = - T.let( - :optical_code, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - - # Contact chip card - INTEGRATED_CIRCUIT_CARD = - T.let( - :integrated_circuit_card, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - - # Contactless read of chip card - CONTACTLESS = - T.let( - :contactless, - Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - - # Magnetic stripe read - MAGNETIC_STRIPE = - T.let( - :magnetic_stripe, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Contactless read of magnetic stripe data - CONTACTLESS_MAGNETIC_STRIPE = - T.let( - :contactless_magnetic_stripe, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - - # Contact chip card, without card verification value - INTEGRATED_CIRCUIT_CARD_NO_CVV = - T.let( - :integrated_circuit_card_no_cvv, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ] - ) - end - def self.values - end + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) 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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + class Vision < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision, + Increase::Internal::AnyHash ) + end - # An unspecific reason for stand-in processing. - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - class NetworkIdentifiers < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardAuthorization::NetworkIdentifiers, - Increase::Internal::AnyHash + # The part of this transaction amount that was for vision-related services. + sig do + params(amount: Integer, currency: String).returns( + T.attached_class ) 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) - } + def self.new( + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) - end - def to_hash + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end end end - # The processing category describes the intent behind the authorization, such as - # whether it was used for bill payments or an automatic fuel dispenser. - module ProcessingCategory + # 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::CardPayment::Element::CardAuthorization::ProcessingCategory + Increase::CardPayment::Element::CardAuthorization::Currency ) 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 = + # Canadian Dollar (CAD) + CAD = T.let( - :account_funding, - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + :CAD, + Increase::CardPayment::Element::CardAuthorization::Currency::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 = + # Swiss Franc (CHF) + CHF = T.let( - :automatic_fuel_dispenser, - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + :CHF, + Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol ) - # A transaction used to pay a bill. - BILL_PAYMENT = + # Euro (EUR) + EUR = T.let( - :bill_payment, - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + :EUR, + Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol ) - # Original credit transactions are used to send money to a cardholder. - ORIGINAL_CREDIT = + # British Pound (GBP) + GBP = T.let( - :original_credit, - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + :GBP, + Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol ) - # A regular purchase. - PURCHASE = + # Japanese Yen (JPY) + JPY = T.let( - :purchase, - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + :JPY, + Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol ) - # Quasi-cash transactions represent purchases of items which may be convertible to cash. - QUASI_CASH = - T.let( - :quasi_cash, - Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol - ) - - # The processing category is unknown. - UNKNOWN = + # US Dollar (USD) + USD = T.let( - :unknown, - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + :USD, + Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + Increase::CardPayment::Element::CardAuthorization::Currency::TaggedSymbol ] ) end @@ -2270,30 +2301,38 @@ module Increase end end - # A constant representing the object's type. For this resource it will always be - # `card_authorization`. - module Type + # 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::CardPayment::Element::CardAuthorization::Type + Increase::CardPayment::Element::CardAuthorization::Direction ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - CARD_AUTHORIZATION = + # A regular card authorization where funds are debited from the cardholder. + SETTLEMENT = T.let( - :card_authorization, - Increase::CardPayment::Element::CardAuthorization::Type::TaggedSymbol + :settlement, + Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::Direction::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardAuthorization::Type::TaggedSymbol + Increase::CardPayment::Element::CardAuthorization::Direction::TaggedSymbol ] ) end @@ -2301,476 +2340,597 @@ module Increase end end - class Verification < Increase::Internal::Type::BaseModel + class NetworkDetails < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardAuthorization::Verification, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails, Increase::Internal::AnyHash ) end - # Fields related to verification of the Card Verification Code, a 3-digit code on - # the back of the card. + # The payment network used to process this card authorization. sig do returns( - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol ) end - attr_reader :card_verification_code - - sig do - params( - card_verification_code: - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::OrHash - ).void - end - attr_writer :card_verification_code + attr_accessor :category - # Cardholder address provided in the authorization request and the address on file - # we verified it against. + # Fields specific to the `visa` network. sig do returns( - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa + ) ) end - attr_reader :cardholder_address + attr_reader :visa sig do params( - cardholder_address: - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::OrHash + visa: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::OrHash + ) ).void end - attr_writer :cardholder_address + attr_writer :visa - # Fields related to verification of cardholder-provided values. + # Fields specific to the `network`. sig do params( - card_verification_code: - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::OrHash, - cardholder_address: - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::OrHash + category: + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::OrSymbol, + visa: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::OrHash + ) ).returns(T.attached_class) end def self.new( - # 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: + # The payment network used to process this card authorization. + category:, + # Fields specific to the `visa` network. + visa: ) end sig do override.returns( { - card_verification_code: - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode, - cardholder_address: - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress + category: + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol, + visa: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa + ) } ) end def to_hash end - class CardVerificationCode < Increase::Internal::Type::BaseModel + # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa + VISA = + T.let( + :visa, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Visa < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa, Increase::Internal::AnyHash ) end - # The result of verifying the Card Verification Code. + # 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( - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) ) end - attr_accessor :result + attr_accessor :electronic_commerce_indicator - # Fields related to verification of the Card Verification Code, a 3-digit code on - # the back of the card. + # The method used to enter the cardholder's primary account number and card + # expiration date. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + ) + end + attr_accessor :stand_in_processing_reason + + # Fields specific to the `visa` network. sig do params( - result: - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::OrSymbol + electronic_commerce_indicator: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::OrSymbol + ), + point_of_service_entry_mode: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::OrSymbol + ), + stand_in_processing_reason: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::OrSymbol + ) ).returns(T.attached_class) end def self.new( - # The result of verifying the Card Verification Code. - result: + # 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( { - result: - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + electronic_commerce_indicator: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ), + point_of_service_entry_mode: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ), + stand_in_processing_reason: + T.nilable( + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) } ) end def to_hash end - # The result of verifying the Card Verification Code. - module Result + # 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::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No card verification code was provided in the authorization request. - NOT_CHECKED = + # 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( - :not_checked, - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + :mail_phone_order, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol ) - # The card verification code matched the one on file. - MATCH = + # Recurring transaction: Payment indicator used to indicate a recurring transaction that originates from an acquirer in the US region. + RECURRING = T.let( - :match, - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol - ) + :recurring, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # The card verification code did not match the one on file. - NO_MATCH = + # 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( - :no_match, - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + :installment, + Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol ] ) end def self.values end end - end - - class CardholderAddress < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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( - { - actual_line1: T.nilable(String), - actual_postal_code: T.nilable(String), - provided_line1: T.nilable(String), - provided_postal_code: T.nilable(String), - result: - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol - } - ) - end - def to_hash - end - # The address verification result returned to the card network. - module Result + # 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::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No address was provided in the authorization request. - NOT_CHECKED = + # Unknown + UNKNOWN = T.let( - :not_checked, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + :unknown, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ) - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + # Manual key entry + MANUAL = T.let( - :postal_code_match_address_not_checked, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + :manual, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ) - # Postal code matches, but the street address does not match. - POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = + # Magnetic stripe read, without card verification value + MAGNETIC_STRIPE_NO_CVV = T.let( - :postal_code_match_address_no_match, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + :magnetic_stripe_no_cvv, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ) - # Postal code does not match, but the street address matches. - POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = + # Optical code + OPTICAL_CODE = T.let( - :postal_code_no_match_address_match, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + :optical_code, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ) - # Postal code and street address match. - MATCH = + # Contact chip card + INTEGRATED_CIRCUIT_CARD = T.let( - :match, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + :integrated_circuit_card, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ) - # Postal code and street address do not match. - NO_MATCH = + # Contactless read of chip card + CONTACTLESS = T.let( - :no_match, - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + :contactless, + Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Magnetic stripe read + MAGNETIC_STRIPE = + T.let( + :magnetic_stripe, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Contactless read of magnetic stripe data + CONTACTLESS_MAGNETIC_STRIPE = + T.let( + :contactless_magnetic_stripe, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + + # Contact chip card, without card verification value + INTEGRATED_CIRCUIT_CARD_NO_CVV = + T.let( + :integrated_circuit_card_no_cvv, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol ] ) end def self.values end end - end - end - end - - class CardAuthorizationExpiration < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardAuthorizationExpiration, - Increase::Internal::AnyHash - ) - end - # The Card Authorization Expiration identifier. - sig { returns(String) } - attr_accessor :id + # 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 - # The identifier for the Card Authorization this reverses. - sig { returns(String) } - attr_accessor :card_authorization_id + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # currency. - sig do - returns( - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR = + T.let( + :issuer_error, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) - # The amount of this authorization expiration in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :expired_amount + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = + T.let( + :invalid_physical_card, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) - # The card network used to process this card authorization. - sig do - returns( - Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol - ) - end - attr_accessor :network + # The 3DS cardholder authentication verification value was invalid. + INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE = + T.let( + :invalid_cardholder_authentication_verification_value, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) - # A constant representing the object's type. For this resource it will always be - # `card_authorization_expiration`. - sig do - returns( - Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol - ) - end - attr_accessor :type + # 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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) - # A Card Authorization Expiration object. This field will be present in the JSON - # response if and only if `category` is equal to `card_authorization_expiration`. - # Card Authorization Expirations are cancellations of authorizations that were - # never settled by the acquirer. - sig do - params( - id: String, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::OrSymbol, - expired_amount: Integer, - network: - Increase::CardPayment::Element::CardAuthorizationExpiration::Network::OrSymbol, - type: - Increase::CardPayment::Element::CardAuthorizationExpiration::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The Card Authorization Expiration identifier. - id:, - # The identifier for the Card Authorization this reverses. - card_authorization_id:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # currency. - currency:, - # The amount of this authorization expiration in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - expired_amount:, - # The card network used to process this card authorization. - network:, - # A constant representing the object's type. For this resource it will always be - # `card_authorization_expiration`. - type: - ) + # 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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # An unspecific reason for stand-in processing. + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardAuthorization::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ] + ) + end + def self.values + end + end + end end - sig do - override.returns( - { - id: String, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol, - expired_amount: Integer, - network: - Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol, - type: - Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol - } + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::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 - def to_hash + 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 [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # currency. - module Currency + # The processing category describes the intent behind the authorization, 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::CardPayment::Element::CardAuthorizationExpiration::Currency + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # Canadian Dollar (CAD) - CAD = + # Account funding transactions are transactions used to e.g., fund an account or transfer funds between accounts. + ACCOUNT_FUNDING = T.let( - :CAD, - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + :account_funding, + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ) - # Swiss Franc (CHF) - CHF = + # 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( - :CHF, - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + :automatic_fuel_dispenser, + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ) - # Euro (EUR) - EUR = + # A transaction used to pay a bill. + BILL_PAYMENT = T.let( - :EUR, - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + :bill_payment, + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ) - # British Pound (GBP) - GBP = + # Original credit transactions are used to send money to a cardholder. + ORIGINAL_CREDIT = T.let( - :GBP, - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + :original_credit, + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ) - # Japanese Yen (JPY) - JPY = + # A regular purchase. + PURCHASE = T.let( - :JPY, - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + :purchase, + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ) - # US Dollar (USD) - USD = + # Quasi-cash transactions represent purchases of items which may be convertible to cash. + QUASI_CASH = T.let( - :USD, - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + :quasi_cash, + Increase::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::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::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol + ) + + # The processing category is unknown. + UNKNOWN = + T.let( + :unknown, + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorization::ProcessingCategory::TaggedSymbol ] ) end @@ -2778,30 +2938,30 @@ module Increase end end - # The card network used to process this card authorization. - module Network - extend Increase::Internal::Type::Enum - + # A constant representing the object's type. For this resource it will always be + # `card_authorization`. + module Type + extend Increase::Internal::Type::Enum + TaggedSymbol = T.type_alias do T.all( Symbol, - Increase::CardPayment::Element::CardAuthorizationExpiration::Network + Increase::CardPayment::Element::CardAuthorization::Type ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # Visa - VISA = + CARD_AUTHORIZATION = T.let( - :visa, - Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol + :card_authorization, + Increase::CardPayment::Element::CardAuthorization::Type::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol + Increase::CardPayment::Element::CardAuthorization::Type::TaggedSymbol ] ) end @@ -2809,342 +2969,395 @@ module Increase end end - # A constant representing the object's type. For this resource it will always be - # `card_authorization_expiration`. - module Type - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class Verification < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardAuthorizationExpiration::Type + T.any( + Increase::CardPayment::Element::CardAuthorization::Verification, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CARD_AUTHORIZATION_EXPIRATION = - T.let( - :card_authorization_expiration, - Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol - ) + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol - ] + returns( + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode ) end - def self.values + attr_reader :card_verification_code + + sig do + params( + card_verification_code: + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::OrHash + ).void end - end - end + attr_writer :card_verification_code - class CardDecline < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardDecline, - Increase::Internal::AnyHash + # Cardholder address provided in the authorization request and the address on file + # we verified it against. + sig do + returns( + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress ) end + attr_reader :cardholder_address - # The Card Decline identifier. - sig { returns(String) } - attr_accessor :id + sig do + params( + cardholder_address: + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::OrHash + ).void + end + attr_writer :cardholder_address - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - sig do - returns( - Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol + # Fields related to verification of cardholder-provided values. + sig do + params( + card_verification_code: + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::OrHash, + cardholder_address: + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::OrHash + ).returns(T.attached_class) + end + def self.new( + # 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 - attr_accessor :actioner - - # The declined amount in the minor unit of the destination account currency. For - # dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :amount + end - # The ID of the Card Payment this transaction belongs to. - sig { returns(String) } - attr_accessor :card_payment_id + sig do + override.returns( + { + card_verification_code: + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode, + cardholder_address: + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress + } + ) + end + def to_hash + end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - # account currency. - sig do - returns( - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol - ) - end - attr_accessor :currency + class CardVerificationCode < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode, + Increase::Internal::AnyHash + ) + end - # The identifier of the declined transaction created for this Card Decline. - sig { returns(String) } - attr_accessor :declined_transaction_id + # The result of verifying the Card Verification Code. + sig do + returns( + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + ) + end + attr_accessor :result - # 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 + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. + sig do + params( + result: + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The result of verifying the Card Verification Code. + result: + ) + end - # 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::CardPayment::Element::CardDecline::Direction::TaggedSymbol - ) - end - attr_accessor :direction + sig do + override.returns( + { + result: + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + } + ) + end + def to_hash + end - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - sig { returns(String) } - attr_accessor :merchant_acceptor_id + # The result of verifying the Card Verification Code. + module Result + extend Increase::Internal::Type::Enum - # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - # card is transacting with. - sig { returns(String) } - attr_accessor :merchant_category_code + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The city the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_city + # No card verification code was provided in the authorization request. + NOT_CHECKED = + T.let( + :not_checked, + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # The country the merchant resides in. - sig { returns(String) } - attr_accessor :merchant_country + # The card verification code matched the one on file. + MATCH = + T.let( + :match, + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # The merchant descriptor of the merchant the card is transacting with. - sig { returns(String) } - attr_accessor :merchant_descriptor + # The card verification code did not match the one on file. + NO_MATCH = + T.let( + :no_match, + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # 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 + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardAuthorization::Verification::CardVerificationCode::Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # The state the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_state + class CardholderAddress < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress, + Increase::Internal::AnyHash + ) + end - # Fields specific to the `network`. - sig do - returns(Increase::CardPayment::Element::CardDecline::NetworkDetails) - end - attr_reader :network_details + # Line 1 of the address on file for the cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :actual_line1 - sig do - params( - network_details: - Increase::CardPayment::Element::CardDecline::NetworkDetails::OrHash - ).void - end - attr_writer :network_details + # The postal code of the address on file for the cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :actual_postal_code - # Network-specific identifiers for a specific request or transaction. - sig do - returns( - Increase::CardPayment::Element::CardDecline::NetworkIdentifiers - ) - end - attr_reader :network_identifiers + # The cardholder address line 1 provided for verification in the authorization + # request. + sig { returns(T.nilable(String)) } + attr_accessor :provided_line1 - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardDecline::NetworkIdentifiers::OrHash - ).void - end - attr_writer :network_identifiers + # The postal code provided for verification in the authorization request. + sig { returns(T.nilable(String)) } + attr_accessor :provided_postal_code - # 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 + # The address verification result returned to the card network. + sig do + returns( + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + end + attr_accessor :result - # 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 + # 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::CardPayment::Element::CardAuthorization::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 - # The declined amount in the minor unit of the transaction's presentment currency. - sig { returns(Integer) } - attr_accessor :presentment_amount + sig do + override.returns( + { + actual_line1: T.nilable(String), + actual_postal_code: T.nilable(String), + provided_line1: T.nilable(String), + provided_postal_code: T.nilable(String), + result: + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + } + ) + end + def to_hash + end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's presentment currency. + # The address verification result returned to the card network. + module Result + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # No address was provided in the authorization request. + NOT_CHECKED = + T.let( + :not_checked, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code matches, but the street address was not verified. + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code matches, but the street address does not match. + POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = + T.let( + :postal_code_match_address_no_match, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code does not match, but the street address matches. + POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = + T.let( + :postal_code_no_match_address_match, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code and street address match. + MATCH = + T.let( + :match, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + + # Postal code and street address do not match. + NO_MATCH = + T.let( + :no_match, + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardAuthorization::Verification::CardholderAddress::Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + + class CardAuthorizationExpiration < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardAuthorizationExpiration, + Increase::Internal::AnyHash + ) + end + + # The Card Authorization Expiration identifier. sig { returns(String) } - attr_accessor :presentment_currency + attr_accessor :id - # The processing category describes the intent behind the authorization, such as - # whether it was used for bill payments or an automatic fuel dispenser. + # The identifier for the Card Authorization this reverses. + sig { returns(String) } + attr_accessor :card_authorization_id + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # currency. sig do returns( - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) end - attr_accessor :processing_category + attr_accessor :currency - # 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 amount of this authorization expiration in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :expired_amount - # This is present if a specific decline reason was given in the real-time - # decision. + # The card network used to process this card authorization. sig do returns( - T.nilable( - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol - ) + Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol ) end - attr_accessor :real_time_decision_reason + attr_accessor :network - # Why the transaction was declined. + # A constant representing the object's type. For this resource it will always be + # `card_authorization_expiration`. sig do returns( - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol ) end - attr_accessor :reason - - # The terminal identifier (commonly abbreviated as TID) of the terminal the card - # is transacting with. - sig { returns(T.nilable(String)) } - attr_accessor :terminal_id - - # Fields related to verification of cardholder-provided values. - sig do - returns(Increase::CardPayment::Element::CardDecline::Verification) - end - attr_reader :verification - - sig do - params( - verification: - Increase::CardPayment::Element::CardDecline::Verification::OrHash - ).void - end - attr_writer :verification + attr_accessor :type - # A Card Decline object. This field will be present in the JSON response if and - # only if `category` is equal to `card_decline`. + # A Card Authorization Expiration object. This field will be present in the JSON + # response if and only if `category` is equal to `card_authorization_expiration`. + # Card Authorization Expirations are cancellations of authorizations that were + # never settled by the acquirer. sig do params( id: String, - actioner: - Increase::CardPayment::Element::CardDecline::Actioner::OrSymbol, - amount: Integer, - card_payment_id: String, + card_authorization_id: String, currency: - Increase::CardPayment::Element::CardDecline::Currency::OrSymbol, - declined_transaction_id: String, - digital_wallet_token_id: T.nilable(String), - direction: - Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::NetworkDetails::OrHash, - network_identifiers: - Increase::CardPayment::Element::CardDecline::NetworkIdentifiers::OrHash, - network_risk_score: T.nilable(Integer), - physical_card_id: T.nilable(String), - presentment_amount: Integer, - presentment_currency: String, - processing_category: - Increase::CardPayment::Element::CardDecline::ProcessingCategory::OrSymbol, - real_time_decision_id: T.nilable(String), - real_time_decision_reason: - T.nilable( - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::OrSymbol - ), - reason: - Increase::CardPayment::Element::CardDecline::Reason::OrSymbol, - terminal_id: T.nilable(String), - verification: - Increase::CardPayment::Element::CardDecline::Verification::OrHash + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::OrSymbol, + expired_amount: Integer, + network: + Increase::CardPayment::Element::CardAuthorizationExpiration::Network::OrSymbol, + type: + Increase::CardPayment::Element::CardAuthorizationExpiration::Type::OrSymbol ).returns(T.attached_class) end def self.new( - # The Card Decline identifier. + # The Card Authorization Expiration identifier. id:, - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - actioner:, - # The declined amount in the minor unit of the destination account 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 destination - # account currency. + # The identifier for the Card Authorization this reverses. + card_authorization_id:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # currency. currency:, - # The identifier of the declined transaction created for this Card Decline. - declined_transaction_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. - 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 declined 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 authorization, 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:, - # This is present if a specific decline reason was given in the real-time - # decision. - real_time_decision_reason:, - # Why the transaction was declined. - reason:, - # The terminal identifier (commonly abbreviated as TID) of the terminal the card - # is transacting with. - terminal_id:, - # Fields related to verification of cardholder-provided values. - verification: + # The amount of this authorization expiration in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + expired_amount:, + # The card network used to process this card authorization. + network:, + # A constant representing the object's type. For this resource it will always be + # `card_authorization_expiration`. + type: ) end @@ -3152,97 +3365,22 @@ module Increase override.returns( { id: String, - actioner: - Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol, - amount: Integer, - card_payment_id: String, + card_authorization_id: String, currency: - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol, - declined_transaction_id: String, - digital_wallet_token_id: T.nilable(String), - direction: - Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::NetworkDetails, - network_identifiers: - Increase::CardPayment::Element::CardDecline::NetworkIdentifiers, - network_risk_score: T.nilable(Integer), - physical_card_id: T.nilable(String), - presentment_amount: Integer, - presentment_currency: String, - processing_category: - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol, - real_time_decision_id: T.nilable(String), - real_time_decision_reason: - T.nilable( - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol - ), - reason: - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol, - terminal_id: T.nilable(String), - verification: - Increase::CardPayment::Element::CardDecline::Verification + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol, + expired_amount: Integer, + network: + Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol, + type: + Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol } ) end def to_hash end - # Whether this authorization 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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::Actioner::TaggedSymbol - ) - - # This object was actioned by Increase without user intervention. - INCREASE = - T.let( - :increase, - Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol - ) - - # This object was actioned by the network, through stand-in processing. - NETWORK = - T.let( - :network, - Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol - ] - ) - end - def self.values - end - end - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - # account currency. + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # currency. module Currency extend Increase::Internal::Type::Enum @@ -3250,7 +3388,7 @@ module Increase T.type_alias do T.all( Symbol, - Increase::CardPayment::Element::CardDecline::Currency + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -3259,48 +3397,48 @@ module Increase CAD = T.let( :CAD, - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) # Swiss Franc (CHF) CHF = T.let( :CHF, - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) # Euro (EUR) EUR = T.let( :EUR, - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) # British Pound (GBP) GBP = T.let( :GBP, - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) # Japanese Yen (JPY) JPY = T.let( :JPY, - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) # US Dollar (USD) USD = T.let( :USD, - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Currency::TaggedSymbol ] ) end @@ -3308,38 +3446,30 @@ module Increase 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 + # The card network used to process this card authorization. + module Network extend Increase::Internal::Type::Enum TaggedSymbol = T.type_alias do T.all( Symbol, - Increase::CardPayment::Element::CardDecline::Direction + Increase::CardPayment::Element::CardAuthorizationExpiration::Network ) 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::CardPayment::Element::CardDecline::Direction::TaggedSymbol - ) - - # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. - REFUND = + # Visa + VISA = T.let( - :refund, - Increase::CardPayment::Element::CardDecline::Direction::TaggedSymbol + :visa, + Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardDecline::Direction::TaggedSymbol + Increase::CardPayment::Element::CardAuthorizationExpiration::Network::TaggedSymbol ] ) end @@ -3347,1337 +3477,1166 @@ module Increase end end - class NetworkDetails < Increase::Internal::Type::BaseModel - OrHash = + # A constant representing the object's type. For this resource it will always be + # `card_authorization_expiration`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = T.type_alias do - T.any( - Increase::CardPayment::Element::CardDecline::NetworkDetails, - Increase::Internal::AnyHash + T.all( + Symbol, + Increase::CardPayment::Element::CardAuthorizationExpiration::Type ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The payment network used to process this card authorization. - sig do - returns( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol + CARD_AUTHORIZATION_EXPIRATION = + T.let( + :card_authorization_expiration, + Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol ) - end - attr_accessor :category - # Fields specific to the `visa` network. sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa - ) + override.returns( + T::Array[ + Increase::CardPayment::Element::CardAuthorizationExpiration::Type::TaggedSymbol + ] ) end - attr_reader :visa - - sig do - params( - visa: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::OrHash - ) - ).void - end - attr_writer :visa - - # Fields specific to the `network`. - sig do - params( - category: - Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::OrSymbol, - visa: - T.nilable( - Increase::CardPayment::Element::CardDecline::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: - ) + def self.values end + end + end - sig do - override.returns( - { - category: - Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol, - visa: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa - ) - } + class CardDecline < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline, + Increase::Internal::AnyHash ) end - def to_hash - end - # The payment network used to process this card authorization. - module Category - extend Increase::Internal::Type::Enum + # The Card Decline identifier. + sig { returns(String) } + attr_accessor :id - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Category - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Whether this authorization was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + sig do + returns( + Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol + ) + end + attr_accessor :actioner - # Visa - VISA = - T.let( - :visa, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol - ) + # 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::CardPayment::Element::CardDecline::AdditionalAmounts + ) + end + attr_reader :additional_amounts - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol - ] - ) - end - def self.values - end - end + sig do + params( + additional_amounts: + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::OrHash + ).void + end + attr_writer :additional_amounts - class Visa < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa, - Increase::Internal::AnyHash - ) - end + # The declined amount in the minor unit of the destination account currency. For + # dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :amount - # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) - ) - end - attr_accessor :electronic_commerce_indicator + # The ID of the Card Payment this transaction belongs to. + sig { returns(String) } + attr_accessor :card_payment_id - # The method used to enter the cardholder's primary account number and card - # expiration date. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) - ) - end - attr_accessor :point_of_service_entry_mode + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination + # account currency. + sig do + returns( + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol + ) + end + attr_accessor :currency - # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) - ) - end - attr_accessor :stand_in_processing_reason + # The identifier of the declined transaction created for this Card Decline. + sig { returns(String) } + attr_accessor :declined_transaction_id - # Fields specific to the `visa` network. - sig do - params( - electronic_commerce_indicator: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::OrSymbol - ), - point_of_service_entry_mode: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::OrSymbol - ), - stand_in_processing_reason: - T.nilable( - Increase::CardPayment::Element::CardDecline::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 + # 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 - sig do - override.returns( - { - electronic_commerce_indicator: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ), - point_of_service_entry_mode: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ), - stand_in_processing_reason: - T.nilable( - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) - } - ) - end - def to_hash - end + # 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::CardPayment::Element::CardDecline::Direction::TaggedSymbol + ) + end + attr_accessor :direction - # 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 + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + sig { returns(String) } + attr_accessor :merchant_acceptor_id - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + sig { returns(String) } + attr_accessor :merchant_category_code - # 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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # The city the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_city - # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # The country the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_country - # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # The merchant descriptor of the merchant the card is transacting with. + sig { returns(String) } + attr_accessor :merchant_descriptor - # Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. - NON_SECURE_TRANSACTION = - T.let( - :non_secure_transaction, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ) + # 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 - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol - ] - ) - end - def self.values - end - end + # The state the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_state - # The method used to enter the cardholder's primary account number and card - # expiration date. - module PointOfServiceEntryMode - extend Increase::Internal::Type::Enum + # Fields specific to the `network`. + sig do + returns(Increase::CardPayment::Element::CardDecline::NetworkDetails) + end + attr_reader :network_details - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + sig do + params( + network_details: + Increase::CardPayment::Element::CardDecline::NetworkDetails::OrHash + ).void + end + attr_writer :network_details - # Unknown - UNKNOWN = - T.let( - :unknown, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # Network-specific identifiers for a specific request or transaction. + sig do + returns( + Increase::CardPayment::Element::CardDecline::NetworkIdentifiers + ) + end + attr_reader :network_identifiers - # Manual key entry - MANUAL = - T.let( - :manual, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardDecline::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers - # Magnetic stripe read, without card verification value - MAGNETIC_STRIPE_NO_CVV = - T.let( - :magnetic_stripe_no_cvv, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # 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 - # Optical code - OPTICAL_CODE = - T.let( - :optical_code, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # 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 - # Contact chip card - INTEGRATED_CIRCUIT_CARD = - T.let( - :integrated_circuit_card, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # The declined amount in the minor unit of the transaction's presentment currency. + sig { returns(Integer) } + attr_accessor :presentment_amount - # Contactless read of chip card - CONTACTLESS = - T.let( - :contactless, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + sig { returns(String) } + attr_accessor :presentment_currency - # Transaction initiated using a credential that has previously been stored on file - CREDENTIAL_ON_FILE = - T.let( - :credential_on_file, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # The processing category describes the intent behind the authorization, such as + # whether it was used for bill payments or an automatic fuel dispenser. + sig do + returns( + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) + end + attr_accessor :processing_category - # Magnetic stripe read - MAGNETIC_STRIPE = - T.let( - :magnetic_stripe, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # 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 - # Contactless read of magnetic stripe data - CONTACTLESS_MAGNETIC_STRIPE = - T.let( - :contactless_magnetic_stripe, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # This is present if a specific decline reason was given in the real-time + # decision. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) + ) + end + attr_accessor :real_time_decision_reason - # Contact chip card, without card verification value - INTEGRATED_CIRCUIT_CARD_NO_CVV = - T.let( - :integrated_circuit_card_no_cvv, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ) + # Why the transaction was declined. + sig do + returns( + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + end + attr_accessor :reason - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol - ] - ) - end - def self.values - end - end + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + sig { returns(T.nilable(String)) } + attr_accessor :terminal_id - # 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 + # Fields related to verification of cardholder-provided values. + sig do + returns(Increase::CardPayment::Element::CardDecline::Verification) + end + attr_reader :verification - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + sig do + params( + verification: + Increase::CardPayment::Element::CardDecline::Verification::OrHash + ).void + end + attr_writer :verification - # Increase failed to process the authorization in a timely manner. - ISSUER_ERROR = - T.let( - :issuer_error, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + # A Card Decline object. This field will be present in the JSON response if and + # only if `category` is equal to `card_decline`. + sig do + params( + id: String, + actioner: + Increase::CardPayment::Element::CardDecline::Actioner::OrSymbol, + additional_amounts: + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::OrHash, + amount: Integer, + card_payment_id: String, + currency: + Increase::CardPayment::Element::CardDecline::Currency::OrSymbol, + declined_transaction_id: String, + digital_wallet_token_id: T.nilable(String), + direction: + Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::NetworkDetails::OrHash, + network_identifiers: + Increase::CardPayment::Element::CardDecline::NetworkIdentifiers::OrHash, + network_risk_score: T.nilable(Integer), + physical_card_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + processing_category: + Increase::CardPayment::Element::CardDecline::ProcessingCategory::OrSymbol, + real_time_decision_id: T.nilable(String), + real_time_decision_reason: + T.nilable( + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::OrSymbol + ), + reason: + Increase::CardPayment::Element::CardDecline::Reason::OrSymbol, + terminal_id: T.nilable(String), + verification: + Increase::CardPayment::Element::CardDecline::Verification::OrHash + ).returns(T.attached_class) + end + def self.new( + # The Card Decline identifier. + id:, + # Whether this authorization 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 declined amount in the minor unit of the destination account 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 destination + # account currency. + currency:, + # The identifier of the declined transaction created for this Card Decline. + declined_transaction_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. + 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 declined 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 authorization, 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:, + # This is present if a specific decline reason was given in the real-time + # decision. + real_time_decision_reason:, + # Why the transaction was declined. + reason:, + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + terminal_id:, + # Fields related to verification of cardholder-provided values. + verification: + ) + end - # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. - INVALID_PHYSICAL_CARD = - T.let( - :invalid_physical_card, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + sig do + override.returns( + { + id: String, + actioner: + Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol, + additional_amounts: + Increase::CardPayment::Element::CardDecline::AdditionalAmounts, + amount: Integer, + card_payment_id: String, + currency: + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol, + declined_transaction_id: String, + digital_wallet_token_id: T.nilable(String), + direction: + Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::NetworkDetails, + network_identifiers: + Increase::CardPayment::Element::CardDecline::NetworkIdentifiers, + network_risk_score: T.nilable(Integer), + physical_card_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + processing_category: + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol, + real_time_decision_id: T.nilable(String), + real_time_decision_reason: + T.nilable( + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ), + reason: + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol, + terminal_id: T.nilable(String), + verification: + Increase::CardPayment::Element::CardDecline::Verification + } + ) + end + def to_hash + end - # The 3DS cardholder authentication verification value was invalid. - INVALID_CARDHOLDER_AUTHENTICATION_VERIFICATION_VALUE = - T.let( - :invalid_cardholder_authentication_verification_value, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + # Whether this authorization 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 - # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::Actioner + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + # This object was actioned by the user through a real-time decision. + USER = + T.let( + :user, + Increase::CardPayment::Element::CardDecline::Actioner::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::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + # This object was actioned by Increase without user intervention. + INCREASE = + T.let( + :increase, + Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol + ) - # An unspecific reason for stand-in processing. - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ) + # This object was actioned by the network, through stand-in processing. + NETWORK = + T.let( + :network, + Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol - ] - ) - end - def self.values - end - end + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::Actioner::TaggedSymbol + ] + ) + end + def self.values end end - class NetworkIdentifiers < Increase::Internal::Type::BaseModel + class AdditionalAmounts < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardDecline::NetworkIdentifiers, + Increase::CardPayment::Element::CardDecline::AdditionalAmounts, 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 + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic - # 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: - ) + clinic: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic::OrHash + ) + ).void end + attr_writer :clinic + # The part of this transaction amount that was for dental-related services. sig do - override.returns( - { - retrieval_reference_number: T.nilable(String), - trace_number: T.nilable(String), - transaction_id: T.nilable(String) - } + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental + ) ) end - def to_hash - end - end + attr_reader :dental - # The processing category describes the intent behind the authorization, such as - # whether it was used for bill payments or an automatic fuel dispenser. - module ProcessingCategory - extend Increase::Internal::Type::Enum + sig do + params( + dental: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental::OrHash + ) + ).void + end + attr_writer :dental - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::ProcessingCategory + # The part of this transaction amount that was for healthcare prescriptions. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription ) - 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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ) - - # A transaction used to pay a bill. - BILL_PAYMENT = - T.let( - :bill_payment, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ) - - # Original credit transactions are used to send money to a cardholder. - ORIGINAL_CREDIT = - T.let( - :original_credit, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ) - - # A regular purchase. - PURCHASE = - T.let( - :purchase, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ) - - # Quasi-cash transactions represent purchases of items which may be convertible to cash. - QUASI_CASH = - T.let( - :quasi_cash, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol ) + end + attr_reader :prescription - # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. - REFUND = - T.let( - :refund, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ) + sig do + params( + prescription: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription - # Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. - CASH_DISBURSEMENT = - T.let( - :cash_disbursement, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge + ) ) + end + attr_reader :surcharge - # The processing category is unknown. - UNKNOWN = - T.let( - :unknown, - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ) + sig do + params( + surcharge: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge::OrHash + ) + ).void + end + attr_writer :surcharge + # The total amount of a series of incremental authorizations, optionally provided. sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol - ] + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative + ) ) end - def self.values - end - end + attr_reader :total_cumulative - # This is present if a specific decline reason was given in the real-time - # decision. - module RealTimeDecisionReason - extend Increase::Internal::Type::Enum + sig do + params( + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # The cardholder does not have sufficient funds to cover the transaction. The merchant may attempt to process the transaction again. - INSUFFICIENT_FUNDS = - T.let( - :insufficient_funds, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol ) + end + attr_reader :total_healthcare - # This type of transaction is not allowed for this card. This transaction should not be retried. - TRANSACTION_NEVER_ALLOWED = - T.let( - :transaction_never_allowed, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol - ) + sig do + params( + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare::OrHash + ) + ).void + end + attr_writer :total_healthcare - # The transaction amount exceeds the cardholder's approval limit. The merchant may attempt to process the transaction again. - EXCEEDS_APPROVAL_LIMIT = - T.let( - :exceeds_approval_limit, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + # The part of this transaction amount that was for transit-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit + ) ) + end + attr_reader :transit - # The card has been temporarily disabled or not yet activated. The merchant may attempt to process the transaction again. - CARD_TEMPORARILY_DISABLED = - T.let( - :card_temporarily_disabled, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol - ) + sig do + params( + transit: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit - # The transaction is suspected to be fraudulent. The merchant may attempt to process the transaction again. - SUSPECTED_FRAUD = - T.let( - :suspected_fraud, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown + ) ) + end + attr_reader :unknown - # The transaction was declined for another reason. The merchant may attempt to process the transaction again. This should be used sparingly. - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol - ) + sig do + params( + unknown: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown::OrHash + ) + ).void + end + attr_writer :unknown + # The part of this transaction amount that was for vision-related services. sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol - ] + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision + ) ) end - def self.values + attr_reader :vision + + sig do + params( + vision: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision::OrHash + ) + ).void end - end + attr_writer :vision - # Why the transaction was declined. - module Reason - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::Reason - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # The account has been closed. - ACCOUNT_CLOSED = - T.let( - :account_closed, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # 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::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardDecline::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 - # The Card was not active. - CARD_NOT_ACTIVE = - T.let( - :card_not_active, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + sig do + override.returns( + { + clinic: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision + ) + } ) + end + def to_hash + end - # The Card has been canceled. - CARD_CANCELED = - T.let( - :card_canceled, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash + ) + end - # The Physical Card was not active. - PHYSICAL_CARD_NOT_ACTIVE = - T.let( - :physical_card_not_active, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # The account's entity was not active. - ENTITY_NOT_ACTIVE = - T.let( - :entity_not_active, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # The account was inactive. - GROUP_LOCKED = - T.let( - :group_locked, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) + end - # The Card's Account did not have a sufficient available balance. - INSUFFICIENT_FUNDS = - T.let( - :insufficient_funds, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # The given CVV2 did not match the card's value. - CVV2_MISMATCH = - T.let( - :cvv2_mismatch, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + class Dental < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end - # The given PIN did not match the card's value. - PIN_MISMATCH = - T.let( - :pin_mismatch, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # The given expiration date did not match the card's value. Only applies when a CVV2 is present. - CARD_EXPIRATION_MISMATCH = - T.let( - :card_expiration_mismatch, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # The attempted card transaction is not allowed per Increase's terms. - TRANSACTION_NOT_ALLOWED = - T.let( - :transaction_not_allowed, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) + end - # The transaction was blocked by a Limit. - BREACHES_LIMIT = - T.let( - :breaches_limit, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # Your application declined the transaction via webhook. - WEBHOOK_DECLINED = - T.let( - :webhook_declined, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + class Prescription < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash + ) + end - # Your application webhook did not respond without the required timeout. - WEBHOOK_TIMED_OUT = - T.let( - :webhook_timed_out, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Declined by stand-in processing. - DECLINED_BY_STAND_IN_PROCESSING = - T.let( - :declined_by_stand_in_processing, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # The card read had an invalid CVV, dCVV, or authorization request cryptogram. - INVALID_PHYSICAL_CARD = - T.let( - :invalid_physical_card, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) + end - # The original card authorization for this incremental authorization does not exist. - MISSING_ORIGINAL_AUTHORIZATION = - T.let( - :missing_original_authorization, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # The transaction was declined because the 3DS authentication failed. - FAILED_3DS_AUTHENTICATION = - T.let( - :failed_3ds_authentication, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + class Surcharge < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end - # The transaction was suspected to be used by a card tester to test for valid card numbers. - SUSPECTED_CARD_TESTING = - T.let( - :suspected_card_testing, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. - SUSPECTED_FRAUD = - T.let( - :suspected_fraud, - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol - ] + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) - end - def self.values - end - end + end - class Verification < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardDecline::Verification, - Increase::Internal::AnyHash - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash end + end - # Fields related to verification of the Card Verification Code, a 3-digit code on - # the back of the card. - sig do - returns( - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode - ) - end - attr_reader :card_verification_code + class TotalCumulative < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end - sig do - params( - card_verification_code: - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::OrHash - ).void - end - attr_writer :card_verification_code + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Cardholder address provided in the authorization request and the address on file - # we verified it against. - sig do - returns( - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) - end - attr_reader :cardholder_address + end - sig do - params( - cardholder_address: - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::OrHash - ).void + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end end - attr_writer :cardholder_address - # Fields related to verification of cardholder-provided values. - sig do - params( - card_verification_code: - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::OrHash, - cardholder_address: - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::OrHash - ).returns(T.attached_class) - end - def self.new( - # 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 + class TotalHealthcare < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash + ) + end - sig do - override.returns( - { - card_verification_code: - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode, - cardholder_address: - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress - } + # The amount in minor units of the `currency` field. + 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) - end - def to_hash + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end end - class CardVerificationCode < Increase::Internal::Type::BaseModel + class Transit < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode, + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit, Increase::Internal::AnyHash ) end - # The result of verifying the Card Verification Code. - sig do - returns( - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol - ) - end - attr_accessor :result + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Fields related to verification of the Card Verification Code, a 3-digit code on - # the back of the card. + # 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( - result: - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::OrSymbol - ).returns(T.attached_class) + params(amount: Integer, currency: String).returns( + T.attached_class + ) end def self.new( - # The result of verifying the Card Verification Code. - result: + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) end - sig do - override.returns( - { - result: - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol - } - ) - end + sig { override.returns({ amount: Integer, currency: String }) } def to_hash end + end - # The result of verifying the Card Verification Code. - module Result - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # No card verification code was provided in the authorization request. - NOT_CHECKED = - T.let( - :not_checked, - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol + class Unknown < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash ) + end - # The card verification code matched the one on file. - MATCH = - T.let( - :match, - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # The card verification code did not match the one on file. - NO_MATCH = - T.let( - :no_match, - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol - ] - ) - end - def self.values - end + # 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. + 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 CardholderAddress < Increase::Internal::Type::BaseModel + class Vision < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress, + Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision, 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 amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # The postal code provided for verification in the authorization request. - sig { returns(T.nilable(String)) } - attr_accessor :provided_postal_code + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # The address verification result returned to the card network. + # The part of this transaction amount that was for vision-related services. sig do - returns( - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + params(amount: Integer, currency: String).returns( + T.attached_class ) 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::CardPayment::Element::CardDecline::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: + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) end - sig do - override.returns( - { - actual_line1: T.nilable(String), - actual_postal_code: T.nilable(String), - provided_line1: T.nilable(String), - provided_postal_code: T.nilable(String), - result: - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - } - ) - end + sig { override.returns({ amount: Integer, currency: String }) } def to_hash end + end + end - # The address verification result returned to the card network. - module Result - extend Increase::Internal::Type::Enum + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination + # account currency. + module Currency + extend Increase::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # No address was provided in the authorization request. - NOT_CHECKED = - T.let( - :not_checked, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address was not verified. - POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = - T.let( - :postal_code_match_address_not_checked, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code matches, but the street address does not match. - POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = - T.let( - :postal_code_match_address_no_match, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code does not match, but the street address matches. - POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = - T.let( - :postal_code_no_match_address_match, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code and street address match. - MATCH = - T.let( - :match, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - # Postal code and street address do not match. - NO_MATCH = - T.let( - :no_match, - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - - class CardFuelConfirmation < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardFuelConfirmation, - Increase::Internal::AnyHash - ) - end - - # The Card Fuel Confirmation identifier. - sig { returns(String) } - attr_accessor :id - - # The identifier for the Card Authorization this updates. - sig { returns(String) } - attr_accessor :card_authorization_id - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # currency. - sig do - returns( - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol - ) - end - attr_accessor :currency - - # The card network used to process this card authorization. - sig do - returns( - Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol - ) - end - attr_accessor :network - - # Network-specific identifiers for a specific request or transaction. - sig do - returns( - Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers - ) - end - attr_reader :network_identifiers - - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers::OrHash - ).void - end - attr_writer :network_identifiers - - # The identifier of the Pending Transaction associated with this Card Fuel - # Confirmation. - sig { returns(T.nilable(String)) } - attr_accessor :pending_transaction_id - - # A constant representing the object's type. For this resource it will always be - # `card_fuel_confirmation`. - sig do - returns( - Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol - ) - end - attr_accessor :type - - # The updated authorization amount after this fuel confirmation, in the minor unit - # of the transaction's currency. For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :updated_authorization_amount - - # A Card Fuel Confirmation object. This field will be present in the JSON response - # if and only if `category` is equal to `card_fuel_confirmation`. Card Fuel - # Confirmations update the amount of a Card Authorization after a fuel pump - # transaction is completed. - sig do - params( - id: String, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardFuelConfirmation::Currency::OrSymbol, - network: - Increase::CardPayment::Element::CardFuelConfirmation::Network::OrSymbol, - network_identifiers: - Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers::OrHash, - pending_transaction_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardFuelConfirmation::Type::OrSymbol, - updated_authorization_amount: Integer - ).returns(T.attached_class) - end - def self.new( - # The Card Fuel Confirmation identifier. - id:, - # The identifier for the Card Authorization this updates. - card_authorization_id:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # currency. - currency:, - # The card network used to process this card authorization. - network:, - # Network-specific identifiers for a specific request or transaction. - network_identifiers:, - # The identifier of the Pending Transaction associated with this Card Fuel - # Confirmation. - pending_transaction_id:, - # A constant representing the object's type. For this resource it will always be - # `card_fuel_confirmation`. - type:, - # The updated authorization amount after this fuel confirmation, in the minor unit - # of the transaction's currency. For dollars, for example, this is cents. - updated_authorization_amount: - ) - end - - sig do - override.returns( - { - id: String, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol, - network: - Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol, - network_identifiers: - Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers, - pending_transaction_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol, - updated_authorization_amount: Integer - } - ) - end - def to_hash - end - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # currency. - module Currency - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardFuelConfirmation::Currency - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } # Canadian Dollar (CAD) CAD = T.let( :CAD, - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ) # Swiss Franc (CHF) CHF = T.let( :CHF, - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ) # Euro (EUR) EUR = T.let( :EUR, - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ) # British Pound (GBP) GBP = T.let( :GBP, - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ) # Japanese Yen (JPY) JPY = T.let( :JPY, - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ) # US Dollar (USD) USD = T.let( :USD, - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Currency::TaggedSymbol ] ) end @@ -4685,30 +4644,38 @@ module Increase end end - # The card network used to process this card authorization. - module Network + # 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::CardPayment::Element::CardFuelConfirmation::Network + Increase::CardPayment::Element::CardDecline::Direction ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # Visa - VISA = + # A regular card authorization where funds are debited from the cardholder. + SETTLEMENT = T.let( - :visa, - Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol + :settlement, + Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::Direction::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Direction::TaggedSymbol ] ) end @@ -4716,416 +4683,453 @@ module Increase end end - class NetworkIdentifiers < Increase::Internal::Type::BaseModel + class NetworkDetails < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers, + Increase::CardPayment::Element::CardDecline::NetworkDetails, 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 + # The payment network used to process this card authorization. + sig do + returns( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol + ) + end + attr_accessor :category - # 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 + # Fields specific to the `visa` network. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa + ) + ) + end + attr_reader :visa - # 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 + sig do + params( + visa: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::OrHash + ) + ).void + end + attr_writer :visa - # Network-specific identifiers for a specific request or transaction. + # Fields specific to the `network`. sig do params( - retrieval_reference_number: T.nilable(String), - trace_number: T.nilable(String), - transaction_id: T.nilable(String) + category: + Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::OrSymbol, + visa: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::OrHash + ) ).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: + # The payment network used to process this card authorization. + category:, + # Fields specific to the `visa` network. + visa: ) end sig do override.returns( { - retrieval_reference_number: T.nilable(String), - trace_number: T.nilable(String), - transaction_id: T.nilable(String) + category: + Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol, + visa: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa + ) } ) end def to_hash end - end - - # A constant representing the object's type. For this resource it will always be - # `card_fuel_confirmation`. - module Type - extend Increase::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardFuelConfirmation::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The payment network used to process this card authorization. + module Category + extend Increase::Internal::Type::Enum - CARD_FUEL_CONFIRMATION = - T.let( - :card_fuel_confirmation, - Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end + # Visa + VISA = + T.let( + :visa, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol + ) - class CardIncrement < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardIncrement, - Increase::Internal::AnyHash - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::NetworkDetails::Category::TaggedSymbol + ] + ) + end + def self.values + end end - # The Card Increment identifier. - sig { returns(String) } - attr_accessor :id + class Visa < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa, + Increase::Internal::AnyHash + ) + end - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - sig do - returns( - Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol - ) - end - attr_accessor :actioner + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) + ) + end + attr_accessor :electronic_commerce_indicator - # The amount of this increment in the minor unit of the transaction's currency. - # For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :amount + # The method used to enter the cardholder's primary account number and card + # expiration date. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) + ) + end + attr_accessor :point_of_service_entry_mode - # The identifier for the Card Authorization this increments. - sig { returns(String) } - attr_accessor :card_authorization_id + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + ) + end + attr_accessor :stand_in_processing_reason - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # currency. - sig do - returns( - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # Fields specific to the `visa` network. + sig do + params( + electronic_commerce_indicator: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::OrSymbol + ), + point_of_service_entry_mode: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::OrSymbol + ), + stand_in_processing_reason: + T.nilable( + Increase::CardPayment::Element::CardDecline::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 - # The card network used to process this card authorization. - sig do - returns( - Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol - ) - end - attr_accessor :network + sig do + override.returns( + { + electronic_commerce_indicator: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ), + point_of_service_entry_mode: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ), + stand_in_processing_reason: + T.nilable( + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + } + ) + end + def to_hash + end - # Network-specific identifiers for a specific request or transaction. - sig do - returns( - Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers - ) - end - attr_reader :network_identifiers + # 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 - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers::OrHash - ).void - end - attr_writer :network_identifiers + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # 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 + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # The identifier of the Pending Transaction associated with this Card Increment. - sig { returns(T.nilable(String)) } - attr_accessor :pending_transaction_id + # Recurring transaction: Payment indicator used to indicate a recurring transaction that originates from an acquirer in the US region. + RECURRING = + T.let( + :recurring, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # The identifier of the Real-Time Decision sent to approve or decline this - # incremental authorization. - sig { returns(T.nilable(String)) } - attr_accessor :real_time_decision_id + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # A constant representing the object's type. For this resource it will always be - # `card_increment`. - sig do - returns( - Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol - ) - end - attr_accessor :type + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # The updated authorization amount after this increment, in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :updated_authorization_amount + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # A Card Increment object. This field will be present in the JSON response if and - # only if `category` is equal to `card_increment`. Card Increments increase the - # pending amount of an authorized transaction. - sig do - params( - id: String, - actioner: - Increase::CardPayment::Element::CardIncrement::Actioner::OrSymbol, - amount: Integer, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardIncrement::Currency::OrSymbol, - network: - Increase::CardPayment::Element::CardIncrement::Network::OrSymbol, - network_identifiers: - Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers::OrHash, - network_risk_score: T.nilable(Integer), - pending_transaction_id: T.nilable(String), - real_time_decision_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardIncrement::Type::OrSymbol, - updated_authorization_amount: Integer - ).returns(T.attached_class) - end - def self.new( - # The Card Increment identifier. - id:, - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - actioner:, - # The amount of this increment in the minor unit of the transaction's currency. - # For dollars, for example, this is cents. - amount:, - # The identifier for the Card Authorization this increments. - card_authorization_id:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # currency. - currency:, - # The card network used to process this card authorization. - network:, - # 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:, - # The identifier of the Pending Transaction associated with this Card Increment. - pending_transaction_id:, - # The identifier of the Real-Time Decision sent to approve or decline this - # incremental authorization. - real_time_decision_id:, - # A constant representing the object's type. For this resource it will always be - # `card_increment`. - type:, - # The updated authorization amount after this increment, in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - updated_authorization_amount: - ) - end + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - sig do - override.returns( - { - id: String, - actioner: - Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol, - amount: Integer, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol, - network: - Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol, - network_identifiers: - Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, - network_risk_score: T.nilable(Integer), - pending_transaction_id: T.nilable(String), - real_time_decision_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol, - updated_authorization_amount: Integer - } - ) - end - def to_hash - end + # 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::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - # Whether this authorization 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 + # Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. + NON_SECURE_TRANSACTION = + T.let( + :non_secure_transaction, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardIncrement::Actioner - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::ElectronicCommerceIndicator::TaggedSymbol + ] + ) + end + def self.values + end 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::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol - ) + # The method used to enter the cardholder's primary account number and card + # expiration date. + module PointOfServiceEntryMode + extend Increase::Internal::Type::Enum - # This object was actioned by Increase without user intervention. - INCREASE = - T.let( - :increase, - Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # This object was actioned by the network, through stand-in processing. - NETWORK = - T.let( - :network, - Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol - ) + # Unknown + UNKNOWN = + T.let( + :unknown, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol - ] - ) - end - def self.values - end - end + # Manual key entry + MANUAL = + T.let( + :manual, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - # currency. - module Currency - extend Increase::Internal::Type::Enum + # Magnetic stripe read, without card verification value + MAGNETIC_STRIPE_NO_CVV = + T.let( + :magnetic_stripe_no_cvv, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardIncrement::Currency - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Optical code + OPTICAL_CODE = + T.let( + :optical_code, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) + # Contact chip card + INTEGRATED_CIRCUIT_CARD = + T.let( + :integrated_circuit_card, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) + # Contactless read of chip card + CONTACTLESS = + T.let( + :contactless, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) + # Transaction initiated using a credential that has previously been stored on file + CREDENTIAL_ON_FILE = + T.let( + :credential_on_file, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) + # Magnetic stripe read + MAGNETIC_STRIPE = + T.let( + :magnetic_stripe, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) + # Contactless read of magnetic stripe data + CONTACTLESS_MAGNETIC_STRIPE = + T.let( + :contactless_magnetic_stripe, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ) + # Contact chip card, without card verification value + INTEGRATED_CIRCUIT_CARD_NO_CVV = + T.let( + :integrated_circuit_card_no_cvv, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol - ] - ) - end - def self.values - end - end + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::PointOfServiceEntryMode::TaggedSymbol + ] + ) + end + def self.values + end + end - # The card network used to process this card authorization. - module Network - extend Increase::Internal::Type::Enum + # 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::CardPayment::Element::CardIncrement::Network - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Visa - VISA = - T.let( - :visa, - Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol - ) + # Increase failed to process the authorization in a timely manner. + ISSUER_ERROR = + T.let( + :issuer_error, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol - ] - ) - end - def self.values + # The physical card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = + T.let( + :invalid_physical_card, + Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + # An unspecific reason for stand-in processing. + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::NetworkDetails::Visa::StandInProcessingReason::TaggedSymbol + ] + ) + end + def self.values + end + end end end @@ -5133,7 +5137,7 @@ module Increase OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, + Increase::CardPayment::Element::CardDecline::NetworkIdentifiers, Increase::Internal::AnyHash ) end @@ -5189,5730 +5193,8418 @@ module Increase end end - # A constant representing the object's type. For this resource it will always be - # `card_increment`. - module Type + # The processing category describes the intent behind the authorization, 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::CardPayment::Element::CardIncrement::Type + Increase::CardPayment::Element::CardDecline::ProcessingCategory ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - CARD_INCREMENT = + # Account funding transactions are transactions used to e.g., fund an account or transfer funds between accounts. + ACCOUNT_FUNDING = T.let( - :card_increment, - Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol + :account_funding, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardIncrement::Type::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::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol ) - end - def self.values - end - end - end - class CardRefund < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund, - Increase::Internal::AnyHash + # A transaction used to pay a bill. + BILL_PAYMENT = + T.let( + :bill_payment, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol ) - end - - # The Card Refund identifier. - sig { returns(String) } - attr_accessor :id - - # The amount in the minor unit of the transaction's settlement 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 + # Original credit transactions are used to send money to a cardholder. + ORIGINAL_CREDIT = + T.let( + :original_credit, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) - # Cashback debited for this transaction, if eligible. Cashback is paid out in - # aggregate, monthly. - sig do - returns( - T.nilable(Increase::CardPayment::Element::CardRefund::Cashback) - ) - end - attr_reader :cashback + # A regular purchase. + PURCHASE = + T.let( + :purchase, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) - sig do - params( - cashback: - T.nilable( - Increase::CardPayment::Element::CardRefund::Cashback::OrHash - ) - ).void - end - attr_writer :cashback + # Quasi-cash transactions represent purchases of items which may be convertible to cash. + QUASI_CASH = + T.let( + :quasi_cash, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's settlement currency. - sig do - returns( - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + REFUND = + T.let( + :refund, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) - # Interchange assessed as a part of this transaciton. - sig do - returns( - T.nilable(Increase::CardPayment::Element::CardRefund::Interchange) - ) - end - attr_reader :interchange + # Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + CASH_DISBURSEMENT = + T.let( + :cash_disbursement, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) - sig do - params( - interchange: - T.nilable( - Increase::CardPayment::Element::CardRefund::Interchange::OrHash - ) - ).void + # The processing category is unknown. + UNKNOWN = + T.let( + :unknown, + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::ProcessingCategory::TaggedSymbol + ] + ) + end + def self.values + end end - attr_writer :interchange - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - sig { returns(String) } - attr_accessor :merchant_acceptor_id + # This is present if a specific decline reason was given in the real-time + # decision. + module RealTimeDecisionReason + extend Increase::Internal::Type::Enum - # The 4-digit MCC describing the merchant's business. - sig { returns(String) } - attr_accessor :merchant_category_code + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The city the merchant resides in. - sig { returns(String) } - attr_accessor :merchant_city + # The cardholder does not have sufficient funds to cover the transaction. The merchant may attempt to process the transaction again. + INSUFFICIENT_FUNDS = + T.let( + :insufficient_funds, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) - # The country the merchant resides in. - sig { returns(String) } - attr_accessor :merchant_country + # This type of transaction is not allowed for this card. This transaction should not be retried. + TRANSACTION_NEVER_ALLOWED = + T.let( + :transaction_never_allowed, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) - # The name of the merchant. - sig { returns(String) } - attr_accessor :merchant_name + # The transaction amount exceeds the cardholder's approval limit. The merchant may attempt to process the transaction again. + EXCEEDS_APPROVAL_LIMIT = + T.let( + :exceeds_approval_limit, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) - # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_postal_code + # The card has been temporarily disabled or not yet activated. The merchant may attempt to process the transaction again. + CARD_TEMPORARILY_DISABLED = + T.let( + :card_temporarily_disabled, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) - # The state the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_state + # The transaction is suspected to be fraudulent. The merchant may attempt to process the transaction again. + SUSPECTED_FRAUD = + T.let( + :suspected_fraud, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) - # Network-specific identifiers for this refund. - sig do - returns( - Increase::CardPayment::Element::CardRefund::NetworkIdentifiers - ) - end - attr_reader :network_identifiers + # The transaction was declined for another reason. The merchant may attempt to process the transaction again. This should be used sparingly. + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ) - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardRefund::NetworkIdentifiers::OrHash - ).void + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::RealTimeDecisionReason::TaggedSymbol + ] + ) + end + def self.values + end end - attr_writer :network_identifiers - # The amount in the minor unit of the transaction's presentment currency. - sig { returns(Integer) } - attr_accessor :presentment_amount + # Why the transaction was declined. + module Reason + extend Increase::Internal::Type::Enum - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's presentment currency. - sig { returns(String) } - attr_accessor :presentment_currency + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::Reason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Additional details about the card purchase, such as tax and industry-specific - # fields. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails + # The account has been closed. + ACCOUNT_CLOSED = + T.let( + :account_closed, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol ) - ) - end - attr_reader :purchase_details - sig do - params( - purchase_details: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::OrHash - ) - ).void - end - attr_writer :purchase_details + # The Card was not active. + CARD_NOT_ACTIVE = + T.let( + :card_not_active, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) - # The identifier of the Transaction associated with this Transaction. - sig { returns(String) } - attr_accessor :transaction_id + # The Card has been canceled. + CARD_CANCELED = + T.let( + :card_canceled, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) - # A constant representing the object's type. For this resource it will always be - # `card_refund`. - sig do - returns( - Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol - ) - end - attr_accessor :type + # The Physical Card was not active. + PHYSICAL_CARD_NOT_ACTIVE = + T.let( + :physical_card_not_active, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) - # A Card Refund object. This field will be present in the JSON response if and - # only if `category` is equal to `card_refund`. Card Refunds move money back to - # the cardholder. While they are usually connected to a Card Settlement an - # acquirer can also refund money directly to a card without relation to a - # transaction. - sig do - params( - id: String, - amount: Integer, - card_payment_id: String, - cashback: - T.nilable( - Increase::CardPayment::Element::CardRefund::Cashback::OrHash - ), - currency: - Increase::CardPayment::Element::CardRefund::Currency::OrSymbol, - interchange: - T.nilable( - Increase::CardPayment::Element::CardRefund::Interchange::OrHash - ), - merchant_acceptor_id: String, - merchant_category_code: String, - merchant_city: String, - merchant_country: String, - merchant_name: String, - merchant_postal_code: T.nilable(String), - merchant_state: T.nilable(String), - network_identifiers: - Increase::CardPayment::Element::CardRefund::NetworkIdentifiers::OrHash, - presentment_amount: Integer, - presentment_currency: String, - purchase_details: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::OrHash - ), - transaction_id: String, - type: Increase::CardPayment::Element::CardRefund::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The Card Refund identifier. - id:, - # The amount in the minor unit of the transaction's settlement currency. For - # dollars, for example, this is cents. - amount:, - # The ID of the Card Payment this transaction belongs to. - card_payment_id:, - # Cashback debited for this transaction, if eligible. Cashback is paid out in - # aggregate, monthly. - cashback:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's settlement currency. - currency:, - # Interchange assessed as a part of this transaciton. - interchange:, - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - merchant_acceptor_id:, - # The 4-digit MCC describing the merchant's business. - merchant_category_code:, - # The city the merchant resides in. - merchant_city:, - # The country the merchant resides in. - merchant_country:, - # The name of the merchant. - merchant_name:, - # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. - merchant_postal_code:, - # The state the merchant resides in. - merchant_state:, - # Network-specific identifiers for this refund. - network_identifiers:, - # The 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:, - # Additional details about the card purchase, such as tax and industry-specific - # fields. - purchase_details:, - # 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_refund`. - type: - ) - end + # The account's entity was not active. + ENTITY_NOT_ACTIVE = + T.let( + :entity_not_active, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) - sig do - override.returns( - { - id: String, - amount: Integer, - card_payment_id: String, - cashback: - T.nilable( - Increase::CardPayment::Element::CardRefund::Cashback - ), - currency: - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol, - interchange: - T.nilable( - Increase::CardPayment::Element::CardRefund::Interchange - ), - merchant_acceptor_id: String, - merchant_category_code: String, - merchant_city: String, - merchant_country: String, - merchant_name: String, - merchant_postal_code: T.nilable(String), - merchant_state: T.nilable(String), - network_identifiers: - Increase::CardPayment::Element::CardRefund::NetworkIdentifiers, - presentment_amount: Integer, - presentment_currency: String, - purchase_details: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails - ), - transaction_id: String, - type: - Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol - } - ) - end - def to_hash + # The account was inactive. + GROUP_LOCKED = + T.let( + :group_locked, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The Card's Account did not have a sufficient available balance. + INSUFFICIENT_FUNDS = + T.let( + :insufficient_funds, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The given CVV2 did not match the card's value. + CVV2_MISMATCH = + T.let( + :cvv2_mismatch, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The given PIN did not match the card's value. + PIN_MISMATCH = + T.let( + :pin_mismatch, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The given expiration date did not match the card's value. Only applies when a CVV2 is present. + CARD_EXPIRATION_MISMATCH = + T.let( + :card_expiration_mismatch, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The attempted card transaction is not allowed per Increase's terms. + TRANSACTION_NOT_ALLOWED = + T.let( + :transaction_not_allowed, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The transaction was blocked by a Limit. + BREACHES_LIMIT = + T.let( + :breaches_limit, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # Your application declined the transaction via webhook. + WEBHOOK_DECLINED = + T.let( + :webhook_declined, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # Your application webhook did not respond without the required timeout. + WEBHOOK_TIMED_OUT = + T.let( + :webhook_timed_out, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # Declined by stand-in processing. + DECLINED_BY_STAND_IN_PROCESSING = + T.let( + :declined_by_stand_in_processing, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The card read had an invalid CVV, dCVV, or authorization request cryptogram. + INVALID_PHYSICAL_CARD = + T.let( + :invalid_physical_card, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The original card authorization for this incremental authorization does not exist. + MISSING_ORIGINAL_AUTHORIZATION = + T.let( + :missing_original_authorization, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The transaction was declined because the 3DS authentication failed. + FAILED_3DS_AUTHENTICATION = + T.let( + :failed_3ds_authentication, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The transaction was suspected to be used by a card tester to test for valid card numbers. + SUSPECTED_CARD_TESTING = + T.let( + :suspected_card_testing, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. + SUSPECTED_FRAUD = + T.let( + :suspected_fraud, + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::Reason::TaggedSymbol + ] + ) + end + def self.values + end end - class Cashback < Increase::Internal::Type::BaseModel + class Verification < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardRefund::Cashback, + Increase::CardPayment::Element::CardDecline::Verification, Increase::Internal::AnyHash ) end - # The cashback amount given as a string containing a decimal number. The amount is - # a positive number if it will be credited to you (e.g., settlements) and a - # negative number if it will be debited (e.g., refunds). - sig { returns(String) } - attr_accessor :amount - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + # Fields related to verification of the Card Verification Code, a 3-digit code on + # the back of the card. sig do returns( - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode ) end - attr_accessor :currency + attr_reader :card_verification_code - # Cashback debited for this transaction, if eligible. Cashback is paid out in - # aggregate, monthly. sig do params( - amount: String, - currency: - Increase::CardPayment::Element::CardRefund::Cashback::Currency::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The cashback amount given as a string containing a decimal number. The amount is - # a positive number if it will be credited to you (e.g., settlements) and a - # negative number if it will be debited (e.g., refunds). - amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - currency: + card_verification_code: + Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::Verification::CardholderAddress + ) + end + attr_reader :cardholder_address + + sig do + params( + cardholder_address: + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::OrHash + ).void + end + attr_writer :cardholder_address + + # Fields related to verification of cardholder-provided values. + sig do + params( + card_verification_code: + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::OrHash, + cardholder_address: + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::OrHash + ).returns(T.attached_class) + end + def self.new( + # 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( { - amount: String, - currency: - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + card_verification_code: + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode, + cardholder_address: + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress } ) end def to_hash end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - module Currency - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class CardVerificationCode < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::Cashback::Currency + T.any( + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol - ) - - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol - ) - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol - ) - - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol - ) - - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + # The result of verifying the Card Verification Code. + sig do + returns( + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol ) + end + attr_accessor :result - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardRefund::Cashback::Currency::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::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The result of verifying the Card Verification Code. + result: + ) + end sig do override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol - ] + { + result: + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol + } ) end - def self.values + def to_hash end - end - end - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's settlement currency. - module Currency - extend Increase::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::Currency - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The result of verifying the Card Verification Code. + module Result + extend Increase::Internal::Type::Enum - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) + # No card verification code was provided in the authorization request. + NOT_CHECKED = + T.let( + :not_checked, + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) + # The card verification code matched the one on file. + MATCH = + T.let( + :match, + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) + # The card verification code did not match the one on file. + NO_MATCH = + T.let( + :no_match, + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol + ) - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::Verification::CardVerificationCode::Result::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ) + class CardholderAddress < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress, + Increase::Internal::AnyHash + ) + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol - ] - ) - end - def self.values - end - end + # Line 1 of the address on file for the cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :actual_line1 - class Interchange < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::Interchange, - Increase::Internal::AnyHash - ) - end + # The postal code of the address on file for the cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :actual_postal_code - # The interchange amount given as a string containing a decimal number in major - # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is - # credited to Increase (e.g., settlements) and a negative number if it is debited - # (e.g., refunds). - sig { returns(String) } - attr_accessor :amount + # The cardholder address line 1 provided for verification in the authorization + # request. + sig { returns(T.nilable(String)) } + attr_accessor :provided_line1 - # The card network specific interchange code. - sig { returns(T.nilable(String)) } - attr_accessor :code + # The postal code provided for verification in the authorization request. + sig { returns(T.nilable(String)) } + attr_accessor :provided_postal_code - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange - # reimbursement. - sig do - returns( - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + # The address verification result returned to the card network. + sig do + returns( + Increase::CardPayment::Element::CardDecline::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::CardPayment::Element::CardDecline::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 - attr_accessor :currency + end - # Interchange assessed as a part of this transaciton. - sig do - params( - amount: String, - code: T.nilable(String), - currency: - Increase::CardPayment::Element::CardRefund::Interchange::Currency::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The interchange amount given as a string containing a decimal number in major - # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is - # credited to Increase (e.g., settlements) and a negative number if it is debited - # (e.g., refunds). - amount:, - # The card network specific interchange code. - code:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange - # reimbursement. - currency: - ) - end + sig do + override.returns( + { + actual_line1: T.nilable(String), + actual_postal_code: T.nilable(String), + provided_line1: T.nilable(String), + provided_postal_code: T.nilable(String), + result: + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + } + ) + end + def to_hash + end - sig do - override.returns( - { - amount: String, - code: T.nilable(String), - currency: - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - } - ) - end - def to_hash - end + # The address verification result returned to the card network. + module Result + extend Increase::Internal::Type::Enum - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange - # reimbursement. - module Currency - extend Increase::Internal::Type::Enum + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::Interchange::Currency + # No address was provided in the authorization request. + NOT_CHECKED = + T.let( + :not_checked, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ) - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ) + # Postal code matches, but the street address was not verified. + POSTAL_CODE_MATCH_ADDRESS_NOT_CHECKED = + T.let( + :postal_code_match_address_not_checked, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ) + # Postal code matches, but the street address does not match. + POSTAL_CODE_MATCH_ADDRESS_NO_MATCH = + T.let( + :postal_code_match_address_no_match, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ) + # Postal code does not match, but the street address matches. + POSTAL_CODE_NO_MATCH_ADDRESS_MATCH = + T.let( + :postal_code_no_match_address_match, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ) + # Postal code and street address match. + MATCH = + T.let( + :match, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ) + # Postal code and street address do not match. + NO_MATCH = + T.let( + :no_match, + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol - ] - ) - end - def self.values + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardDecline::Verification::CardholderAddress::Result::TaggedSymbol + ] + ) + end + def self.values + end end end end + end - class NetworkIdentifiers < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::NetworkIdentifiers, - Increase::Internal::AnyHash - ) - end - - # A network assigned business ID that identifies the acquirer that processed this - # transaction. - sig { returns(String) } - attr_accessor :acquirer_business_id + class CardFuelConfirmation < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardFuelConfirmation, + Increase::Internal::AnyHash + ) + end - # A globally unique identifier for this settlement. - sig { returns(String) } - attr_accessor :acquirer_reference_number + # The Card Fuel Confirmation identifier. + sig { returns(String) } + attr_accessor :id - # 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 + # The identifier for the Card Authorization this updates. + sig { returns(String) } + attr_accessor :card_authorization_id - # Network-specific identifiers for this refund. - sig do - params( - acquirer_business_id: String, - acquirer_reference_number: String, - transaction_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # A network assigned business ID that identifies the acquirer that processed this - # transaction. - acquirer_business_id:, - # A globally unique identifier for this settlement. - acquirer_reference_number:, - # A globally unique transaction identifier provided by the card network, used - # across multiple life-cycle requests. - transaction_id: + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # currency. + sig do + returns( + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol ) - end + end + attr_accessor :currency - sig do - override.returns( - { - acquirer_business_id: String, - acquirer_reference_number: String, - transaction_id: T.nilable(String) - } - ) - end - def to_hash - end + # The card network used to process this card authorization. + sig do + returns( + Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol + ) end + attr_accessor :network - class PurchaseDetails < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails, - Increase::Internal::AnyHash - ) - end + # Network-specific identifiers for a specific request or transaction. + sig do + returns( + Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers + ) + end + attr_reader :network_identifiers - # Fields specific to car rentals. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental - ) - ) - end - attr_reader :car_rental + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers - sig do - params( - car_rental: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::OrHash - ) - ).void - end - attr_writer :car_rental + # The identifier of the Pending Transaction associated with this Card Fuel + # Confirmation. + sig { returns(T.nilable(String)) } + attr_accessor :pending_transaction_id - # An identifier from the merchant for the customer or consumer. - sig { returns(T.nilable(String)) } - attr_accessor :customer_reference_identifier + # A constant representing the object's type. For this resource it will always be + # `card_fuel_confirmation`. + sig do + returns( + Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol + ) + end + attr_accessor :type - # The state or provincial tax amount in minor units. - sig { returns(T.nilable(Integer)) } - attr_accessor :local_tax_amount + # The updated authorization amount after this fuel confirmation, in the minor unit + # of the transaction's currency. For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :updated_authorization_amount - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :local_tax_currency + # A Card Fuel Confirmation object. This field will be present in the JSON response + # if and only if `category` is equal to `card_fuel_confirmation`. Card Fuel + # Confirmations update the amount of a Card Authorization after a fuel pump + # transaction is completed. + sig do + params( + id: String, + card_authorization_id: String, + currency: + Increase::CardPayment::Element::CardFuelConfirmation::Currency::OrSymbol, + network: + Increase::CardPayment::Element::CardFuelConfirmation::Network::OrSymbol, + network_identifiers: + Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers::OrHash, + pending_transaction_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardFuelConfirmation::Type::OrSymbol, + updated_authorization_amount: Integer + ).returns(T.attached_class) + end + def self.new( + # The Card Fuel Confirmation identifier. + id:, + # The identifier for the Card Authorization this updates. + card_authorization_id:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # currency. + currency:, + # The card network used to process this card authorization. + network:, + # Network-specific identifiers for a specific request or transaction. + network_identifiers:, + # The identifier of the Pending Transaction associated with this Card Fuel + # Confirmation. + pending_transaction_id:, + # A constant representing the object's type. For this resource it will always be + # `card_fuel_confirmation`. + type:, + # The updated authorization amount after this fuel confirmation, in the minor unit + # of the transaction's currency. For dollars, for example, this is cents. + updated_authorization_amount: + ) + end - # Fields specific to lodging. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging + sig do + override.returns( + { + id: String, + card_authorization_id: String, + currency: + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol, + network: + Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol, + network_identifiers: + Increase::CardPayment::Element::CardFuelConfirmation::NetworkIdentifiers, + pending_transaction_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol, + updated_authorization_amount: Integer + } + ) + end + def to_hash + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # currency. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardFuelConfirmation::Currency ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol ) - end - attr_reader :lodging - sig do - params( - lodging: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::OrHash - ) - ).void - end - attr_writer :lodging + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + ) - # The national tax amount in minor units. - sig { returns(T.nilable(Integer)) } - attr_accessor :national_tax_amount + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :national_tax_currency + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + ) - # An identifier from the merchant for the purchase to the issuer and cardholder. - sig { returns(T.nilable(String)) } - attr_accessor :purchase_identifier + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + ) - # The format of the purchase identifier. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol ) - end - attr_accessor :purchase_identifier_format - # Fields specific to travel. sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel - ) + override.returns( + T::Array[ + Increase::CardPayment::Element::CardFuelConfirmation::Currency::TaggedSymbol + ] ) end - attr_reader :travel + def self.values + end + end + + # The card network used to process this card authorization. + module Network + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardFuelConfirmation::Network + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa + VISA = + T.let( + :visa, + Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol + ) sig do - params( - travel: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::OrHash - ) - ).void + override.returns( + T::Array[ + Increase::CardPayment::Element::CardFuelConfirmation::Network::TaggedSymbol + ] + ) end - attr_writer :travel + def self.values + end + end - # Additional details about the card purchase, such as tax and industry-specific - # fields. + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardFuelConfirmation::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( - car_rental: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::OrHash - ), - customer_reference_identifier: T.nilable(String), - local_tax_amount: T.nilable(Integer), - local_tax_currency: T.nilable(String), - lodging: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::OrHash - ), - national_tax_amount: T.nilable(Integer), - national_tax_currency: T.nilable(String), - purchase_identifier: T.nilable(String), - purchase_identifier_format: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::OrSymbol - ), - travel: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::OrHash - ) + retrieval_reference_number: T.nilable(String), + trace_number: T.nilable(String), + transaction_id: T.nilable(String) ).returns(T.attached_class) end def self.new( - # Fields specific to car rentals. - car_rental:, - # An identifier from the merchant for the customer or consumer. - customer_reference_identifier:, - # The state or provincial tax amount in minor units. - local_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - local_tax_currency:, - # Fields specific to lodging. - lodging:, - # The national tax amount in minor units. - national_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - national_tax_currency:, - # An identifier from the merchant for the purchase to the issuer and cardholder. - purchase_identifier:, - # The format of the purchase identifier. - purchase_identifier_format:, - # Fields specific to travel. - travel: + # 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( { - car_rental: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental - ), - customer_reference_identifier: T.nilable(String), - local_tax_amount: T.nilable(Integer), - local_tax_currency: T.nilable(String), - lodging: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging - ), - national_tax_amount: T.nilable(Integer), - national_tax_currency: T.nilable(String), - purchase_identifier: T.nilable(String), - purchase_identifier_format: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ), - travel: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel - ) + retrieval_reference_number: T.nilable(String), + trace_number: T.nilable(String), + transaction_id: T.nilable(String) } ) end def to_hash end + end - class CarRental < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental, - Increase::Internal::AnyHash - ) - end + # A constant representing the object's type. For this resource it will always be + # `card_fuel_confirmation`. + module Type + extend Increase::Internal::Type::Enum - # Code indicating the vehicle's class. - sig { returns(T.nilable(String)) } - attr_accessor :car_class_code + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardFuelConfirmation::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Date the customer picked up the car or, in the case of a no-show or pre-pay - # transaction, the scheduled pick up date. - sig { returns(T.nilable(Date)) } - attr_accessor :checkout_date + CARD_FUEL_CONFIRMATION = + T.let( + :card_fuel_confirmation, + Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol + ) - # Daily rate being charged for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :daily_rental_rate_amount + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardFuelConfirmation::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - # rate. - sig { returns(T.nilable(String)) } - attr_accessor :daily_rental_rate_currency + class CardIncrement < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement, + Increase::Internal::AnyHash + ) + end - # Number of days the vehicle was rented. - sig { returns(T.nilable(Integer)) } - attr_accessor :days_rented + # The Card Increment identifier. + sig { returns(String) } + attr_accessor :id - # Additional charges (gas, late fee, etc.) being billed. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) - ) - end - attr_accessor :extra_charges + # Whether this authorization was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + sig do + returns( + Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol + ) + end + attr_accessor :actioner - # Fuel charges for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :fuel_charges_amount + # 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::CardPayment::Element::CardIncrement::AdditionalAmounts + ) + end + attr_reader :additional_amounts - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :fuel_charges_currency + sig do + params( + additional_amounts: + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::OrHash + ).void + end + attr_writer :additional_amounts - # Any insurance being charged for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :insurance_charges_amount + # The amount of this increment in the minor unit of the transaction's currency. + # For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :amount - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - # charges assessed. - sig { returns(T.nilable(String)) } - attr_accessor :insurance_charges_currency - - # An indicator that the cardholder is being billed for a reserved vehicle that was - # not actually rented (that is, a "no-show" charge). - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ) - ) - end - attr_accessor :no_show_indicator - - # Charges for returning the vehicle at a different location than where it was - # picked up. - sig { returns(T.nilable(Integer)) } - attr_accessor :one_way_drop_off_charges_amount - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - # drop-off charges assessed. - sig { returns(T.nilable(String)) } - attr_accessor :one_way_drop_off_charges_currency - - # Name of the person renting the vehicle. - sig { returns(T.nilable(String)) } - attr_accessor :renter_name - - # Weekly rate being charged for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :weekly_rental_rate_amount - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - # rental rate. - sig { returns(T.nilable(String)) } - attr_accessor :weekly_rental_rate_currency + # The identifier for the Card Authorization this increments. + sig { returns(String) } + attr_accessor :card_authorization_id - # Fields specific to car rentals. - sig do - params( - car_class_code: T.nilable(String), - checkout_date: T.nilable(Date), - daily_rental_rate_amount: T.nilable(Integer), - daily_rental_rate_currency: T.nilable(String), - days_rented: T.nilable(Integer), - extra_charges: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::OrSymbol - ), - fuel_charges_amount: T.nilable(Integer), - fuel_charges_currency: T.nilable(String), - insurance_charges_amount: T.nilable(Integer), - insurance_charges_currency: T.nilable(String), - no_show_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::OrSymbol - ), - one_way_drop_off_charges_amount: T.nilable(Integer), - one_way_drop_off_charges_currency: T.nilable(String), - renter_name: T.nilable(String), - weekly_rental_rate_amount: T.nilable(Integer), - weekly_rental_rate_currency: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Code indicating the vehicle's class. - car_class_code:, - # Date the customer picked up the car or, in the case of a no-show or pre-pay - # transaction, the scheduled pick up date. - checkout_date:, - # Daily rate being charged for the vehicle. - daily_rental_rate_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - # rate. - daily_rental_rate_currency:, - # Number of days the vehicle was rented. - days_rented:, - # Additional charges (gas, late fee, etc.) being billed. - extra_charges:, - # Fuel charges for the vehicle. - fuel_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - # assessed. - fuel_charges_currency:, - # Any insurance being charged for the vehicle. - insurance_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - # charges assessed. - insurance_charges_currency:, - # An indicator that the cardholder is being billed for a reserved vehicle that was - # not actually rented (that is, a "no-show" charge). - no_show_indicator:, - # Charges for returning the vehicle at a different location than where it was - # picked up. - one_way_drop_off_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - # drop-off charges assessed. - one_way_drop_off_charges_currency:, - # Name of the person renting the vehicle. - renter_name:, - # Weekly rate being charged for the vehicle. - weekly_rental_rate_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - # rental rate. - weekly_rental_rate_currency: - ) - end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # currency. + sig do + returns( + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) + end + attr_accessor :currency - sig do - override.returns( - { - car_class_code: T.nilable(String), - checkout_date: T.nilable(Date), - daily_rental_rate_amount: T.nilable(Integer), - daily_rental_rate_currency: T.nilable(String), - days_rented: T.nilable(Integer), - extra_charges: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ), - fuel_charges_amount: T.nilable(Integer), - fuel_charges_currency: T.nilable(String), - insurance_charges_amount: T.nilable(Integer), - insurance_charges_currency: T.nilable(String), - no_show_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ), - one_way_drop_off_charges_amount: T.nilable(Integer), - one_way_drop_off_charges_currency: T.nilable(String), - renter_name: T.nilable(String), - weekly_rental_rate_amount: T.nilable(Integer), - weekly_rental_rate_currency: T.nilable(String) - } - ) - end - def to_hash - end + # The card network used to process this card authorization. + sig do + returns( + Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol + ) + end + attr_accessor :network - # Additional charges (gas, late fee, etc.) being billed. - module ExtraCharges - extend Increase::Internal::Type::Enum + # Network-specific identifiers for a specific request or transaction. + sig do + returns( + Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers + ) + end + attr_reader :network_identifiers - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers - # No extra charge - NO_EXTRA_CHARGE = - T.let( - :no_extra_charge, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # 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 - # Gas - GAS = - T.let( - :gas, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # The identifier of the Pending Transaction associated with this Card Increment. + sig { returns(T.nilable(String)) } + attr_accessor :pending_transaction_id - # Extra mileage - EXTRA_MILEAGE = - T.let( - :extra_mileage, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # The amount of this increment in the minor unit of the transaction's presentment + # currency. + sig { returns(Integer) } + attr_accessor :presentment_amount - # Late return - LATE_RETURN = - T.let( - :late_return, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + sig { returns(String) } + attr_accessor :presentment_currency - # One way service fee - ONE_WAY_SERVICE_FEE = - T.let( - :one_way_service_fee, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # The identifier of the Real-Time Decision sent to approve or decline this + # incremental authorization. + sig { returns(T.nilable(String)) } + attr_accessor :real_time_decision_id - # Parking violation - PARKING_VIOLATION = - T.let( - :parking_violation, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # A constant representing the object's type. For this resource it will always be + # `card_increment`. + sig do + returns( + Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol + ) + end + attr_accessor :type - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ] - ) - end - def self.values - end - end + # The updated authorization amount after this increment, in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :updated_authorization_amount - # An indicator that the cardholder is being billed for a reserved vehicle that was - # not actually rented (that is, a "no-show" charge). - module NoShowIndicator - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # A Card Increment object. This field will be present in the JSON response if and + # only if `category` is equal to `card_increment`. Card Increments increase the + # pending amount of an authorized transaction. + sig do + params( + id: String, + actioner: + Increase::CardPayment::Element::CardIncrement::Actioner::OrSymbol, + additional_amounts: + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::OrHash, + amount: Integer, + card_authorization_id: String, + currency: + Increase::CardPayment::Element::CardIncrement::Currency::OrSymbol, + network: + Increase::CardPayment::Element::CardIncrement::Network::OrSymbol, + network_identifiers: + Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers::OrHash, + network_risk_score: T.nilable(Integer), + pending_transaction_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + real_time_decision_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardIncrement::Type::OrSymbol, + updated_authorization_amount: Integer + ).returns(T.attached_class) + end + def self.new( + # The Card Increment identifier. + id:, + # Whether this authorization 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 amount of this increment in the minor unit of the transaction's currency. + # For dollars, for example, this is cents. + amount:, + # The identifier for the Card Authorization this increments. + card_authorization_id:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # currency. + currency:, + # The card network used to process this card authorization. + network:, + # 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:, + # The identifier of the Pending Transaction associated with this Card Increment. + pending_transaction_id:, + # The amount of this increment 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 identifier of the Real-Time Decision sent to approve or decline this + # incremental authorization. + real_time_decision_id:, + # A constant representing the object's type. For this resource it will always be + # `card_increment`. + type:, + # The updated authorization amount after this increment, in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + updated_authorization_amount: + ) + end - # Not applicable - NOT_APPLICABLE = - T.let( - :not_applicable, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ) + sig do + override.returns( + { + id: String, + actioner: + Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol, + additional_amounts: + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts, + amount: Integer, + card_authorization_id: String, + currency: + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol, + network: + Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol, + network_identifiers: + Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, + network_risk_score: T.nilable(Integer), + pending_transaction_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + real_time_decision_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol, + updated_authorization_amount: Integer + } + ) + end + def to_hash + end - # No show for specialized vehicle - NO_SHOW_FOR_SPECIALIZED_VEHICLE = - T.let( - :no_show_for_specialized_vehicle, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ) + # Whether this authorization 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 - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ] - ) - end - def self.values - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardIncrement::Actioner + ) end - end + OrSymbol = T.type_alias { T.any(Symbol, String) } - class Lodging < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging, - Increase::Internal::AnyHash - ) - end + # This object was actioned by the user through a real-time decision. + USER = + T.let( + :user, + Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol + ) - # Date the customer checked in. - sig { returns(T.nilable(Date)) } - attr_accessor :check_in_date + # This object was actioned by Increase without user intervention. + INCREASE = + T.let( + :increase, + Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol + ) - # Daily rate being charged for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :daily_room_rate_amount + # This object was actioned by the network, through stand-in processing. + NETWORK = + T.let( + :network, + Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - # rate. - sig { returns(T.nilable(String)) } - attr_accessor :daily_room_rate_currency + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardIncrement::Actioner::TaggedSymbol + ] + ) + end + def self.values + end + end - # Additional charges (phone, late check-out, etc.) being billed. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts, + Increase::Internal::AnyHash ) end - attr_accessor :extra_charges - - # Folio cash advances for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :folio_cash_advances_amount - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - # advances. - sig { returns(T.nilable(String)) } - attr_accessor :folio_cash_advances_currency + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic - # Food and beverage charges for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :food_beverage_charges_amount + sig do + params( + clinic: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic::OrHash + ) + ).void + end + attr_writer :clinic - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - # beverage charges. - sig { returns(T.nilable(String)) } - attr_accessor :food_beverage_charges_currency + # The part of this transaction amount that was for dental-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental + ) + ) + end + attr_reader :dental - # Indicator that the cardholder is being billed for a reserved room that was not - # actually used. - sig do - returns( + sig do + params( + dental: T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + Increase::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription ) - end - attr_accessor :no_show_indicator + ) + end + attr_reader :prescription - # Prepaid expenses being charged for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :prepaid_expenses_amount + sig do + params( + prescription: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - # expenses. - sig { returns(T.nilable(String)) } - attr_accessor :prepaid_expenses_currency + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge + ) + ) + end + attr_reader :surcharge - # Number of nights the room was rented. - sig { returns(T.nilable(Integer)) } - attr_accessor :room_nights + sig do + params( + surcharge: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge::OrHash + ) + ).void + end + attr_writer :surcharge - # Total room tax being charged. - sig { returns(T.nilable(Integer)) } - attr_accessor :total_room_tax_amount + # The total amount of a series of incremental authorizations, optionally provided. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative + ) + ) + end + attr_reader :total_cumulative - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - # tax. - sig { returns(T.nilable(String)) } - attr_accessor :total_room_tax_currency + sig do + params( + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative - # Total tax being charged for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :total_tax_amount + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare + ) + ) + end + attr_reader :total_healthcare - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :total_tax_currency + sig do + params( + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare::OrHash + ) + ).void + end + attr_writer :total_healthcare - # Fields specific to lodging. - sig do - params( - check_in_date: T.nilable(Date), - daily_room_rate_amount: T.nilable(Integer), - daily_room_rate_currency: T.nilable(String), - extra_charges: + # The part of this transaction amount that was for transit-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit + ) + ) + end + attr_reader :transit + + sig do + params( + transit: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit + + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown + ) + ) + end + attr_reader :unknown + + sig do + params( + unknown: + T.nilable( + Increase::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision + ) + ) + end + attr_reader :vision + + sig do + params( + vision: + T.nilable( + Increase::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardIncrement::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::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::OrSymbol + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic ), - folio_cash_advances_amount: T.nilable(Integer), - folio_cash_advances_currency: T.nilable(String), - food_beverage_charges_amount: T.nilable(Integer), - food_beverage_charges_currency: T.nilable(String), - no_show_indicator: + dental: T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::OrSymbol + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental ), - prepaid_expenses_amount: T.nilable(Integer), - prepaid_expenses_currency: T.nilable(String), - room_nights: T.nilable(Integer), - total_room_tax_amount: T.nilable(Integer), - total_room_tax_currency: T.nilable(String), - total_tax_amount: T.nilable(Integer), - total_tax_currency: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Date the customer checked in. - check_in_date:, - # Daily rate being charged for the room. - daily_room_rate_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - # rate. - daily_room_rate_currency:, - # Additional charges (phone, late check-out, etc.) being billed. - extra_charges:, - # Folio cash advances for the room. - folio_cash_advances_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - # advances. - folio_cash_advances_currency:, - # Food and beverage charges for the room. - food_beverage_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - # beverage charges. - food_beverage_charges_currency:, - # Indicator that the cardholder is being billed for a reserved room that was not - # actually used. - no_show_indicator:, - # Prepaid expenses being charged for the room. - prepaid_expenses_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - # expenses. - prepaid_expenses_currency:, - # Number of nights the room was rented. - room_nights:, - # Total room tax being charged. - total_room_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - # tax. - total_room_tax_currency:, - # Total tax being charged for the room. - total_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - # assessed. - total_tax_currency: + prescription: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision + ) + } ) - end + end + def to_hash + end + + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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 - override.returns( - { - check_in_date: T.nilable(Date), - daily_room_rate_amount: T.nilable(Integer), - daily_room_rate_currency: T.nilable(String), - extra_charges: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ), - folio_cash_advances_amount: T.nilable(Integer), - folio_cash_advances_currency: T.nilable(String), - food_beverage_charges_amount: T.nilable(Integer), - food_beverage_charges_currency: T.nilable(String), - no_show_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ), - prepaid_expenses_amount: T.nilable(Integer), - prepaid_expenses_currency: T.nilable(String), - room_nights: T.nilable(Integer), - total_room_tax_amount: T.nilable(Integer), - total_room_tax_currency: T.nilable(String), - total_tax_amount: T.nilable(Integer), - total_tax_currency: T.nilable(String) - } + params(amount: Integer, currency: String).returns( + T.attached_class ) end + def self.new( + # The amount in minor units of the `currency` field. + 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 - # Additional charges (phone, late check-out, etc.) being billed. - module ExtraCharges - extend Increase::Internal::Type::Enum + class Dental < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # No extra charge - NO_EXTRA_CHARGE = - T.let( - :no_extra_charge, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # Restaurant - RESTAURANT = - T.let( - :restaurant, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # Gift shop - GIFT_SHOP = - T.let( - :gift_shop, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # Mini bar - MINI_BAR = - T.let( - :mini_bar, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + class Prescription < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash ) + end - # Telephone - TELEPHONE = - T.let( - :telephone, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # Laundry - LAUNDRY = - T.let( - :laundry, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ] - ) - end - def self.values - end + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash end + end - # Indicator that the cardholder is being billed for a reserved room that was not - # actually used. - module NoShowIndicator - extend Increase::Internal::Type::Enum + class Surcharge < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Not applicable - NOT_APPLICABLE = - T.let( - :not_applicable, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # No show - NO_SHOW = - T.let( - :no_show, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ] - ) - end - def self.values - end + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash end end - # The format of the purchase identifier. - module PurchaseIdentifierFormat - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class TotalCumulative < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Free text - FREE_TEXT = - T.let( - :free_text, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - # Order number - ORDER_NUMBER = - T.let( - :order_number, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - # Rental agreement number - RENTAL_AGREEMENT_NUMBER = - T.let( - :rental_agreement_number, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - # Hotel folio number - HOTEL_FOLIO_NUMBER = - T.let( - :hotel_folio_number, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Invoice number - INVOICE_NUMBER = - T.let( - :invoice_number, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) + # 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 - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ] + params(amount: Integer, currency: String).returns( + T.attached_class ) end - def self.values + def self.new( + # The amount in minor units of the `currency` field. + 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 Travel < Increase::Internal::Type::BaseModel + class TotalHealthcare < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel, + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare, Increase::Internal::AnyHash ) end - # Ancillary purchases in addition to the airfare. + # The amount in minor units of the `currency` field. + 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 - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary - ) + params(amount: Integer, currency: String).returns( + T.attached_class ) end - attr_reader :ancillary + def self.new( + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - sig do - params( - ancillary: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::OrHash - ) - ).void + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash end - attr_writer :ancillary + end - # Indicates the computerized reservation system used to book the ticket. - sig { returns(T.nilable(String)) } - attr_accessor :computerized_reservation_system + class Transit < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit, + Increase::Internal::AnyHash + ) + end - # Indicates the reason for a credit to the cardholder. + # The amount in minor units of the `currency` field. + 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 - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + params(amount: Integer, currency: String).returns( + T.attached_class ) end - attr_accessor :credit_reason_indicator + def self.new( + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # Date of departure. - sig { returns(T.nilable(Date)) } - attr_accessor :departure_date + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # Code for the originating city or airport. - sig { returns(T.nilable(String)) } - attr_accessor :origination_city_airport_code + class Unknown < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash + ) + end - # Name of the passenger. - sig { returns(T.nilable(String)) } - attr_accessor :passenger_name + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Indicates whether this ticket is non-refundable. + # 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 - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ) + params(amount: Integer, currency: String).returns( + T.attached_class ) end - attr_accessor :restricted_ticket_indicator - - # Indicates why a ticket was changed. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ) - ) + def self.new( + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) end - attr_accessor :ticket_change_indicator - # Ticket number. - sig { returns(T.nilable(String)) } - attr_accessor :ticket_number + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # Code for the travel agency if the ticket was issued by a travel agency. - sig { returns(T.nilable(String)) } - attr_accessor :travel_agency_code + class Vision < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision, + Increase::Internal::AnyHash + ) + end - # Name of the travel agency if the ticket was issued by a travel agency. - sig { returns(T.nilable(String)) } - attr_accessor :travel_agency_name + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Fields specific to each leg of the journey. - sig do - returns( - T.nilable( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg - ] - ) - ) - end - attr_accessor :trip_legs + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # Fields specific to travel. + # The part of this transaction amount that was for vision-related services. sig do - params( - ancillary: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::OrHash - ), - computerized_reservation_system: T.nilable(String), - credit_reason_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::OrSymbol - ), - departure_date: T.nilable(Date), - origination_city_airport_code: T.nilable(String), - passenger_name: T.nilable(String), - restricted_ticket_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::OrSymbol - ), - ticket_change_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::OrSymbol - ), - ticket_number: T.nilable(String), - travel_agency_code: T.nilable(String), - travel_agency_name: T.nilable(String), - trip_legs: - T.nilable( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::OrHash - ] - ) - ).returns(T.attached_class) + params(amount: Integer, currency: String).returns( + T.attached_class + ) end def self.new( - # Ancillary purchases in addition to the airfare. - ancillary:, - # Indicates the computerized reservation system used to book the ticket. - computerized_reservation_system:, - # Indicates the reason for a credit to the cardholder. - credit_reason_indicator:, - # Date of departure. - departure_date:, - # Code for the originating city or airport. - origination_city_airport_code:, - # Name of the passenger. - passenger_name:, - # Indicates whether this ticket is non-refundable. - restricted_ticket_indicator:, - # Indicates why a ticket was changed. - ticket_change_indicator:, - # Ticket number. - ticket_number:, - # Code for the travel agency if the ticket was issued by a travel agency. - travel_agency_code:, - # Name of the travel agency if the ticket was issued by a travel agency. - travel_agency_name:, - # Fields specific to each leg of the journey. - trip_legs: + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) end - sig do - override.returns( - { - ancillary: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary - ), - computerized_reservation_system: T.nilable(String), - credit_reason_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ), - departure_date: T.nilable(Date), - origination_city_airport_code: T.nilable(String), - passenger_name: T.nilable(String), - restricted_ticket_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ), - ticket_change_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ), - ticket_number: T.nilable(String), - travel_agency_code: T.nilable(String), - travel_agency_name: T.nilable(String), - trip_legs: - T.nilable( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg - ] - ) - } - ) - end + sig { override.returns({ amount: Integer, currency: String }) } def to_hash end + end + end - class Ancillary < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary, - Increase::Internal::AnyHash - ) - end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + # currency. + module Currency + extend Increase::Internal::Type::Enum - # If this purchase has a connection or relationship to another purchase, such as a - # baggage fee for a passenger transport ticket, this field should contain the - # ticket document number for the other purchase. - sig { returns(T.nilable(String)) } - attr_accessor :connected_ticket_document_number + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardIncrement::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Indicates the reason for a credit to the cardholder. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) - ) - end - attr_accessor :credit_reason_indicator + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) - # Name of the passenger or description of the ancillary purchase. - sig { returns(T.nilable(String)) } - attr_accessor :passenger_name_or_description + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) - # Additional travel charges, such as baggage fees. - sig do - returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service - ] - ) - end - attr_accessor :services + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) - # Ticket document number. - sig { returns(T.nilable(String)) } - attr_accessor :ticket_document_number + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) - # Ancillary purchases in addition to the airfare. - sig do - params( - connected_ticket_document_number: T.nilable(String), - credit_reason_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::OrSymbol - ), - passenger_name_or_description: T.nilable(String), - services: - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::OrHash - ], - ticket_document_number: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # If this purchase has a connection or relationship to another purchase, such as a - # baggage fee for a passenger transport ticket, this field should contain the - # ticket document number for the other purchase. - connected_ticket_document_number:, - # Indicates the reason for a credit to the cardholder. - credit_reason_indicator:, - # Name of the passenger or description of the ancillary purchase. - passenger_name_or_description:, - # Additional travel charges, such as baggage fees. - services:, - # Ticket document number. - ticket_document_number: - ) - end + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) - sig do - override.returns( - { - connected_ticket_document_number: T.nilable(String), - credit_reason_indicator: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ), - passenger_name_or_description: T.nilable(String), - services: - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service - ], - ticket_document_number: T.nilable(String) - } - ) - end - def to_hash - end - - # Indicates the reason for a credit to the cardholder. - module CreditReasonIndicator - extend Increase::Internal::Type::Enum + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardIncrement::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end - # No credit - NO_CREDIT = - T.let( - :no_credit, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) + # The card network used to process this card authorization. + module Network + extend Increase::Internal::Type::Enum - # Passenger transport ancillary purchase cancellation - PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = - T.let( - :passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardIncrement::Network + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Airline ticket and passenger transport ancillary purchase cancellation - AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = - T.let( - :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) + # Visa + VISA = + T.let( + :visa, + Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol + ) - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardIncrement::Network::TaggedSymbol + ] + ) + end + def self.values + end + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ] - ) - end - def self.values - end - end + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, + Increase::Internal::AnyHash + ) + end - class Service < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service, - 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 - # Category of the ancillary service. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) - ) - end - attr_accessor :category + # 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 - # Sub-category of the ancillary service, free-form. - sig { returns(T.nilable(String)) } - attr_accessor :sub_category + # 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 - sig do - params( - category: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::OrSymbol - ), - sub_category: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Category of the ancillary service. - category:, - # Sub-category of the ancillary service, free-form. - sub_category: - ) - end + # 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( - { - category: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ), - sub_category: T.nilable(String) - } - ) - end - def to_hash - 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 - # Category of the ancillary service. - module Category - extend Increase::Internal::Type::Enum + # A constant representing the object's type. For this resource it will always be + # `card_increment`. + module Type + extend Increase::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardIncrement::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # None - NONE = - T.let( - :none, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + CARD_INCREMENT = + T.let( + :card_increment, + Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol + ) - # Bundled service - BUNDLED_SERVICE = - T.let( - :bundled_service, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardIncrement::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # Baggage fee - BAGGAGE_FEE = - T.let( - :baggage_fee, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + class CardRefund < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund, + Increase::Internal::AnyHash + ) + end - # Change fee - CHANGE_FEE = - T.let( - :change_fee, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The Card Refund identifier. + sig { returns(String) } + attr_accessor :id - # Cargo - CARGO = - T.let( - :cargo, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The amount in the minor unit of the transaction's settlement currency. For + # dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :amount - # Carbon offset - CARBON_OFFSET = - T.let( - :carbon_offset, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The ID of the Card Payment this transaction belongs to. + sig { returns(String) } + attr_accessor :card_payment_id - # Frequent flyer - FREQUENT_FLYER = - T.let( - :frequent_flyer, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Cashback debited for this transaction, if eligible. Cashback is paid out in + # aggregate, monthly. + sig do + returns( + T.nilable(Increase::CardPayment::Element::CardRefund::Cashback) + ) + end + attr_reader :cashback - # Gift card - GIFT_CARD = - T.let( - :gift_card, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + cashback: + T.nilable( + Increase::CardPayment::Element::CardRefund::Cashback::OrHash + ) + ).void + end + attr_writer :cashback - # Ground transport - GROUND_TRANSPORT = - T.let( - :ground_transport, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's settlement currency. + sig do + returns( + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) + end + attr_accessor :currency - # In-flight entertainment - IN_FLIGHT_ENTERTAINMENT = - T.let( - :in_flight_entertainment, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Interchange assessed as a part of this transaciton. + sig do + returns( + T.nilable(Increase::CardPayment::Element::CardRefund::Interchange) + ) + end + attr_reader :interchange - # Lounge - LOUNGE = - T.let( - :lounge, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + interchange: + T.nilable( + Increase::CardPayment::Element::CardRefund::Interchange::OrHash + ) + ).void + end + attr_writer :interchange - # Medical - MEDICAL = - T.let( - :medical, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + sig { returns(String) } + attr_accessor :merchant_acceptor_id - # Meal beverage - MEAL_BEVERAGE = - T.let( - :meal_beverage, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The 4-digit MCC describing the merchant's business. + sig { returns(String) } + attr_accessor :merchant_category_code - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The city the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_city - # Passenger assist fee - PASSENGER_ASSIST_FEE = - T.let( - :passenger_assist_fee, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The country the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_country - # Pets - PETS = - T.let( - :pets, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The name of the merchant. + sig { returns(String) } + attr_accessor :merchant_name - # Seat fees - SEAT_FEES = - T.let( - :seat_fees, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_postal_code - # Standby - STANDBY = - T.let( - :standby, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The state the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_state - # Service fee - SERVICE_FEE = - T.let( - :service_fee, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Network-specific identifiers for this refund. + sig do + returns( + Increase::CardPayment::Element::CardRefund::NetworkIdentifiers + ) + end + attr_reader :network_identifiers - # Store - STORE = - T.let( - :store, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardRefund::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers - # Travel service - TRAVEL_SERVICE = - T.let( - :travel_service, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The amount in the minor unit of the transaction's presentment currency. + sig { returns(Integer) } + attr_accessor :presentment_amount - # Unaccompanied travel - UNACCOMPANIED_TRAVEL = - T.let( - :unaccompanied_travel, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + sig { returns(String) } + attr_accessor :presentment_currency - # Upgrades - UPGRADES = - T.let( - :upgrades, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Additional details about the card purchase, such as tax and industry-specific + # fields. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails + ) + ) + end + attr_reader :purchase_details - # Wi-fi - WIFI = - T.let( - :wifi, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + purchase_details: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::OrHash + ) + ).void + end + attr_writer :purchase_details - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end + # The identifier of the Transaction associated with this Transaction. + sig { returns(String) } + attr_accessor :transaction_id - # Indicates the reason for a credit to the cardholder. - module CreditReasonIndicator - extend Increase::Internal::Type::Enum + # A constant representing the object's type. For this resource it will always be + # `card_refund`. + sig do + returns( + Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol + ) + end + attr_accessor :type - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # A Card Refund object. This field will be present in the JSON response if and + # only if `category` is equal to `card_refund`. Card Refunds move money back to + # the cardholder. While they are usually connected to a Card Settlement an + # acquirer can also refund money directly to a card without relation to a + # transaction. + sig do + params( + id: String, + amount: Integer, + card_payment_id: String, + cashback: + T.nilable( + Increase::CardPayment::Element::CardRefund::Cashback::OrHash + ), + currency: + Increase::CardPayment::Element::CardRefund::Currency::OrSymbol, + interchange: + T.nilable( + Increase::CardPayment::Element::CardRefund::Interchange::OrHash + ), + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_name: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network_identifiers: + Increase::CardPayment::Element::CardRefund::NetworkIdentifiers::OrHash, + presentment_amount: Integer, + presentment_currency: String, + purchase_details: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::OrHash + ), + transaction_id: String, + type: Increase::CardPayment::Element::CardRefund::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The Card Refund identifier. + id:, + # The amount in the minor unit of the transaction's settlement currency. For + # dollars, for example, this is cents. + amount:, + # The ID of the Card Payment this transaction belongs to. + card_payment_id:, + # Cashback debited for this transaction, if eligible. Cashback is paid out in + # aggregate, monthly. + cashback:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's settlement currency. + currency:, + # Interchange assessed as a part of this transaciton. + interchange:, + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + merchant_acceptor_id:, + # The 4-digit MCC describing the merchant's business. + merchant_category_code:, + # The city the merchant resides in. + merchant_city:, + # The country the merchant resides in. + merchant_country:, + # The name of the merchant. + merchant_name:, + # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. + merchant_postal_code:, + # The state the merchant resides in. + merchant_state:, + # Network-specific identifiers for this refund. + network_identifiers:, + # The 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:, + # Additional details about the card purchase, such as tax and industry-specific + # fields. + purchase_details:, + # 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_refund`. + type: + ) + end - # No credit - NO_CREDIT = - T.let( - :no_credit, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + sig do + override.returns( + { + id: String, + amount: Integer, + card_payment_id: String, + cashback: + T.nilable( + Increase::CardPayment::Element::CardRefund::Cashback + ), + currency: + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol, + interchange: + T.nilable( + Increase::CardPayment::Element::CardRefund::Interchange + ), + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_name: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network_identifiers: + Increase::CardPayment::Element::CardRefund::NetworkIdentifiers, + presentment_amount: Integer, + presentment_currency: String, + purchase_details: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails + ), + transaction_id: String, + type: + Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol + } + ) + end + def to_hash + end - # Passenger transport ancillary purchase cancellation - PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = - T.let( - :passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + class Cashback < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::Cashback, + Increase::Internal::AnyHash + ) + end - # Airline ticket and passenger transport ancillary purchase cancellation - AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = - T.let( - :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # The cashback amount given as a string containing a decimal number. The amount is + # a positive number if it will be credited to you (e.g., settlements) and a + # negative number if it will be debited (e.g., refunds). + sig { returns(String) } + attr_accessor :amount - # Airline ticket cancellation - AIRLINE_TICKET_CANCELLATION = - T.let( - :airline_ticket_cancellation, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + sig do + returns( + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) + end + attr_accessor :currency - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # Cashback debited for this transaction, if eligible. Cashback is paid out in + # aggregate, monthly. + sig do + params( + amount: String, + currency: + Increase::CardPayment::Element::CardRefund::Cashback::Currency::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The cashback amount given as a string containing a decimal number. The amount is + # a positive number if it will be credited to you (e.g., settlements) and a + # negative number if it will be debited (e.g., refunds). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + currency: + ) + end - # Partial refund of airline ticket - PARTIAL_REFUND_OF_AIRLINE_TICKET = - T.let( - :partial_refund_of_airline_ticket, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + sig do + override.returns( + { + amount: String, + currency: + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + } + ) + end + def to_hash + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ] + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::Cashback::Currency ) end - def self.values - end - end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Indicates whether this ticket is non-refundable. - module RestrictedTicketIndicator - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # No restrictions - NO_RESTRICTIONS = - T.let( - :no_restrictions, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ) + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) - # Restricted non-refundable ticket - RESTRICTED_NON_REFUNDABLE_TICKET = - T.let( - :restricted_non_refundable_ticket, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ) + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ] - ) - end - def self.values - end - end + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) - # Indicates why a ticket was changed. - module TicketChangeIndicator - extend Increase::Internal::Type::Enum + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) - # None - NONE = - T.let( - :none, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ) + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ) - # Change to existing ticket - CHANGE_TO_EXISTING_TICKET = - T.let( - :change_to_existing_ticket, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::Cashback::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # New ticket - NEW_TICKET = - T.let( - :new_ticket, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's settlement currency. + module Currency + extend Increase::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ] - ) - end - def self.values - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::Currency + ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } - class TripLeg < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg, - Increase::Internal::AnyHash - ) - end + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) - # Carrier code (e.g., United Airlines, Jet Blue, etc.). - sig { returns(T.nilable(String)) } - attr_accessor :carrier_code + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) - # Code for the destination city or airport. - sig { returns(T.nilable(String)) } - attr_accessor :destination_city_airport_code + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) - # Fare basis code. - sig { returns(T.nilable(String)) } - attr_accessor :fare_basis_code + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) - # Flight number. - sig { returns(T.nilable(String)) } - attr_accessor :flight_number + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) - # Service class (e.g., first class, business class, etc.). - sig { returns(T.nilable(String)) } - attr_accessor :service_class + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ) - # Indicates whether a stopover is allowed on this ticket. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) - ) - end - attr_accessor :stop_over_code + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end - sig do - params( - carrier_code: T.nilable(String), - destination_city_airport_code: T.nilable(String), - fare_basis_code: T.nilable(String), - flight_number: T.nilable(String), - service_class: T.nilable(String), - stop_over_code: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::OrSymbol - ) - ).returns(T.attached_class) - end - def self.new( - # Carrier code (e.g., United Airlines, Jet Blue, etc.). - carrier_code:, - # Code for the destination city or airport. - destination_city_airport_code:, - # Fare basis code. - fare_basis_code:, - # Flight number. - flight_number:, - # Service class (e.g., first class, business class, etc.). - service_class:, - # Indicates whether a stopover is allowed on this ticket. - stop_over_code: + class Interchange < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::Interchange, + Increase::Internal::AnyHash ) - end + end - sig do - override.returns( - { - carrier_code: T.nilable(String), - destination_city_airport_code: T.nilable(String), - fare_basis_code: T.nilable(String), - flight_number: T.nilable(String), - service_class: T.nilable(String), - stop_over_code: - T.nilable( - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) - } - ) - end - def to_hash - end + # The interchange amount given as a string containing a decimal number in major + # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + # credited to Increase (e.g., settlements) and a negative number if it is debited + # (e.g., refunds). + sig { returns(String) } + attr_accessor :amount - # Indicates whether a stopover is allowed on this ticket. - module StopOverCode - extend Increase::Internal::Type::Enum + # The card network specific interchange code. + sig { returns(T.nilable(String)) } + attr_accessor :code - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + # reimbursement. + sig do + returns( + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + end + attr_accessor :currency - # None - NONE = - T.let( - :none, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + # Interchange assessed as a part of this transaciton. + sig do + params( + amount: String, + code: T.nilable(String), + currency: + Increase::CardPayment::Element::CardRefund::Interchange::Currency::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The interchange amount given as a string containing a decimal number in major + # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + # credited to Increase (e.g., settlements) and a negative number if it is debited + # (e.g., refunds). + amount:, + # The card network specific interchange code. + code:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + # reimbursement. + currency: + ) + end - # Stop over allowed - STOP_OVER_ALLOWED = - T.let( - :stop_over_allowed, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + sig do + override.returns( + { + amount: String, + code: T.nilable(String), + currency: + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + } + ) + end + def to_hash + end - # Stop over not allowed - STOP_OVER_NOT_ALLOWED = - T.let( - :stop_over_not_allowed, - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + # reimbursement. + module Currency + extend Increase::Internal::Type::Enum - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ] - ) - end - def self.values - end + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::Interchange::Currency + ) end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::Interchange::Currency::TaggedSymbol + ] + ) + end + def self.values end end end - # A constant representing the object's type. For this resource it will always be - # `card_refund`. - module Type - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all(Symbol, Increase::CardPayment::Element::CardRefund::Type) + T.any( + Increase::CardPayment::Element::CardRefund::NetworkIdentifiers, + Increase::Internal::AnyHash + ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - CARD_REFUND = - T.let( - :card_refund, - Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol - ) + # A network assigned business ID that identifies the acquirer that processed this + # transaction. + sig { returns(String) } + attr_accessor :acquirer_business_id + + # A globally unique identifier for this settlement. + sig { returns(String) } + attr_accessor :acquirer_reference_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 this refund. + sig do + params( + acquirer_business_id: String, + acquirer_reference_number: String, + transaction_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # A network assigned business ID that identifies the acquirer that processed this + # transaction. + acquirer_business_id:, + # A globally unique identifier for this settlement. + acquirer_reference_number:, + # A globally unique transaction identifier provided by the card network, used + # across multiple life-cycle requests. + transaction_id: + ) + end sig do override.returns( - T::Array[ - Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol - ] + { + acquirer_business_id: String, + acquirer_reference_number: String, + transaction_id: T.nilable(String) + } ) end - def self.values + def to_hash end end - end - class CardReversal < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardReversal, - Increase::Internal::AnyHash + class PurchaseDetails < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails, + Increase::Internal::AnyHash + ) + end + + # Fields specific to car rentals. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental + ) ) end + attr_reader :car_rental - # The Card Reversal identifier. - sig { returns(String) } - attr_accessor :id + sig do + params( + car_rental: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::OrHash + ) + ).void + end + attr_writer :car_rental - # The identifier for the Card Authorization this reverses. - sig { returns(String) } - attr_accessor :card_authorization_id + # An identifier from the merchant for the customer or consumer. + sig { returns(T.nilable(String)) } + attr_accessor :customer_reference_identifier - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # currency. - sig do - returns( - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # The state or provincial tax amount in minor units. + sig { returns(T.nilable(Integer)) } + attr_accessor :local_tax_amount - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - sig { returns(String) } - attr_accessor :merchant_acceptor_id + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :local_tax_currency - # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - # card is transacting with. - sig { returns(String) } - attr_accessor :merchant_category_code + # Fields specific to lodging. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging + ) + ) + end + attr_reader :lodging - # The city the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_city + sig do + params( + lodging: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::OrHash + ) + ).void + end + attr_writer :lodging - # The country the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_country + # The national tax amount in minor units. + sig { returns(T.nilable(Integer)) } + attr_accessor :national_tax_amount - # The merchant descriptor of the merchant the card is transacting with. - sig { returns(String) } - attr_accessor :merchant_descriptor + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :national_tax_currency - # 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 + # An identifier from the merchant for the purchase to the issuer and cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :purchase_identifier - # The state the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_state + # The format of the purchase identifier. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + ) + end + attr_accessor :purchase_identifier_format - # The card network used to process this card authorization. - sig do - returns( - Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol - ) - end - attr_accessor :network + # Fields specific to travel. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel + ) + ) + end + attr_reader :travel - # Network-specific identifiers for a specific request or transaction. - sig do - returns( - Increase::CardPayment::Element::CardReversal::NetworkIdentifiers + sig do + params( + travel: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::OrHash + ) + ).void + end + attr_writer :travel + + # Additional details about the card purchase, such as tax and industry-specific + # fields. + sig do + params( + car_rental: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::OrHash + ), + customer_reference_identifier: T.nilable(String), + local_tax_amount: T.nilable(Integer), + local_tax_currency: T.nilable(String), + lodging: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::OrHash + ), + national_tax_amount: T.nilable(Integer), + national_tax_currency: T.nilable(String), + purchase_identifier: T.nilable(String), + purchase_identifier_format: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::OrSymbol + ), + travel: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Fields specific to car rentals. + car_rental:, + # An identifier from the merchant for the customer or consumer. + customer_reference_identifier:, + # The state or provincial tax amount in minor units. + local_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + local_tax_currency:, + # Fields specific to lodging. + lodging:, + # The national tax amount in minor units. + national_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + national_tax_currency:, + # An identifier from the merchant for the purchase to the issuer and cardholder. + purchase_identifier:, + # The format of the purchase identifier. + purchase_identifier_format:, + # Fields specific to travel. + travel: ) - end - attr_reader :network_identifiers + end - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardReversal::NetworkIdentifiers::OrHash - ).void - end - attr_writer :network_identifiers + sig do + override.returns( + { + car_rental: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental + ), + customer_reference_identifier: T.nilable(String), + local_tax_amount: T.nilable(Integer), + local_tax_currency: T.nilable(String), + lodging: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging + ), + national_tax_amount: T.nilable(Integer), + national_tax_currency: T.nilable(String), + purchase_identifier: T.nilable(String), + purchase_identifier_format: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ), + travel: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel + ) + } + ) + end + def to_hash + end - # The identifier of the Pending Transaction associated with this Card Reversal. - sig { returns(T.nilable(String)) } - attr_accessor :pending_transaction_id + class CarRental < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental, + Increase::Internal::AnyHash + ) + end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # presentment currency. - sig { returns(String) } - attr_accessor :presentment_currency + # Code indicating the vehicle's class. + sig { returns(T.nilable(String)) } + attr_accessor :car_class_code - # The amount of this reversal in the minor unit of the transaction's currency. For - # dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :reversal_amount + # Date the customer picked up the car or, in the case of a no-show or pre-pay + # transaction, the scheduled pick up date. + sig { returns(T.nilable(Date)) } + attr_accessor :checkout_date - # The amount of this reversal in the minor unit of the transaction's presentment - # currency. For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :reversal_presentment_amount + # Daily rate being charged for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_rental_rate_amount - # Why this reversal was initiated. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ) - ) - end - attr_accessor :reversal_reason + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + # rate. + sig { returns(T.nilable(String)) } + attr_accessor :daily_rental_rate_currency - # The terminal identifier (commonly abbreviated as TID) of the terminal the card - # is transacting with. - sig { returns(T.nilable(String)) } - attr_accessor :terminal_id + # Number of days the vehicle was rented. + sig { returns(T.nilable(Integer)) } + attr_accessor :days_rented - # A constant representing the object's type. For this resource it will always be - # `card_reversal`. - sig do - returns( - Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol - ) - end - attr_accessor :type - - # The amount left pending on the Card Authorization in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :updated_authorization_amount - - # The amount left pending on the Card Authorization in the minor unit of the - # transaction's presentment currency. For dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :updated_authorization_presentment_amount - - # A Card Reversal object. This field will be present in the JSON response if and - # only if `category` is equal to `card_reversal`. Card Reversals cancel parts of - # or the entirety of an existing Card Authorization. - sig do - params( - id: String, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardReversal::Currency::OrSymbol, - merchant_acceptor_id: String, - merchant_category_code: String, - merchant_city: T.nilable(String), - merchant_country: T.nilable(String), - merchant_descriptor: String, - merchant_postal_code: T.nilable(String), - merchant_state: T.nilable(String), - network: - Increase::CardPayment::Element::CardReversal::Network::OrSymbol, - network_identifiers: - Increase::CardPayment::Element::CardReversal::NetworkIdentifiers::OrHash, - pending_transaction_id: T.nilable(String), - presentment_currency: String, - reversal_amount: Integer, - reversal_presentment_amount: Integer, - reversal_reason: - T.nilable( - Increase::CardPayment::Element::CardReversal::ReversalReason::OrSymbol - ), - terminal_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardReversal::Type::OrSymbol, - updated_authorization_amount: Integer, - updated_authorization_presentment_amount: Integer - ).returns(T.attached_class) - end - def self.new( - # The Card Reversal identifier. - id:, - # The identifier for the Card Authorization this reverses. - card_authorization_id:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # currency. - currency:, - # 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:, - # The card network used to process this card authorization. - network:, - # Network-specific identifiers for a specific request or transaction. - network_identifiers:, - # The identifier of the Pending Transaction associated with this Card Reversal. - pending_transaction_id:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # presentment currency. - presentment_currency:, - # The amount of this reversal in the minor unit of the transaction's currency. For - # dollars, for example, this is cents. - reversal_amount:, - # The amount of this reversal in the minor unit of the transaction's presentment - # currency. For dollars, for example, this is cents. - reversal_presentment_amount:, - # Why this reversal was initiated. - reversal_reason:, - # The terminal identifier (commonly abbreviated as TID) of the terminal the card - # is transacting with. - terminal_id:, - # A constant representing the object's type. For this resource it will always be - # `card_reversal`. - type:, - # The amount left pending on the Card Authorization in the minor unit of the - # transaction's currency. For dollars, for example, this is cents. - updated_authorization_amount:, - # The amount left pending on the Card Authorization in the minor unit of the - # transaction's presentment currency. For dollars, for example, this is cents. - updated_authorization_presentment_amount: - ) - end - - sig do - override.returns( - { - id: String, - card_authorization_id: String, - currency: - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol, - merchant_acceptor_id: String, - merchant_category_code: String, - merchant_city: T.nilable(String), - merchant_country: T.nilable(String), - merchant_descriptor: String, - merchant_postal_code: T.nilable(String), - merchant_state: T.nilable(String), - network: - Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol, - network_identifiers: - Increase::CardPayment::Element::CardReversal::NetworkIdentifiers, - pending_transaction_id: T.nilable(String), - presentment_currency: String, - reversal_amount: Integer, - reversal_presentment_amount: Integer, - reversal_reason: + # Additional charges (gas, late fee, etc.) being billed. + sig do + returns( T.nilable( - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ), - terminal_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol, - updated_authorization_amount: Integer, - updated_authorization_presentment_amount: Integer - } - ) - end - def to_hash - end - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's - # currency. - module Currency - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardReversal::Currency + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :extra_charges - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) + # Fuel charges for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :fuel_charges_amount - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :fuel_charges_currency - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) + # Any insurance being charged for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :insurance_charges_amount - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + # charges assessed. + sig { returns(T.nilable(String)) } + attr_accessor :insurance_charges_currency - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) + # An indicator that the cardholder is being billed for a reserved vehicle that was + # not actually rented (that is, a "no-show" charge). + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ) + ) + end + attr_accessor :no_show_indicator - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ) + # Charges for returning the vehicle at a different location than where it was + # picked up. + sig { returns(T.nilable(Integer)) } + attr_accessor :one_way_drop_off_charges_amount - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol - ] - ) - end - def self.values - end - end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + # drop-off charges assessed. + sig { returns(T.nilable(String)) } + attr_accessor :one_way_drop_off_charges_currency - # The card network used to process this card authorization. - module Network - extend Increase::Internal::Type::Enum + # Name of the person renting the vehicle. + sig { returns(T.nilable(String)) } + attr_accessor :renter_name - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardReversal::Network - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Weekly rate being charged for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :weekly_rental_rate_amount - # Visa - VISA = - T.let( - :visa, - Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + # rental rate. + sig { returns(T.nilable(String)) } + attr_accessor :weekly_rental_rate_currency - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol - ] + # Fields specific to car rentals. + sig do + params( + car_class_code: T.nilable(String), + checkout_date: T.nilable(Date), + daily_rental_rate_amount: T.nilable(Integer), + daily_rental_rate_currency: T.nilable(String), + days_rented: T.nilable(Integer), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::OrSymbol + ), + fuel_charges_amount: T.nilable(Integer), + fuel_charges_currency: T.nilable(String), + insurance_charges_amount: T.nilable(Integer), + insurance_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::OrSymbol + ), + one_way_drop_off_charges_amount: T.nilable(Integer), + one_way_drop_off_charges_currency: T.nilable(String), + renter_name: T.nilable(String), + weekly_rental_rate_amount: T.nilable(Integer), + weekly_rental_rate_currency: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Code indicating the vehicle's class. + car_class_code:, + # Date the customer picked up the car or, in the case of a no-show or pre-pay + # transaction, the scheduled pick up date. + checkout_date:, + # Daily rate being charged for the vehicle. + daily_rental_rate_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + # rate. + daily_rental_rate_currency:, + # Number of days the vehicle was rented. + days_rented:, + # Additional charges (gas, late fee, etc.) being billed. + extra_charges:, + # Fuel charges for the vehicle. + fuel_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + # assessed. + fuel_charges_currency:, + # Any insurance being charged for the vehicle. + insurance_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + # charges assessed. + insurance_charges_currency:, + # An indicator that the cardholder is being billed for a reserved vehicle that was + # not actually rented (that is, a "no-show" charge). + no_show_indicator:, + # Charges for returning the vehicle at a different location than where it was + # picked up. + one_way_drop_off_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + # drop-off charges assessed. + one_way_drop_off_charges_currency:, + # Name of the person renting the vehicle. + renter_name:, + # Weekly rate being charged for the vehicle. + weekly_rental_rate_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + # rental rate. + weekly_rental_rate_currency: ) - end - def self.values - end - end + end - class NetworkIdentifiers < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardReversal::NetworkIdentifiers, - Increase::Internal::AnyHash + sig do + override.returns( + { + car_class_code: T.nilable(String), + checkout_date: T.nilable(Date), + daily_rental_rate_amount: T.nilable(Integer), + daily_rental_rate_currency: T.nilable(String), + days_rented: T.nilable(Integer), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ), + fuel_charges_amount: T.nilable(Integer), + fuel_charges_currency: T.nilable(String), + insurance_charges_amount: T.nilable(Integer), + insurance_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ), + one_way_drop_off_charges_amount: T.nilable(Integer), + one_way_drop_off_charges_currency: T.nilable(String), + renter_name: T.nilable(String), + weekly_rental_rate_amount: T.nilable(Integer), + weekly_rental_rate_currency: T.nilable(String) + } ) end + def to_hash + 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 + # Additional charges (gas, late fee, etc.) being billed. + module ExtraCharges + extend Increase::Internal::Type::Enum - # 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 + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # 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 + # No extra charge + NO_EXTRA_CHARGE = + T.let( + :no_extra_charge, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - # 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 + # Gas + GAS = + T.let( + :gas, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - 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 + # Extra mileage + EXTRA_MILEAGE = + T.let( + :extra_mileage, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - # Why this reversal was initiated. - module ReversalReason - extend Increase::Internal::Type::Enum + # Late return + LATE_RETURN = + T.let( + :late_return, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardReversal::ReversalReason - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # One way service fee + ONE_WAY_SERVICE_FEE = + T.let( + :one_way_service_fee, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - # The Card Reversal was initiated at the customer's request. - REVERSED_BY_CUSTOMER = - T.let( - :reversed_by_customer, - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ) + # Parking violation + PARKING_VIOLATION = + T.let( + :parking_violation, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - # The Card Reversal was initiated by the network or acquirer. - REVERSED_BY_NETWORK_OR_ACQUIRER = - T.let( - :reversed_by_network_or_acquirer, - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ] + ) + end + def self.values + end + end - # The Card Reversal was initiated by the point of sale device. - REVERSED_BY_POINT_OF_SALE = - T.let( - :reversed_by_point_of_sale, - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ) + # An indicator that the cardholder is being billed for a reserved vehicle that was + # not actually rented (that is, a "no-show" charge). + module NoShowIndicator + extend Increase::Internal::Type::Enum - # The Card Reversal was a partial reversal, for any reason. - PARTIAL_REVERSAL = - T.let( - :partial_reversal, - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol - ] - ) - end - def self.values - end - end + # Not applicable + NOT_APPLICABLE = + T.let( + :not_applicable, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ) - # A constant representing the object's type. For this resource it will always be - # `card_reversal`. - module Type - extend Increase::Internal::Type::Enum + # No show for specialized vehicle + NO_SHOW_FOR_SPECIALIZED_VEHICLE = + T.let( + :no_show_for_specialized_vehicle, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardReversal::Type - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ] + ) + end + def self.values + end end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - CARD_REVERSAL = - T.let( - :card_reversal, - Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - class CardSettlement < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement, - Increase::Internal::AnyHash - ) end - # The Card Settlement identifier. - sig { returns(String) } - attr_accessor :id - - # The amount in the minor unit of the transaction's settlement currency. For - # dollars, for example, this is cents. - sig { returns(Integer) } - attr_accessor :amount + class Lodging < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging, + Increase::Internal::AnyHash + ) + end - # The Card Authorization that was created prior to this Card Settlement, if one - # exists. - sig { returns(T.nilable(String)) } - attr_accessor :card_authorization + # Date the customer checked in. + sig { returns(T.nilable(Date)) } + attr_accessor :check_in_date - # The ID of the Card Payment this transaction belongs to. - sig { returns(String) } - attr_accessor :card_payment_id + # Daily rate being charged for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_room_rate_amount - # Cashback earned on this transaction, if eligible. Cashback is paid out in - # aggregate, monthly. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::Cashback - ) - ) - end - attr_reader :cashback + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + # rate. + sig { returns(T.nilable(String)) } + attr_accessor :daily_room_rate_currency - sig do - params( - cashback: - T.nilable( - Increase::CardPayment::Element::CardSettlement::Cashback::OrHash + # Additional charges (phone, late check-out, etc.) being billed. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) ) - ).void - end - attr_writer :cashback - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's settlement currency. - sig do - returns( - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) - end - attr_accessor :currency + end + attr_accessor :extra_charges - # Interchange assessed as a part of this transaction. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::Interchange - ) - ) - end - attr_reader :interchange + # Folio cash advances for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :folio_cash_advances_amount - sig do - params( - interchange: - T.nilable( - Increase::CardPayment::Element::CardSettlement::Interchange::OrHash - ) - ).void - end - attr_writer :interchange + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + # advances. + sig { returns(T.nilable(String)) } + attr_accessor :folio_cash_advances_currency - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - sig { returns(String) } - attr_accessor :merchant_acceptor_id + # Food and beverage charges for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :food_beverage_charges_amount - # The 4-digit MCC describing the merchant's business. - sig { returns(String) } - attr_accessor :merchant_category_code + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and + # beverage charges. + sig { returns(T.nilable(String)) } + attr_accessor :food_beverage_charges_currency - # The city the merchant resides in. - sig { returns(String) } - attr_accessor :merchant_city + # Indicator that the cardholder is being billed for a reserved room that was not + # actually used. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ) + ) + end + attr_accessor :no_show_indicator - # The country the merchant resides in. - sig { returns(String) } - attr_accessor :merchant_country + # Prepaid expenses being charged for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :prepaid_expenses_amount - # The name of the merchant. - sig { returns(String) } - attr_accessor :merchant_name + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + # expenses. + sig { returns(T.nilable(String)) } + attr_accessor :prepaid_expenses_currency - # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_postal_code + # Number of nights the room was rented. + sig { returns(T.nilable(Integer)) } + attr_accessor :room_nights - # The state the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_state + # Total room tax being charged. + sig { returns(T.nilable(Integer)) } + attr_accessor :total_room_tax_amount - # Network-specific identifiers for this refund. - sig do - returns( - Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers - ) - end - attr_reader :network_identifiers + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + # tax. + sig { returns(T.nilable(String)) } + attr_accessor :total_room_tax_currency - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers::OrHash - ).void - end - attr_writer :network_identifiers + # Total tax being charged for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :total_tax_amount - # The identifier of the Pending Transaction associated with this Transaction. - sig { returns(T.nilable(String)) } - attr_accessor :pending_transaction_id + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :total_tax_currency - # The amount in the minor unit of the transaction's presentment currency. - sig { returns(Integer) } + # Fields specific to lodging. + sig do + params( + check_in_date: T.nilable(Date), + daily_room_rate_amount: T.nilable(Integer), + daily_room_rate_currency: T.nilable(String), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::OrSymbol + ), + folio_cash_advances_amount: T.nilable(Integer), + folio_cash_advances_currency: T.nilable(String), + food_beverage_charges_amount: T.nilable(Integer), + food_beverage_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::OrSymbol + ), + prepaid_expenses_amount: T.nilable(Integer), + prepaid_expenses_currency: T.nilable(String), + room_nights: T.nilable(Integer), + total_room_tax_amount: T.nilable(Integer), + total_room_tax_currency: T.nilable(String), + total_tax_amount: T.nilable(Integer), + total_tax_currency: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Date the customer checked in. + check_in_date:, + # Daily rate being charged for the room. + daily_room_rate_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + # rate. + daily_room_rate_currency:, + # Additional charges (phone, late check-out, etc.) being billed. + extra_charges:, + # Folio cash advances for the room. + folio_cash_advances_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + # advances. + folio_cash_advances_currency:, + # Food and beverage charges for the room. + food_beverage_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and + # beverage charges. + food_beverage_charges_currency:, + # Indicator that the cardholder is being billed for a reserved room that was not + # actually used. + no_show_indicator:, + # Prepaid expenses being charged for the room. + prepaid_expenses_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + # expenses. + prepaid_expenses_currency:, + # Number of nights the room was rented. + room_nights:, + # Total room tax being charged. + total_room_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + # tax. + total_room_tax_currency:, + # Total tax being charged for the room. + total_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + # assessed. + total_tax_currency: + ) + end + + sig do + override.returns( + { + check_in_date: T.nilable(Date), + daily_room_rate_amount: T.nilable(Integer), + daily_room_rate_currency: T.nilable(String), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ), + folio_cash_advances_amount: T.nilable(Integer), + folio_cash_advances_currency: T.nilable(String), + food_beverage_charges_amount: T.nilable(Integer), + food_beverage_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ), + prepaid_expenses_amount: T.nilable(Integer), + prepaid_expenses_currency: T.nilable(String), + room_nights: T.nilable(Integer), + total_room_tax_amount: T.nilable(Integer), + total_room_tax_currency: T.nilable(String), + total_tax_amount: T.nilable(Integer), + total_tax_currency: T.nilable(String) + } + ) + end + def to_hash + end + + # Additional charges (phone, late check-out, etc.) being billed. + module ExtraCharges + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # No extra charge + NO_EXTRA_CHARGE = + T.let( + :no_extra_charge, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Restaurant + RESTAURANT = + T.let( + :restaurant, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Gift shop + GIFT_SHOP = + T.let( + :gift_shop, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Mini bar + MINI_BAR = + T.let( + :mini_bar, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Telephone + TELEPHONE = + T.let( + :telephone, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Laundry + LAUNDRY = + T.let( + :laundry, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Indicator that the cardholder is being billed for a reserved room that was not + # actually used. + module NoShowIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Not applicable + NOT_APPLICABLE = + T.let( + :not_applicable, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ) + + # No show + NO_SHOW = + T.let( + :no_show, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The format of the purchase identifier. + module PurchaseIdentifierFormat + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Free text + FREE_TEXT = + T.let( + :free_text, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + + # Order number + ORDER_NUMBER = + T.let( + :order_number, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + + # Rental agreement number + RENTAL_AGREEMENT_NUMBER = + T.let( + :rental_agreement_number, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + + # Hotel folio number + HOTEL_FOLIO_NUMBER = + T.let( + :hotel_folio_number, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + + # Invoice number + INVOICE_NUMBER = + T.let( + :invoice_number, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Travel < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel, + Increase::Internal::AnyHash + ) + end + + # Ancillary purchases in addition to the airfare. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary + ) + ) + end + attr_reader :ancillary + + sig do + params( + ancillary: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::OrHash + ) + ).void + end + attr_writer :ancillary + + # Indicates the computerized reservation system used to book the ticket. + sig { returns(T.nilable(String)) } + attr_accessor :computerized_reservation_system + + # Indicates the reason for a credit to the cardholder. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + ) + end + attr_accessor :credit_reason_indicator + + # Date of departure. + sig { returns(T.nilable(Date)) } + attr_accessor :departure_date + + # Code for the originating city or airport. + sig { returns(T.nilable(String)) } + attr_accessor :origination_city_airport_code + + # Name of the passenger. + sig { returns(T.nilable(String)) } + attr_accessor :passenger_name + + # Indicates whether this ticket is non-refundable. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ) + ) + end + attr_accessor :restricted_ticket_indicator + + # Indicates why a ticket was changed. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) + ) + end + attr_accessor :ticket_change_indicator + + # Ticket number. + sig { returns(T.nilable(String)) } + attr_accessor :ticket_number + + # Code for the travel agency if the ticket was issued by a travel agency. + sig { returns(T.nilable(String)) } + attr_accessor :travel_agency_code + + # Name of the travel agency if the ticket was issued by a travel agency. + sig { returns(T.nilable(String)) } + attr_accessor :travel_agency_name + + # Fields specific to each leg of the journey. + sig do + returns( + T.nilable( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg + ] + ) + ) + end + attr_accessor :trip_legs + + # Fields specific to travel. + sig do + params( + ancillary: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::OrHash + ), + computerized_reservation_system: T.nilable(String), + credit_reason_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::OrSymbol + ), + departure_date: T.nilable(Date), + origination_city_airport_code: T.nilable(String), + passenger_name: T.nilable(String), + restricted_ticket_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::OrSymbol + ), + ticket_change_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::OrSymbol + ), + ticket_number: T.nilable(String), + travel_agency_code: T.nilable(String), + travel_agency_name: T.nilable(String), + trip_legs: + T.nilable( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::OrHash + ] + ) + ).returns(T.attached_class) + end + def self.new( + # Ancillary purchases in addition to the airfare. + ancillary:, + # Indicates the computerized reservation system used to book the ticket. + computerized_reservation_system:, + # Indicates the reason for a credit to the cardholder. + credit_reason_indicator:, + # Date of departure. + departure_date:, + # Code for the originating city or airport. + origination_city_airport_code:, + # Name of the passenger. + passenger_name:, + # Indicates whether this ticket is non-refundable. + restricted_ticket_indicator:, + # Indicates why a ticket was changed. + ticket_change_indicator:, + # Ticket number. + ticket_number:, + # Code for the travel agency if the ticket was issued by a travel agency. + travel_agency_code:, + # Name of the travel agency if the ticket was issued by a travel agency. + travel_agency_name:, + # Fields specific to each leg of the journey. + trip_legs: + ) + end + + sig do + override.returns( + { + ancillary: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary + ), + computerized_reservation_system: T.nilable(String), + credit_reason_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ), + departure_date: T.nilable(Date), + origination_city_airport_code: T.nilable(String), + passenger_name: T.nilable(String), + restricted_ticket_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ), + ticket_change_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ), + ticket_number: T.nilable(String), + travel_agency_code: T.nilable(String), + travel_agency_name: T.nilable(String), + trip_legs: + T.nilable( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg + ] + ) + } + ) + end + def to_hash + end + + class Ancillary < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary, + Increase::Internal::AnyHash + ) + end + + # If this purchase has a connection or relationship to another purchase, such as a + # baggage fee for a passenger transport ticket, this field should contain the + # ticket document number for the other purchase. + sig { returns(T.nilable(String)) } + attr_accessor :connected_ticket_document_number + + # Indicates the reason for a credit to the cardholder. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) + ) + end + attr_accessor :credit_reason_indicator + + # Name of the passenger or description of the ancillary purchase. + sig { returns(T.nilable(String)) } + attr_accessor :passenger_name_or_description + + # Additional travel charges, such as baggage fees. + sig do + returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service + ] + ) + end + attr_accessor :services + + # Ticket document number. + sig { returns(T.nilable(String)) } + attr_accessor :ticket_document_number + + # Ancillary purchases in addition to the airfare. + sig do + params( + connected_ticket_document_number: T.nilable(String), + credit_reason_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::OrSymbol + ), + passenger_name_or_description: T.nilable(String), + services: + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::OrHash + ], + ticket_document_number: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # If this purchase has a connection or relationship to another purchase, such as a + # baggage fee for a passenger transport ticket, this field should contain the + # ticket document number for the other purchase. + connected_ticket_document_number:, + # Indicates the reason for a credit to the cardholder. + credit_reason_indicator:, + # Name of the passenger or description of the ancillary purchase. + passenger_name_or_description:, + # Additional travel charges, such as baggage fees. + services:, + # Ticket document number. + ticket_document_number: + ) + end + + sig do + override.returns( + { + connected_ticket_document_number: T.nilable(String), + credit_reason_indicator: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ), + passenger_name_or_description: T.nilable(String), + services: + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service + ], + ticket_document_number: T.nilable(String) + } + ) + end + def to_hash + end + + # Indicates the reason for a credit to the cardholder. + module CreditReasonIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # No credit + NO_CREDIT = + T.let( + :no_credit, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) + + # Passenger transport ancillary purchase cancellation + PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) + + # Airline ticket and passenger transport ancillary purchase cancellation + AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) + + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Service < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service, + Increase::Internal::AnyHash + ) + end + + # Category of the ancillary service. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + ) + end + attr_accessor :category + + # Sub-category of the ancillary service, free-form. + sig { returns(T.nilable(String)) } + attr_accessor :sub_category + + sig do + params( + category: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::OrSymbol + ), + sub_category: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Category of the ancillary service. + category:, + # Sub-category of the ancillary service, free-form. + sub_category: + ) + end + + sig do + override.returns( + { + category: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ), + sub_category: T.nilable(String) + } + ) + end + def to_hash + end + + # Category of the ancillary service. + module Category + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # None + NONE = + T.let( + :none, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Bundled service + BUNDLED_SERVICE = + T.let( + :bundled_service, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Baggage fee + BAGGAGE_FEE = + T.let( + :baggage_fee, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Change fee + CHANGE_FEE = + T.let( + :change_fee, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Cargo + CARGO = + T.let( + :cargo, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Carbon offset + CARBON_OFFSET = + T.let( + :carbon_offset, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Frequent flyer + FREQUENT_FLYER = + T.let( + :frequent_flyer, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Gift card + GIFT_CARD = + T.let( + :gift_card, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Ground transport + GROUND_TRANSPORT = + T.let( + :ground_transport, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # In-flight entertainment + IN_FLIGHT_ENTERTAINMENT = + T.let( + :in_flight_entertainment, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Lounge + LOUNGE = + T.let( + :lounge, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Medical + MEDICAL = + T.let( + :medical, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Meal beverage + MEAL_BEVERAGE = + T.let( + :meal_beverage, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Passenger assist fee + PASSENGER_ASSIST_FEE = + T.let( + :passenger_assist_fee, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Pets + PETS = + T.let( + :pets, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Seat fees + SEAT_FEES = + T.let( + :seat_fees, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Standby + STANDBY = + T.let( + :standby, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Service fee + SERVICE_FEE = + T.let( + :service_fee, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Store + STORE = + T.let( + :store, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Travel service + TRAVEL_SERVICE = + T.let( + :travel_service, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Unaccompanied travel + UNACCOMPANIED_TRAVEL = + T.let( + :unaccompanied_travel, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Upgrades + UPGRADES = + T.let( + :upgrades, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Wi-fi + WIFI = + T.let( + :wifi, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + + # Indicates the reason for a credit to the cardholder. + module CreditReasonIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # No credit + NO_CREDIT = + T.let( + :no_credit, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + + # Passenger transport ancillary purchase cancellation + PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + + # Airline ticket and passenger transport ancillary purchase cancellation + AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + + # Airline ticket cancellation + AIRLINE_TICKET_CANCELLATION = + T.let( + :airline_ticket_cancellation, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + + # Partial refund of airline ticket + PARTIAL_REFUND_OF_AIRLINE_TICKET = + T.let( + :partial_refund_of_airline_ticket, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Indicates whether this ticket is non-refundable. + module RestrictedTicketIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # No restrictions + NO_RESTRICTIONS = + T.let( + :no_restrictions, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ) + + # Restricted non-refundable ticket + RESTRICTED_NON_REFUNDABLE_TICKET = + T.let( + :restricted_non_refundable_ticket, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + + # Indicates why a ticket was changed. + module TicketChangeIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # None + NONE = + T.let( + :none, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) + + # Change to existing ticket + CHANGE_TO_EXISTING_TICKET = + T.let( + :change_to_existing_ticket, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) + + # New ticket + NEW_TICKET = + T.let( + :new_ticket, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + + class TripLeg < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg, + Increase::Internal::AnyHash + ) + end + + # Carrier code (e.g., United Airlines, Jet Blue, etc.). + sig { returns(T.nilable(String)) } + attr_accessor :carrier_code + + # Code for the destination city or airport. + sig { returns(T.nilable(String)) } + attr_accessor :destination_city_airport_code + + # Fare basis code. + sig { returns(T.nilable(String)) } + attr_accessor :fare_basis_code + + # Flight number. + sig { returns(T.nilable(String)) } + attr_accessor :flight_number + + # Service class (e.g., first class, business class, etc.). + sig { returns(T.nilable(String)) } + attr_accessor :service_class + + # Indicates whether a stopover is allowed on this ticket. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) + ) + end + attr_accessor :stop_over_code + + sig do + params( + carrier_code: T.nilable(String), + destination_city_airport_code: T.nilable(String), + fare_basis_code: T.nilable(String), + flight_number: T.nilable(String), + service_class: T.nilable(String), + stop_over_code: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::OrSymbol + ) + ).returns(T.attached_class) + end + def self.new( + # Carrier code (e.g., United Airlines, Jet Blue, etc.). + carrier_code:, + # Code for the destination city or airport. + destination_city_airport_code:, + # Fare basis code. + fare_basis_code:, + # Flight number. + flight_number:, + # Service class (e.g., first class, business class, etc.). + service_class:, + # Indicates whether a stopover is allowed on this ticket. + stop_over_code: + ) + end + + sig do + override.returns( + { + carrier_code: T.nilable(String), + destination_city_airport_code: T.nilable(String), + fare_basis_code: T.nilable(String), + flight_number: T.nilable(String), + service_class: T.nilable(String), + stop_over_code: + T.nilable( + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) + } + ) + end + def to_hash + end + + # Indicates whether a stopover is allowed on this ticket. + module StopOverCode + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # None + NONE = + T.let( + :none, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) + + # Stop over allowed + STOP_OVER_ALLOWED = + T.let( + :stop_over_allowed, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) + + # Stop over not allowed + STOP_OVER_NOT_ALLOWED = + T.let( + :stop_over_not_allowed, + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_refund`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, Increase::CardPayment::Element::CardRefund::Type) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_REFUND = + T.let( + :card_refund, + Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardRefund::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CardReversal < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardReversal, + Increase::Internal::AnyHash + ) + end + + # The Card Reversal identifier. + sig { returns(String) } + attr_accessor :id + + # The identifier for the Card Authorization this reverses. + sig { returns(String) } + attr_accessor :card_authorization_id + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # currency. + sig do + returns( + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + end + attr_accessor :currency + + # 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(T.nilable(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 + + # The card network used to process this card authorization. + sig do + returns( + Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol + ) + end + attr_accessor :network + + # Network-specific identifiers for a specific request or transaction. + sig do + returns( + Increase::CardPayment::Element::CardReversal::NetworkIdentifiers + ) + end + attr_reader :network_identifiers + + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardReversal::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers + + # The identifier of the Pending Transaction associated with this Card Reversal. + sig { returns(T.nilable(String)) } + attr_accessor :pending_transaction_id + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # presentment currency. + sig { returns(String) } + attr_accessor :presentment_currency + + # The amount of this reversal in the minor unit of the transaction's currency. For + # dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :reversal_amount + + # The amount of this reversal in the minor unit of the transaction's presentment + # currency. For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :reversal_presentment_amount + + # Why this reversal was initiated. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ) + ) + end + attr_accessor :reversal_reason + + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + sig { returns(T.nilable(String)) } + attr_accessor :terminal_id + + # A constant representing the object's type. For this resource it will always be + # `card_reversal`. + sig do + returns( + Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol + ) + end + attr_accessor :type + + # The amount left pending on the Card Authorization in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :updated_authorization_amount + + # The amount left pending on the Card Authorization in the minor unit of the + # transaction's presentment currency. For dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :updated_authorization_presentment_amount + + # A Card Reversal object. This field will be present in the JSON response if and + # only if `category` is equal to `card_reversal`. Card Reversals cancel parts of + # or the entirety of an existing Card Authorization. + sig do + params( + id: String, + card_authorization_id: String, + currency: + Increase::CardPayment::Element::CardReversal::Currency::OrSymbol, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: T.nilable(String), + merchant_country: T.nilable(String), + merchant_descriptor: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network: + Increase::CardPayment::Element::CardReversal::Network::OrSymbol, + network_identifiers: + Increase::CardPayment::Element::CardReversal::NetworkIdentifiers::OrHash, + pending_transaction_id: T.nilable(String), + presentment_currency: String, + reversal_amount: Integer, + reversal_presentment_amount: Integer, + reversal_reason: + T.nilable( + Increase::CardPayment::Element::CardReversal::ReversalReason::OrSymbol + ), + terminal_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardReversal::Type::OrSymbol, + updated_authorization_amount: Integer, + updated_authorization_presentment_amount: Integer + ).returns(T.attached_class) + end + def self.new( + # The Card Reversal identifier. + id:, + # The identifier for the Card Authorization this reverses. + card_authorization_id:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # currency. + currency:, + # 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:, + # The card network used to process this card authorization. + network:, + # Network-specific identifiers for a specific request or transaction. + network_identifiers:, + # The identifier of the Pending Transaction associated with this Card Reversal. + pending_transaction_id:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # presentment currency. + presentment_currency:, + # The amount of this reversal in the minor unit of the transaction's currency. For + # dollars, for example, this is cents. + reversal_amount:, + # The amount of this reversal in the minor unit of the transaction's presentment + # currency. For dollars, for example, this is cents. + reversal_presentment_amount:, + # Why this reversal was initiated. + reversal_reason:, + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + terminal_id:, + # A constant representing the object's type. For this resource it will always be + # `card_reversal`. + type:, + # The amount left pending on the Card Authorization in the minor unit of the + # transaction's currency. For dollars, for example, this is cents. + updated_authorization_amount:, + # The amount left pending on the Card Authorization in the minor unit of the + # transaction's presentment currency. For dollars, for example, this is cents. + updated_authorization_presentment_amount: + ) + end + + sig do + override.returns( + { + id: String, + card_authorization_id: String, + currency: + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol, + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: T.nilable(String), + merchant_country: T.nilable(String), + merchant_descriptor: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network: + Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol, + network_identifiers: + Increase::CardPayment::Element::CardReversal::NetworkIdentifiers, + pending_transaction_id: T.nilable(String), + presentment_currency: String, + reversal_amount: Integer, + reversal_presentment_amount: Integer, + reversal_reason: + T.nilable( + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ), + terminal_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol, + updated_authorization_amount: Integer, + updated_authorization_presentment_amount: Integer + } + ) + end + def to_hash + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + # currency. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardReversal::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardReversal::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end + + # The card network used to process this card authorization. + module Network + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardReversal::Network + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Visa + VISA = + T.let( + :visa, + Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardReversal::Network::TaggedSymbol + ] + ) + end + def self.values + end + end + + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardReversal::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 + + # Why this reversal was initiated. + module ReversalReason + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardReversal::ReversalReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # The Card Reversal was initiated at the customer's request. + REVERSED_BY_CUSTOMER = + T.let( + :reversed_by_customer, + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ) + + # The Card Reversal was initiated by the network or acquirer. + REVERSED_BY_NETWORK_OR_ACQUIRER = + T.let( + :reversed_by_network_or_acquirer, + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ) + + # The Card Reversal was initiated by the point of sale device. + REVERSED_BY_POINT_OF_SALE = + T.let( + :reversed_by_point_of_sale, + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ) + + # The Card Reversal was a partial reversal, for any reason. + PARTIAL_REVERSAL = + T.let( + :partial_reversal, + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardReversal::ReversalReason::TaggedSymbol + ] + ) + end + def self.values + end + end + + # A constant representing the object's type. For this resource it will always be + # `card_reversal`. + module Type + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardReversal::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + CARD_REVERSAL = + T.let( + :card_reversal, + Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardReversal::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + class CardSettlement < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement, + Increase::Internal::AnyHash + ) + end + + # The Card Settlement identifier. + sig { returns(String) } + attr_accessor :id + + # The amount in the minor unit of the transaction's settlement currency. For + # dollars, for example, this is cents. + sig { returns(Integer) } + attr_accessor :amount + + # The Card Authorization that was created prior to this Card Settlement, if one + # exists. + sig { returns(T.nilable(String)) } + attr_accessor :card_authorization + + # The ID of the Card Payment this transaction belongs to. + sig { returns(String) } + attr_accessor :card_payment_id + + # Cashback earned on this transaction, if eligible. Cashback is paid out in + # aggregate, monthly. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::Cashback + ) + ) + end + attr_reader :cashback + + sig do + params( + cashback: + T.nilable( + Increase::CardPayment::Element::CardSettlement::Cashback::OrHash + ) + ).void + end + attr_writer :cashback + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's settlement currency. + sig do + returns( + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + end + attr_accessor :currency + + # Interchange assessed as a part of this transaction. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::Interchange + ) + ) + end + attr_reader :interchange + + sig do + params( + interchange: + T.nilable( + Increase::CardPayment::Element::CardSettlement::Interchange::OrHash + ) + ).void + end + attr_writer :interchange + + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + sig { returns(String) } + attr_accessor :merchant_acceptor_id + + # The 4-digit MCC describing the merchant's business. + sig { returns(String) } + attr_accessor :merchant_category_code + + # The city the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_city + + # The country the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_country + + # The name of the merchant. + sig { returns(String) } + attr_accessor :merchant_name + + # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. + 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 + + # Network-specific identifiers for this refund. + sig do + returns( + Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers + ) + end + attr_reader :network_identifiers + + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers + + # The identifier of the Pending Transaction associated with this Transaction. + sig { returns(T.nilable(String)) } + attr_accessor :pending_transaction_id + + # The 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 [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's presentment currency. + sig { returns(String) } + attr_accessor :presentment_currency + + # Additional details about the card purchase, such as tax and industry-specific + # fields. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails + ) + ) + end + attr_reader :purchase_details + + sig do + params( + purchase_details: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::OrHash + ) + ).void + end + attr_writer :purchase_details + + # 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_settlement`. + sig do + returns( + Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol + ) + end + attr_accessor :type + + # A Card Settlement object. This field will be present in the JSON response if and + # only if `category` is equal to `card_settlement`. Card Settlements are card + # transactions that have cleared and settled. While a settlement is usually + # preceded by an authorization, an acquirer can also directly clear a transaction + # without first authorizing it. + sig do + params( + id: String, + amount: Integer, + card_authorization: T.nilable(String), + card_payment_id: String, + cashback: + T.nilable( + Increase::CardPayment::Element::CardSettlement::Cashback::OrHash + ), + currency: + Increase::CardPayment::Element::CardSettlement::Currency::OrSymbol, + interchange: + T.nilable( + Increase::CardPayment::Element::CardSettlement::Interchange::OrHash + ), + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_name: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network_identifiers: + Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers::OrHash, + pending_transaction_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + purchase_details: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::OrHash + ), + transaction_id: String, + type: + Increase::CardPayment::Element::CardSettlement::Type::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The Card Settlement identifier. + id:, + # The amount in the minor unit of the transaction's settlement currency. For + # dollars, for example, this is cents. + amount:, + # The Card Authorization that was created prior to this Card Settlement, if one + # exists. + card_authorization:, + # The ID of the Card Payment this transaction belongs to. + card_payment_id:, + # Cashback earned on this transaction, if eligible. Cashback is paid out in + # aggregate, monthly. + cashback:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's settlement currency. + currency:, + # Interchange assessed as a part of this transaction. + interchange:, + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + merchant_acceptor_id:, + # The 4-digit MCC describing the merchant's business. + merchant_category_code:, + # The city the merchant resides in. + merchant_city:, + # The country the merchant resides in. + merchant_country:, + # The name of the merchant. + merchant_name:, + # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. + merchant_postal_code:, + # The state the merchant resides in. + merchant_state:, + # Network-specific identifiers for this refund. + network_identifiers:, + # The identifier of the Pending Transaction associated with this Transaction. + pending_transaction_id:, + # The 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:, + # Additional details about the card purchase, such as tax and industry-specific + # fields. + purchase_details:, + # 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_settlement`. + type: + ) + end + + sig do + override.returns( + { + id: String, + amount: Integer, + card_authorization: T.nilable(String), + card_payment_id: String, + cashback: + T.nilable( + Increase::CardPayment::Element::CardSettlement::Cashback + ), + currency: + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol, + interchange: + T.nilable( + Increase::CardPayment::Element::CardSettlement::Interchange + ), + merchant_acceptor_id: String, + merchant_category_code: String, + merchant_city: String, + merchant_country: String, + merchant_name: String, + merchant_postal_code: T.nilable(String), + merchant_state: T.nilable(String), + network_identifiers: + Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers, + pending_transaction_id: T.nilable(String), + presentment_amount: Integer, + presentment_currency: String, + purchase_details: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails + ), + transaction_id: String, + type: + Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol + } + ) + end + def to_hash + end + + class Cashback < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::Cashback, + Increase::Internal::AnyHash + ) + end + + # The cashback amount given as a string containing a decimal number. The amount is + # a positive number if it will be credited to you (e.g., settlements) and a + # negative number if it will be debited (e.g., refunds). + sig { returns(String) } + attr_accessor :amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + sig do + returns( + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + end + attr_accessor :currency + + # Cashback earned on this transaction, if eligible. Cashback is paid out in + # aggregate, monthly. + sig do + params( + amount: String, + currency: + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The cashback amount given as a string containing a decimal number. The amount is + # a positive number if it will be credited to you (e.g., settlements) and a + # negative number if it will be debited (e.g., refunds). + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + currency: + ) + end + + sig do + override.returns( + { + amount: String, + currency: + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + } + ) + end + def to_hash + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's settlement currency. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end + + class Interchange < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::Interchange, + Increase::Internal::AnyHash + ) + end + + # The interchange amount given as a string containing a decimal number in major + # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + # credited to Increase (e.g., settlements) and a negative number if it is debited + # (e.g., refunds). + sig { returns(String) } + attr_accessor :amount + + # The card network specific interchange code. + sig { returns(T.nilable(String)) } + attr_accessor :code + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + # reimbursement. + sig do + returns( + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ) + end + attr_accessor :currency + + # Interchange assessed as a part of this transaction. + sig do + params( + amount: String, + code: T.nilable(String), + currency: + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::OrSymbol + ).returns(T.attached_class) + end + def self.new( + # The interchange amount given as a string containing a decimal number in major + # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + # credited to Increase (e.g., settlements) and a negative number if it is debited + # (e.g., refunds). + amount:, + # The card network specific interchange code. + code:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + # reimbursement. + currency: + ) + end + + sig do + override.returns( + { + amount: String, + code: T.nilable(String), + currency: + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + } + ) + end + def to_hash + end + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + # reimbursement. + module Currency + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Additional details about the card purchase, such as tax and industry-specific - # fields. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails - ) - ) - end - attr_reader :purchase_details + # Canadian Dollar (CAD) + CAD = + T.let( + :CAD, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ) - sig do - params( - purchase_details: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::OrHash + # Swiss Franc (CHF) + CHF = + T.let( + :CHF, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol ) - ).void + + # Euro (EUR) + EUR = + T.let( + :EUR, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ) + + # British Pound (GBP) + GBP = + T.let( + :GBP, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ) + + # Japanese Yen (JPY) + JPY = + T.let( + :JPY, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ) + + # US Dollar (USD) + USD = + T.let( + :USD, + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol + ] + ) + end + def self.values + end + end end - attr_writer :purchase_details - # The identifier of the Transaction associated with this Transaction. - sig { returns(String) } - attr_accessor :transaction_id + class NetworkIdentifiers < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers, + Increase::Internal::AnyHash + ) + end - # A constant representing the object's type. For this resource it will always be - # `card_settlement`. - sig do - returns( - Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol + # A network assigned business ID that identifies the acquirer that processed this + # transaction. + sig { returns(String) } + attr_accessor :acquirer_business_id + + # A globally unique identifier for this settlement. + sig { returns(String) } + attr_accessor :acquirer_reference_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 this refund. + sig do + params( + acquirer_business_id: String, + acquirer_reference_number: String, + transaction_id: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # A network assigned business ID that identifies the acquirer that processed this + # transaction. + acquirer_business_id:, + # A globally unique identifier for this settlement. + acquirer_reference_number:, + # A globally unique transaction identifier provided by the card network, used + # across multiple life-cycle requests. + transaction_id: ) + end + + sig do + override.returns( + { + acquirer_business_id: String, + acquirer_reference_number: String, + transaction_id: T.nilable(String) + } + ) + end + def to_hash + end end - attr_accessor :type - # A Card Settlement object. This field will be present in the JSON response if and - # only if `category` is equal to `card_settlement`. Card Settlements are card - # transactions that have cleared and settled. While a settlement is usually - # preceded by an authorization, an acquirer can also directly clear a transaction - # without first authorizing it. - sig do - params( - id: String, - amount: Integer, - card_authorization: T.nilable(String), - card_payment_id: String, - cashback: + class PurchaseDetails < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails, + Increase::Internal::AnyHash + ) + end + + # Fields specific to car rentals. + sig do + returns( T.nilable( - Increase::CardPayment::Element::CardSettlement::Cashback::OrHash - ), - currency: - Increase::CardPayment::Element::CardSettlement::Currency::OrSymbol, - interchange: + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental + ) + ) + end + attr_reader :car_rental + + sig do + params( + car_rental: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::OrHash + ) + ).void + end + attr_writer :car_rental + + # An identifier from the merchant for the customer or consumer. + sig { returns(T.nilable(String)) } + attr_accessor :customer_reference_identifier + + # The state or provincial tax amount in minor units. + sig { returns(T.nilable(Integer)) } + attr_accessor :local_tax_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :local_tax_currency + + # Fields specific to lodging. + sig do + returns( T.nilable( - Increase::CardPayment::Element::CardSettlement::Interchange::OrHash - ), - merchant_acceptor_id: String, - merchant_category_code: String, - merchant_city: String, - merchant_country: String, - merchant_name: String, - merchant_postal_code: T.nilable(String), - merchant_state: T.nilable(String), - network_identifiers: - Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers::OrHash, - pending_transaction_id: T.nilable(String), - presentment_amount: Integer, - presentment_currency: String, - purchase_details: + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging + ) + ) + end + attr_reader :lodging + + sig do + params( + lodging: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::OrHash + ) + ).void + end + attr_writer :lodging + + # The national tax amount in minor units. + sig { returns(T.nilable(Integer)) } + attr_accessor :national_tax_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :national_tax_currency + + # An identifier from the merchant for the purchase to the issuer and cardholder. + sig { returns(T.nilable(String)) } + attr_accessor :purchase_identifier + + # The format of the purchase identifier. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) + ) + end + attr_accessor :purchase_identifier_format + + # Fields specific to travel. + sig do + returns( T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::OrHash - ), - transaction_id: String, - type: - Increase::CardPayment::Element::CardSettlement::Type::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The Card Settlement identifier. - id:, - # The amount in the minor unit of the transaction's settlement currency. For - # dollars, for example, this is cents. - amount:, - # The Card Authorization that was created prior to this Card Settlement, if one - # exists. - card_authorization:, - # The ID of the Card Payment this transaction belongs to. - card_payment_id:, - # Cashback earned on this transaction, if eligible. Cashback is paid out in - # aggregate, monthly. - cashback:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's settlement currency. - currency:, - # Interchange assessed as a part of this transaction. - interchange:, - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - merchant_acceptor_id:, - # The 4-digit MCC describing the merchant's business. - merchant_category_code:, - # The city the merchant resides in. - merchant_city:, - # The country the merchant resides in. - merchant_country:, - # The name of the merchant. - merchant_name:, - # The merchant's postal code. For US merchants this is always a 5-digit ZIP code. - merchant_postal_code:, - # The state the merchant resides in. - merchant_state:, - # Network-specific identifiers for this refund. - network_identifiers:, - # The identifier of the Pending Transaction associated with this Transaction. - pending_transaction_id:, - # The 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:, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel + ) + ) + end + attr_reader :travel + + sig do + params( + travel: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::OrHash + ) + ).void + end + attr_writer :travel + # Additional details about the card purchase, such as tax and industry-specific # fields. - purchase_details:, - # 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_settlement`. - type: - ) - end - - sig do - override.returns( - { - id: String, - amount: Integer, - card_authorization: T.nilable(String), - card_payment_id: String, - cashback: + sig do + params( + car_rental: T.nilable( - Increase::CardPayment::Element::CardSettlement::Cashback + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::OrHash ), - currency: - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol, - interchange: + customer_reference_identifier: T.nilable(String), + local_tax_amount: T.nilable(Integer), + local_tax_currency: T.nilable(String), + lodging: T.nilable( - Increase::CardPayment::Element::CardSettlement::Interchange + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::OrHash ), - merchant_acceptor_id: String, - merchant_category_code: String, - merchant_city: String, - merchant_country: String, - merchant_name: String, - merchant_postal_code: T.nilable(String), - merchant_state: T.nilable(String), - network_identifiers: - Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers, - pending_transaction_id: T.nilable(String), - presentment_amount: Integer, - presentment_currency: String, - purchase_details: + national_tax_amount: T.nilable(Integer), + national_tax_currency: T.nilable(String), + purchase_identifier: T.nilable(String), + purchase_identifier_format: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::OrSymbol ), - transaction_id: String, - type: - Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol - } + travel: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::OrHash + ) + ).returns(T.attached_class) + end + def self.new( + # Fields specific to car rentals. + car_rental:, + # An identifier from the merchant for the customer or consumer. + customer_reference_identifier:, + # The state or provincial tax amount in minor units. + local_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + local_tax_currency:, + # Fields specific to lodging. + lodging:, + # The national tax amount in minor units. + national_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + # assessed. + national_tax_currency:, + # An identifier from the merchant for the purchase to the issuer and cardholder. + purchase_identifier:, + # The format of the purchase identifier. + purchase_identifier_format:, + # Fields specific to travel. + travel: ) - end - def to_hash - end + end - class Cashback < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::Cashback, - Increase::Internal::AnyHash + sig do + override.returns( + { + car_rental: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental + ), + customer_reference_identifier: T.nilable(String), + local_tax_amount: T.nilable(Integer), + local_tax_currency: T.nilable(String), + lodging: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging + ), + national_tax_amount: T.nilable(Integer), + national_tax_currency: T.nilable(String), + purchase_identifier: T.nilable(String), + purchase_identifier_format: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ), + travel: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel + ) + } + ) + end + def to_hash + end + + class CarRental < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental, + Increase::Internal::AnyHash + ) + end + + # Code indicating the vehicle's class. + sig { returns(T.nilable(String)) } + attr_accessor :car_class_code + + # Date the customer picked up the car or, in the case of a no-show or pre-pay + # transaction, the scheduled pick up date. + sig { returns(T.nilable(Date)) } + attr_accessor :checkout_date + + # Daily rate being charged for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_rental_rate_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + # rate. + sig { returns(T.nilable(String)) } + attr_accessor :daily_rental_rate_currency + + # Number of days the vehicle was rented. + sig { returns(T.nilable(Integer)) } + attr_accessor :days_rented + + # Additional charges (gas, late fee, etc.) being billed. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) + ) + end + attr_accessor :extra_charges + + # Fuel charges for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :fuel_charges_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :fuel_charges_currency + + # Any insurance being charged for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :insurance_charges_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + # charges assessed. + sig { returns(T.nilable(String)) } + attr_accessor :insurance_charges_currency + + # An indicator that the cardholder is being billed for a reserved vehicle that was + # not actually rented (that is, a "no-show" charge). + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ) ) end + attr_accessor :no_show_indicator - # The cashback amount given as a string containing a decimal number. The amount is - # a positive number if it will be credited to you (e.g., settlements) and a - # negative number if it will be debited (e.g., refunds). - sig { returns(String) } - attr_accessor :amount + # Charges for returning the vehicle at a different location than where it was + # picked up. + sig { returns(T.nilable(Integer)) } + attr_accessor :one_way_drop_off_charges_amount - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - sig do - returns( - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + # drop-off charges assessed. + sig { returns(T.nilable(String)) } + attr_accessor :one_way_drop_off_charges_currency - # Cashback earned on this transaction, if eligible. Cashback is paid out in - # aggregate, monthly. - sig do - params( - amount: String, - currency: - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The cashback amount given as a string containing a decimal number. The amount is - # a positive number if it will be credited to you (e.g., settlements) and a - # negative number if it will be debited (e.g., refunds). - amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - currency: - ) - end + # Name of the person renting the vehicle. + sig { returns(T.nilable(String)) } + attr_accessor :renter_name - sig do - override.returns( - { - amount: String, - currency: - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - } - ) - end - def to_hash - end + # Weekly rate being charged for the vehicle. + sig { returns(T.nilable(Integer)) } + attr_accessor :weekly_rental_rate_amount - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - module Currency - extend Increase::Internal::Type::Enum + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + # rental rate. + sig { returns(T.nilable(String)) } + attr_accessor :weekly_rental_rate_currency - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Fields specific to car rentals. + sig do + params( + car_class_code: T.nilable(String), + checkout_date: T.nilable(Date), + daily_rental_rate_amount: T.nilable(Integer), + daily_rental_rate_currency: T.nilable(String), + days_rented: T.nilable(Integer), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::OrSymbol + ), + fuel_charges_amount: T.nilable(Integer), + fuel_charges_currency: T.nilable(String), + insurance_charges_amount: T.nilable(Integer), + insurance_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::OrSymbol + ), + one_way_drop_off_charges_amount: T.nilable(Integer), + one_way_drop_off_charges_currency: T.nilable(String), + renter_name: T.nilable(String), + weekly_rental_rate_amount: T.nilable(Integer), + weekly_rental_rate_currency: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Code indicating the vehicle's class. + car_class_code:, + # Date the customer picked up the car or, in the case of a no-show or pre-pay + # transaction, the scheduled pick up date. + checkout_date:, + # Daily rate being charged for the vehicle. + daily_rental_rate_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + # rate. + daily_rental_rate_currency:, + # Number of days the vehicle was rented. + days_rented:, + # Additional charges (gas, late fee, etc.) being billed. + extra_charges:, + # Fuel charges for the vehicle. + fuel_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + # assessed. + fuel_charges_currency:, + # Any insurance being charged for the vehicle. + insurance_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + # charges assessed. + insurance_charges_currency:, + # An indicator that the cardholder is being billed for a reserved vehicle that was + # not actually rented (that is, a "no-show" charge). + no_show_indicator:, + # Charges for returning the vehicle at a different location than where it was + # picked up. + one_way_drop_off_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + # drop-off charges assessed. + one_way_drop_off_charges_currency:, + # Name of the person renting the vehicle. + renter_name:, + # Weekly rate being charged for the vehicle. + weekly_rental_rate_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + # rental rate. + weekly_rental_rate_currency: + ) + end - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol + sig do + override.returns( + { + car_class_code: T.nilable(String), + checkout_date: T.nilable(Date), + daily_rental_rate_amount: T.nilable(Integer), + daily_rental_rate_currency: T.nilable(String), + days_rented: T.nilable(Integer), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ), + fuel_charges_amount: T.nilable(Integer), + fuel_charges_currency: T.nilable(String), + insurance_charges_amount: T.nilable(Integer), + insurance_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ), + one_way_drop_off_charges_amount: T.nilable(Integer), + one_way_drop_off_charges_currency: T.nilable(String), + renter_name: T.nilable(String), + weekly_rental_rate_amount: T.nilable(Integer), + weekly_rental_rate_currency: T.nilable(String) + } ) + end + def to_hash + end - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ) + # Additional charges (gas, late fee, etc.) being billed. + module ExtraCharges + extend Increase::Internal::Type::Enum - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ) + # No extra charge + NO_EXTRA_CHARGE = + T.let( + :no_extra_charge, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ) + # Gas + GAS = + T.let( + :gas, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ) + # Extra mileage + EXTRA_MILEAGE = + T.let( + :extra_mileage, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) + + # Late return + LATE_RETURN = + T.let( + :late_return, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) + + # One way service fee + ONE_WAY_SERVICE_FEE = + T.let( + :one_way_service_fee, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) + + # Parking violation + PARKING_VIOLATION = + T.let( + :parking_violation, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::Cashback::Currency::TaggedSymbol - ] - ) - end - def self.values + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + ] + ) + end + def self.values + end end - end - end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's settlement currency. - module Currency - extend Increase::Internal::Type::Enum + # An indicator that the cardholder is being billed for a reserved vehicle that was + # not actually rented (that is, a "no-show" charge). + module NoShowIndicator + extend Increase::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::Currency - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) + # Not applicable + NOT_APPLICABLE = + T.let( + :not_applicable, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ) - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) + # No show for specialized vehicle + NO_SHOW_FOR_SPECIALIZED_VEHICLE = + T.let( + :no_show_for_specialized_vehicle, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ) - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) + class Lodging < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging, + Increase::Internal::AnyHash + ) + end - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) + # Date the customer checked in. + sig { returns(T.nilable(Date)) } + attr_accessor :check_in_date - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ) + # Daily rate being charged for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :daily_room_rate_amount - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::Currency::TaggedSymbol - ] - ) - end - def self.values - end - end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + # rate. + sig { returns(T.nilable(String)) } + attr_accessor :daily_room_rate_currency - class Interchange < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::Interchange, - Increase::Internal::AnyHash + # Additional charges (phone, late check-out, etc.) being billed. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) ) end + attr_accessor :extra_charges - # The interchange amount given as a string containing a decimal number in major - # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is - # credited to Increase (e.g., settlements) and a negative number if it is debited - # (e.g., refunds). - sig { returns(String) } - attr_accessor :amount - - # The card network specific interchange code. - sig { returns(T.nilable(String)) } - attr_accessor :code - - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange - # reimbursement. - sig do - returns( - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # Folio cash advances for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :folio_cash_advances_amount - # Interchange assessed as a part of this transaction. - sig do - params( - amount: String, - code: T.nilable(String), - currency: - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::OrSymbol - ).returns(T.attached_class) - end - def self.new( - # The interchange amount given as a string containing a decimal number in major - # units (so e.g., "3.14" for $3.14). The amount is a positive number if it is - # credited to Increase (e.g., settlements) and a negative number if it is debited - # (e.g., refunds). - amount:, - # The card network specific interchange code. - code:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange - # reimbursement. - currency: - ) - end + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + # advances. + sig { returns(T.nilable(String)) } + attr_accessor :folio_cash_advances_currency - sig do - override.returns( - { - amount: String, - code: T.nilable(String), - currency: - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - } - ) - end - def to_hash - end + # Food and beverage charges for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :food_beverage_charges_amount - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange - # reimbursement. - module Currency - extend Increase::Internal::Type::Enum + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and + # beverage charges. + sig { returns(T.nilable(String)) } + attr_accessor :food_beverage_charges_currency - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency + # Indicator that the cardholder is being billed for a reserved room that was not + # actually used. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Canadian Dollar (CAD) - CAD = - T.let( - :CAD, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol ) + end + attr_accessor :no_show_indicator - # Swiss Franc (CHF) - CHF = - T.let( - :CHF, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ) + # Prepaid expenses being charged for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :prepaid_expenses_amount + + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + # expenses. + sig { returns(T.nilable(String)) } + attr_accessor :prepaid_expenses_currency + + # Number of nights the room was rented. + sig { returns(T.nilable(Integer)) } + attr_accessor :room_nights - # Euro (EUR) - EUR = - T.let( - :EUR, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ) + # Total room tax being charged. + sig { returns(T.nilable(Integer)) } + attr_accessor :total_room_tax_amount - # British Pound (GBP) - GBP = - T.let( - :GBP, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + # tax. + sig { returns(T.nilable(String)) } + attr_accessor :total_room_tax_currency - # Japanese Yen (JPY) - JPY = - T.let( - :JPY, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ) + # Total tax being charged for the room. + sig { returns(T.nilable(Integer)) } + attr_accessor :total_tax_amount - # US Dollar (USD) - USD = - T.let( - :USD, - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + # assessed. + sig { returns(T.nilable(String)) } + attr_accessor :total_tax_currency + # Fields specific to lodging. sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::Interchange::Currency::TaggedSymbol - ] - ) + params( + check_in_date: T.nilable(Date), + daily_room_rate_amount: T.nilable(Integer), + daily_room_rate_currency: T.nilable(String), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::OrSymbol + ), + folio_cash_advances_amount: T.nilable(Integer), + folio_cash_advances_currency: T.nilable(String), + food_beverage_charges_amount: T.nilable(Integer), + food_beverage_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::OrSymbol + ), + prepaid_expenses_amount: T.nilable(Integer), + prepaid_expenses_currency: T.nilable(String), + room_nights: T.nilable(Integer), + total_room_tax_amount: T.nilable(Integer), + total_room_tax_currency: T.nilable(String), + total_tax_amount: T.nilable(Integer), + total_tax_currency: T.nilable(String) + ).returns(T.attached_class) end - def self.values + def self.new( + # Date the customer checked in. + check_in_date:, + # Daily rate being charged for the room. + daily_room_rate_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + # rate. + daily_room_rate_currency:, + # Additional charges (phone, late check-out, etc.) being billed. + extra_charges:, + # Folio cash advances for the room. + folio_cash_advances_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + # advances. + folio_cash_advances_currency:, + # Food and beverage charges for the room. + food_beverage_charges_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and + # beverage charges. + food_beverage_charges_currency:, + # Indicator that the cardholder is being billed for a reserved room that was not + # actually used. + no_show_indicator:, + # Prepaid expenses being charged for the room. + prepaid_expenses_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + # expenses. + prepaid_expenses_currency:, + # Number of nights the room was rented. + room_nights:, + # Total room tax being charged. + total_room_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + # tax. + total_room_tax_currency:, + # Total tax being charged for the room. + total_tax_amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + # assessed. + total_tax_currency: + ) end - end - end - class NetworkIdentifiers < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::NetworkIdentifiers, - Increase::Internal::AnyHash + sig do + override.returns( + { + check_in_date: T.nilable(Date), + daily_room_rate_amount: T.nilable(Integer), + daily_room_rate_currency: T.nilable(String), + extra_charges: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ), + folio_cash_advances_amount: T.nilable(Integer), + folio_cash_advances_currency: T.nilable(String), + food_beverage_charges_amount: T.nilable(Integer), + food_beverage_charges_currency: T.nilable(String), + no_show_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ), + prepaid_expenses_amount: T.nilable(Integer), + prepaid_expenses_currency: T.nilable(String), + room_nights: T.nilable(Integer), + total_room_tax_amount: T.nilable(Integer), + total_room_tax_currency: T.nilable(String), + total_tax_amount: T.nilable(Integer), + total_tax_currency: T.nilable(String) + } ) end + def to_hash + end - # A network assigned business ID that identifies the acquirer that processed this - # transaction. - sig { returns(String) } - attr_accessor :acquirer_business_id + # Additional charges (phone, late check-out, etc.) being billed. + module ExtraCharges + extend Increase::Internal::Type::Enum - # A globally unique identifier for this settlement. - sig { returns(String) } - attr_accessor :acquirer_reference_number + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # 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 + # No extra charge + NO_EXTRA_CHARGE = + T.let( + :no_extra_charge, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) - # Network-specific identifiers for this refund. - sig do - params( - acquirer_business_id: String, - acquirer_reference_number: String, - transaction_id: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # A network assigned business ID that identifies the acquirer that processed this - # transaction. - acquirer_business_id:, - # A globally unique identifier for this settlement. - acquirer_reference_number:, - # A globally unique transaction identifier provided by the card network, used - # across multiple life-cycle requests. - transaction_id: - ) - end + # Restaurant + RESTAURANT = + T.let( + :restaurant, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) - sig do - override.returns( - { - acquirer_business_id: String, - acquirer_reference_number: String, - transaction_id: T.nilable(String) - } - ) - end - def to_hash - end - end + # Gift shop + GIFT_SHOP = + T.let( + :gift_shop, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) - class PurchaseDetails < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails, - Increase::Internal::AnyHash - ) - end + # Mini bar + MINI_BAR = + T.let( + :mini_bar, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) - # Fields specific to car rentals. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental - ) - ) - end - attr_reader :car_rental + # Telephone + TELEPHONE = + T.let( + :telephone, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) + + # Laundry + LAUNDRY = + T.let( + :laundry, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ) - sig do - params( - car_rental: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::OrHash + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + ] ) - ).void - end - attr_writer :car_rental + end + def self.values + end + end - # An identifier from the merchant for the customer or consumer. - sig { returns(T.nilable(String)) } - attr_accessor :customer_reference_identifier + # Indicator that the cardholder is being billed for a reserved room that was not + # actually used. + module NoShowIndicator + extend Increase::Internal::Type::Enum - # The state or provincial tax amount in minor units. - sig { returns(T.nilable(Integer)) } - attr_accessor :local_tax_amount + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :local_tax_currency + # Not applicable + NOT_APPLICABLE = + T.let( + :not_applicable, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ) - # Fields specific to lodging. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging - ) - ) - end - attr_reader :lodging + # No show + NO_SHOW = + T.let( + :no_show, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ) - sig do - params( - lodging: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::OrHash + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + ] ) - ).void + end + def self.values + end + end end - attr_writer :lodging - # The national tax amount in minor units. - sig { returns(T.nilable(Integer)) } - attr_accessor :national_tax_amount + # The format of the purchase identifier. + module PurchaseIdentifierFormat + extend Increase::Internal::Type::Enum - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :national_tax_currency + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # An identifier from the merchant for the purchase to the issuer and cardholder. - sig { returns(T.nilable(String)) } - attr_accessor :purchase_identifier + # Free text + FREE_TEXT = + T.let( + :free_text, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) - # The format of the purchase identifier. - sig do - returns( - T.nilable( + # Order number + ORDER_NUMBER = + T.let( + :order_number, Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol ) - ) - end - attr_accessor :purchase_identifier_format - # Fields specific to travel. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel + # Rental agreement number + RENTAL_AGREEMENT_NUMBER = + T.let( + :rental_agreement_number, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol ) - ) - end - attr_reader :travel - sig do - params( - travel: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::OrHash - ) - ).void - end - attr_writer :travel + # Hotel folio number + HOTEL_FOLIO_NUMBER = + T.let( + :hotel_folio_number, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) - # Additional details about the card purchase, such as tax and industry-specific - # fields. - sig do - params( - car_rental: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::OrHash - ), - customer_reference_identifier: T.nilable(String), - local_tax_amount: T.nilable(Integer), - local_tax_currency: T.nilable(String), - lodging: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::OrHash - ), - national_tax_amount: T.nilable(Integer), - national_tax_currency: T.nilable(String), - purchase_identifier: T.nilable(String), - purchase_identifier_format: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::OrSymbol - ), - travel: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::OrHash - ) - ).returns(T.attached_class) - end - def self.new( - # Fields specific to car rentals. - car_rental:, - # An identifier from the merchant for the customer or consumer. - customer_reference_identifier:, - # The state or provincial tax amount in minor units. - local_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - local_tax_currency:, - # Fields specific to lodging. - lodging:, - # The national tax amount in minor units. - national_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - # assessed. - national_tax_currency:, - # An identifier from the merchant for the purchase to the issuer and cardholder. - purchase_identifier:, - # The format of the purchase identifier. - purchase_identifier_format:, - # Fields specific to travel. - travel: - ) - end + # Invoice number + INVOICE_NUMBER = + T.let( + :invoice_number, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ) - sig do - override.returns( - { - car_rental: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental - ), - customer_reference_identifier: T.nilable(String), - local_tax_amount: T.nilable(Integer), - local_tax_currency: T.nilable(String), - lodging: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging - ), - national_tax_amount: T.nilable(Integer), - national_tax_currency: T.nilable(String), - purchase_identifier: T.nilable(String), - purchase_identifier_format: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ), - travel: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel - ) - } - ) - end - def to_hash + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol + ] + ) + end + def self.values + end end - class CarRental < Increase::Internal::Type::BaseModel + class Travel < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel, Increase::Internal::AnyHash ) end - # Code indicating the vehicle's class. - sig { returns(T.nilable(String)) } - attr_accessor :car_class_code - - # Date the customer picked up the car or, in the case of a no-show or pre-pay - # transaction, the scheduled pick up date. - sig { returns(T.nilable(Date)) } - attr_accessor :checkout_date + # Ancillary purchases in addition to the airfare. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary + ) + ) + end + attr_reader :ancillary - # Daily rate being charged for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :daily_rental_rate_amount + sig do + params( + ancillary: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::OrHash + ) + ).void + end + attr_writer :ancillary - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - # rate. + # Indicates the computerized reservation system used to book the ticket. sig { returns(T.nilable(String)) } - attr_accessor :daily_rental_rate_currency - - # Number of days the vehicle was rented. - sig { returns(T.nilable(Integer)) } - attr_accessor :days_rented + attr_accessor :computerized_reservation_system - # Additional charges (gas, late fee, etc.) being billed. + # Indicates the reason for a credit to the cardholder. sig do returns( T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol ) ) end - attr_accessor :extra_charges + attr_accessor :credit_reason_indicator - # Fuel charges for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :fuel_charges_amount + # Date of departure. + sig { returns(T.nilable(Date)) } + attr_accessor :departure_date - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - # assessed. + # Code for the originating city or airport. sig { returns(T.nilable(String)) } - attr_accessor :fuel_charges_currency - - # Any insurance being charged for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :insurance_charges_amount + attr_accessor :origination_city_airport_code - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - # charges assessed. + # Name of the passenger. sig { returns(T.nilable(String)) } - attr_accessor :insurance_charges_currency + attr_accessor :passenger_name - # An indicator that the cardholder is being billed for a reserved vehicle that was - # not actually rented (that is, a "no-show" charge). + # Indicates whether this ticket is non-refundable. sig do returns( T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol ) ) end - attr_accessor :no_show_indicator + attr_accessor :restricted_ticket_indicator - # Charges for returning the vehicle at a different location than where it was - # picked up. - sig { returns(T.nilable(Integer)) } - attr_accessor :one_way_drop_off_charges_amount + # Indicates why a ticket was changed. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) + ) + end + attr_accessor :ticket_change_indicator - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - # drop-off charges assessed. + # Ticket number. sig { returns(T.nilable(String)) } - attr_accessor :one_way_drop_off_charges_currency + attr_accessor :ticket_number - # Name of the person renting the vehicle. + # Code for the travel agency if the ticket was issued by a travel agency. sig { returns(T.nilable(String)) } - attr_accessor :renter_name - - # Weekly rate being charged for the vehicle. - sig { returns(T.nilable(Integer)) } - attr_accessor :weekly_rental_rate_amount + attr_accessor :travel_agency_code - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - # rental rate. + # Name of the travel agency if the ticket was issued by a travel agency. sig { returns(T.nilable(String)) } - attr_accessor :weekly_rental_rate_currency + attr_accessor :travel_agency_name - # Fields specific to car rentals. + # Fields specific to each leg of the journey. + sig do + returns( + T.nilable( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg + ] + ) + ) + end + attr_accessor :trip_legs + + # Fields specific to travel. sig do params( - car_class_code: T.nilable(String), - checkout_date: T.nilable(Date), - daily_rental_rate_amount: T.nilable(Integer), - daily_rental_rate_currency: T.nilable(String), - days_rented: T.nilable(Integer), - extra_charges: + ancillary: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::OrSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::OrHash ), - fuel_charges_amount: T.nilable(Integer), - fuel_charges_currency: T.nilable(String), - insurance_charges_amount: T.nilable(Integer), - insurance_charges_currency: T.nilable(String), - no_show_indicator: + computerized_reservation_system: T.nilable(String), + credit_reason_indicator: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::OrSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::OrSymbol ), - one_way_drop_off_charges_amount: T.nilable(Integer), - one_way_drop_off_charges_currency: T.nilable(String), - renter_name: T.nilable(String), - weekly_rental_rate_amount: T.nilable(Integer), - weekly_rental_rate_currency: T.nilable(String) + departure_date: T.nilable(Date), + origination_city_airport_code: T.nilable(String), + passenger_name: T.nilable(String), + restricted_ticket_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::OrSymbol + ), + ticket_change_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::OrSymbol + ), + ticket_number: T.nilable(String), + travel_agency_code: T.nilable(String), + travel_agency_name: T.nilable(String), + trip_legs: + T.nilable( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::OrHash + ] + ) ).returns(T.attached_class) end def self.new( - # Code indicating the vehicle's class. - car_class_code:, - # Date the customer picked up the car or, in the case of a no-show or pre-pay - # transaction, the scheduled pick up date. - checkout_date:, - # Daily rate being charged for the vehicle. - daily_rental_rate_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - # rate. - daily_rental_rate_currency:, - # Number of days the vehicle was rented. - days_rented:, - # Additional charges (gas, late fee, etc.) being billed. - extra_charges:, - # Fuel charges for the vehicle. - fuel_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - # assessed. - fuel_charges_currency:, - # Any insurance being charged for the vehicle. - insurance_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - # charges assessed. - insurance_charges_currency:, - # An indicator that the cardholder is being billed for a reserved vehicle that was - # not actually rented (that is, a "no-show" charge). - no_show_indicator:, - # Charges for returning the vehicle at a different location than where it was - # picked up. - one_way_drop_off_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - # drop-off charges assessed. - one_way_drop_off_charges_currency:, - # Name of the person renting the vehicle. - renter_name:, - # Weekly rate being charged for the vehicle. - weekly_rental_rate_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - # rental rate. - weekly_rental_rate_currency: + # Ancillary purchases in addition to the airfare. + ancillary:, + # Indicates the computerized reservation system used to book the ticket. + computerized_reservation_system:, + # Indicates the reason for a credit to the cardholder. + credit_reason_indicator:, + # Date of departure. + departure_date:, + # Code for the originating city or airport. + origination_city_airport_code:, + # Name of the passenger. + passenger_name:, + # Indicates whether this ticket is non-refundable. + restricted_ticket_indicator:, + # Indicates why a ticket was changed. + ticket_change_indicator:, + # Ticket number. + ticket_number:, + # Code for the travel agency if the ticket was issued by a travel agency. + travel_agency_code:, + # Name of the travel agency if the ticket was issued by a travel agency. + travel_agency_name:, + # Fields specific to each leg of the journey. + trip_legs: ) end sig do override.returns( { - car_class_code: T.nilable(String), - checkout_date: T.nilable(Date), - daily_rental_rate_amount: T.nilable(Integer), - daily_rental_rate_currency: T.nilable(String), - days_rented: T.nilable(Integer), - extra_charges: + ancillary: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary ), - fuel_charges_amount: T.nilable(Integer), - fuel_charges_currency: T.nilable(String), - insurance_charges_amount: T.nilable(Integer), - insurance_charges_currency: T.nilable(String), - no_show_indicator: + computerized_reservation_system: T.nilable(String), + credit_reason_indicator: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol ), - one_way_drop_off_charges_amount: T.nilable(Integer), - one_way_drop_off_charges_currency: T.nilable(String), - renter_name: T.nilable(String), - weekly_rental_rate_amount: T.nilable(Integer), - weekly_rental_rate_currency: T.nilable(String) + departure_date: T.nilable(Date), + origination_city_airport_code: T.nilable(String), + passenger_name: T.nilable(String), + restricted_ticket_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ), + ticket_change_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ), + ticket_number: T.nilable(String), + travel_agency_code: T.nilable(String), + travel_agency_name: T.nilable(String), + trip_legs: + T.nilable( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg + ] + ) } ) end def to_hash end - # Additional charges (gas, late fee, etc.) being billed. - module ExtraCharges - extend Increase::Internal::Type::Enum - - TaggedSymbol = + class Ancillary < Increase::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges + T.any( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary, + Increase::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - # No extra charge - NO_EXTRA_CHARGE = - T.let( - :no_extra_charge, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # If this purchase has a connection or relationship to another purchase, such as a + # baggage fee for a passenger transport ticket, this field should contain the + # ticket document number for the other purchase. + sig { returns(T.nilable(String)) } + attr_accessor :connected_ticket_document_number - # Gas - GAS = - T.let( - :gas, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + # Indicates the reason for a credit to the cardholder. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) ) + end + attr_accessor :credit_reason_indicator - # Extra mileage - EXTRA_MILEAGE = - T.let( - :extra_mileage, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # Name of the passenger or description of the ancillary purchase. + sig { returns(T.nilable(String)) } + attr_accessor :passenger_name_or_description - # Late return - LATE_RETURN = - T.let( - :late_return, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol + # Additional travel charges, such as baggage fees. + sig do + returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service + ] ) + end + attr_accessor :services - # One way service fee - ONE_WAY_SERVICE_FEE = - T.let( - :one_way_service_fee, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # Ticket document number. + sig { returns(T.nilable(String)) } + attr_accessor :ticket_document_number - # Parking violation - PARKING_VIOLATION = - T.let( - :parking_violation, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ) + # Ancillary purchases in addition to the airfare. + sig do + params( + connected_ticket_document_number: T.nilable(String), + credit_reason_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::OrSymbol + ), + passenger_name_or_description: T.nilable(String), + services: + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::OrHash + ], + ticket_document_number: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # If this purchase has a connection or relationship to another purchase, such as a + # baggage fee for a passenger transport ticket, this field should contain the + # ticket document number for the other purchase. + connected_ticket_document_number:, + # Indicates the reason for a credit to the cardholder. + credit_reason_indicator:, + # Name of the passenger or description of the ancillary purchase. + passenger_name_or_description:, + # Additional travel charges, such as baggage fees. + services:, + # Ticket document number. + ticket_document_number: + ) + end sig do override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::ExtraCharges::TaggedSymbol - ] + { + connected_ticket_document_number: T.nilable(String), + credit_reason_indicator: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ), + passenger_name_or_description: T.nilable(String), + services: + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service + ], + ticket_document_number: T.nilable(String) + } ) end - def self.values + def to_hash end - end - # An indicator that the cardholder is being billed for a reserved vehicle that was - # not actually rented (that is, a "no-show" charge). - module NoShowIndicator - extend Increase::Internal::Type::Enum + # Indicates the reason for a credit to the cardholder. + module CreditReasonIndicator + extend Increase::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # No credit + NO_CREDIT = + T.let( + :no_credit, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - # Not applicable - NOT_APPLICABLE = - T.let( - :not_applicable, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ) + # Passenger transport ancillary purchase cancellation + PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) - # No show for specialized vehicle - NO_SHOW_FOR_SPECIALIZED_VEHICLE = - T.let( - :no_show_for_specialized_vehicle, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ) + # Airline ticket and passenger transport ancillary purchase cancellation + AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::CarRental::NoShowIndicator::TaggedSymbol - ] - ) - end - def self.values - end - end - end + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ) - class Lodging < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging, - Increase::Internal::AnyHash - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + ] + ) + end + def self.values + end end - # Date the customer checked in. - sig { returns(T.nilable(Date)) } - attr_accessor :check_in_date + class Service < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service, + Increase::Internal::AnyHash + ) + end - # Daily rate being charged for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :daily_room_rate_amount + # Category of the ancillary service. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + ) + end + attr_accessor :category - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - # rate. - sig { returns(T.nilable(String)) } - attr_accessor :daily_room_rate_currency + # Sub-category of the ancillary service, free-form. + sig { returns(T.nilable(String)) } + attr_accessor :sub_category - # Additional charges (phone, late check-out, etc.) being billed. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol + sig do + params( + category: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::OrSymbol + ), + sub_category: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # Category of the ancillary service. + category:, + # Sub-category of the ancillary service, free-form. + sub_category: ) - ) - end - attr_accessor :extra_charges + end - # Folio cash advances for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :folio_cash_advances_amount + sig do + override.returns( + { + category: + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ), + sub_category: T.nilable(String) + } + ) + end + def to_hash + end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - # advances. - sig { returns(T.nilable(String)) } - attr_accessor :folio_cash_advances_currency + # Category of the ancillary service. + module Category + extend Increase::Internal::Type::Enum - # Food and beverage charges for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :food_beverage_charges_amount + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - # beverage charges. - sig { returns(T.nilable(String)) } - attr_accessor :food_beverage_charges_currency + # None + NONE = + T.let( + :none, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Indicator that the cardholder is being billed for a reserved room that was not - # actually used. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ) - ) - end - attr_accessor :no_show_indicator + # Bundled service + BUNDLED_SERVICE = + T.let( + :bundled_service, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Prepaid expenses being charged for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :prepaid_expenses_amount + # Baggage fee + BAGGAGE_FEE = + T.let( + :baggage_fee, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - # expenses. - sig { returns(T.nilable(String)) } - attr_accessor :prepaid_expenses_currency + # Change fee + CHANGE_FEE = + T.let( + :change_fee, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Number of nights the room was rented. - sig { returns(T.nilable(Integer)) } - attr_accessor :room_nights + # Cargo + CARGO = + T.let( + :cargo, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Total room tax being charged. - sig { returns(T.nilable(Integer)) } - attr_accessor :total_room_tax_amount + # Carbon offset + CARBON_OFFSET = + T.let( + :carbon_offset, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - # tax. - sig { returns(T.nilable(String)) } - attr_accessor :total_room_tax_currency + # Frequent flyer + FREQUENT_FLYER = + T.let( + :frequent_flyer, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Total tax being charged for the room. - sig { returns(T.nilable(Integer)) } - attr_accessor :total_tax_amount + # Gift card + GIFT_CARD = + T.let( + :gift_card, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - # assessed. - sig { returns(T.nilable(String)) } - attr_accessor :total_tax_currency + # Ground transport + GROUND_TRANSPORT = + T.let( + :ground_transport, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Fields specific to lodging. - sig do - params( - check_in_date: T.nilable(Date), - daily_room_rate_amount: T.nilable(Integer), - daily_room_rate_currency: T.nilable(String), - extra_charges: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::OrSymbol - ), - folio_cash_advances_amount: T.nilable(Integer), - folio_cash_advances_currency: T.nilable(String), - food_beverage_charges_amount: T.nilable(Integer), - food_beverage_charges_currency: T.nilable(String), - no_show_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::OrSymbol - ), - prepaid_expenses_amount: T.nilable(Integer), - prepaid_expenses_currency: T.nilable(String), - room_nights: T.nilable(Integer), - total_room_tax_amount: T.nilable(Integer), - total_room_tax_currency: T.nilable(String), - total_tax_amount: T.nilable(Integer), - total_tax_currency: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Date the customer checked in. - check_in_date:, - # Daily rate being charged for the room. - daily_room_rate_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - # rate. - daily_room_rate_currency:, - # Additional charges (phone, late check-out, etc.) being billed. - extra_charges:, - # Folio cash advances for the room. - folio_cash_advances_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - # advances. - folio_cash_advances_currency:, - # Food and beverage charges for the room. - food_beverage_charges_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - # beverage charges. - food_beverage_charges_currency:, - # Indicator that the cardholder is being billed for a reserved room that was not - # actually used. - no_show_indicator:, - # Prepaid expenses being charged for the room. - prepaid_expenses_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - # expenses. - prepaid_expenses_currency:, - # Number of nights the room was rented. - room_nights:, - # Total room tax being charged. - total_room_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - # tax. - total_room_tax_currency:, - # Total tax being charged for the room. - total_tax_amount:, - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - # assessed. - total_tax_currency: - ) - end + # In-flight entertainment + IN_FLIGHT_ENTERTAINMENT = + T.let( + :in_flight_entertainment, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - sig do - override.returns( - { - check_in_date: T.nilable(Date), - daily_room_rate_amount: T.nilable(Integer), - daily_room_rate_currency: T.nilable(String), - extra_charges: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ), - folio_cash_advances_amount: T.nilable(Integer), - folio_cash_advances_currency: T.nilable(String), - food_beverage_charges_amount: T.nilable(Integer), - food_beverage_charges_currency: T.nilable(String), - no_show_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ), - prepaid_expenses_amount: T.nilable(Integer), - prepaid_expenses_currency: T.nilable(String), - room_nights: T.nilable(Integer), - total_room_tax_amount: T.nilable(Integer), - total_room_tax_currency: T.nilable(String), - total_tax_amount: T.nilable(Integer), - total_tax_currency: T.nilable(String) - } - ) - end - def to_hash - end + # Lounge + LOUNGE = + T.let( + :lounge, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Medical + MEDICAL = + T.let( + :medical, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Meal beverage + MEAL_BEVERAGE = + T.let( + :meal_beverage, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Additional charges (phone, late check-out, etc.) being billed. - module ExtraCharges - extend Increase::Internal::Type::Enum + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # Passenger assist fee + PASSENGER_ASSIST_FEE = + T.let( + :passenger_assist_fee, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # No extra charge - NO_EXTRA_CHARGE = - T.let( - :no_extra_charge, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Pets + PETS = + T.let( + :pets, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Restaurant - RESTAURANT = - T.let( - :restaurant, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Seat fees + SEAT_FEES = + T.let( + :seat_fees, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Gift shop - GIFT_SHOP = - T.let( - :gift_shop, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Standby + STANDBY = + T.let( + :standby, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Mini bar - MINI_BAR = - T.let( - :mini_bar, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Service fee + SERVICE_FEE = + T.let( + :service_fee, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Telephone - TELEPHONE = - T.let( - :telephone, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Store + STORE = + T.let( + :store, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Travel service + TRAVEL_SERVICE = + T.let( + :travel_service, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - # Laundry - LAUNDRY = - T.let( - :laundry, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ) + # Unaccompanied travel + UNACCOMPANIED_TRAVEL = + T.let( + :unaccompanied_travel, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::ExtraCharges::TaggedSymbol - ] - ) - end - def self.values + # Upgrades + UPGRADES = + T.let( + :upgrades, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + # Wi-fi + WIFI = + T.let( + :wifi, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol + ] + ) + end + def self.values + end + end end end - # Indicator that the cardholder is being billed for a reserved room that was not - # actually used. - module NoShowIndicator + # Indicates the reason for a credit to the cardholder. + module CreditReasonIndicator extend Increase::Internal::Type::Enum TaggedSymbol = T.type_alias do T.all( Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # Not applicable - NOT_APPLICABLE = + # No credit + NO_CREDIT = T.let( - :not_applicable, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol + :no_credit, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol ) - # No show - NO_SHOW = + # Passenger transport ancillary purchase cancellation + PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = T.let( - :no_show, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Lodging::NoShowIndicator::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The format of the purchase identifier. - module PurchaseIdentifierFormat - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - # Free text - FREE_TEXT = - T.let( - :free_text, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - # Order number - ORDER_NUMBER = - T.let( - :order_number, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - # Rental agreement number - RENTAL_AGREEMENT_NUMBER = - T.let( - :rental_agreement_number, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - # Hotel folio number - HOTEL_FOLIO_NUMBER = - T.let( - :hotel_folio_number, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - # Invoice number - INVOICE_NUMBER = - T.let( - :invoice_number, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::PurchaseIdentifierFormat::TaggedSymbol - ] - ) - end - def self.values - end - end - - class Travel < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel, - Increase::Internal::AnyHash + :passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol ) - end - # Ancillary purchases in addition to the airfare. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary + # Airline ticket and passenger transport ancillary purchase cancellation + AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + T.let( + :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol ) - ) - end - attr_reader :ancillary - sig do - params( - ancillary: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::OrHash - ) - ).void - end - attr_writer :ancillary + # Airline ticket cancellation + AIRLINE_TICKET_CANCELLATION = + T.let( + :airline_ticket_cancellation, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) - # Indicates the computerized reservation system used to book the ticket. - sig { returns(T.nilable(String)) } - attr_accessor :computerized_reservation_system + # Other + OTHER = + T.let( + :other, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ) - # Indicates the reason for a credit to the cardholder. - sig do - returns( - T.nilable( + # Partial refund of airline ticket + PARTIAL_REFUND_OF_AIRLINE_TICKET = + T.let( + :partial_refund_of_airline_ticket, Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol ) - ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol + ] + ) + end + def self.values + end end - attr_accessor :credit_reason_indicator - # Date of departure. - sig { returns(T.nilable(Date)) } - attr_accessor :departure_date + # Indicates whether this ticket is non-refundable. + module RestrictedTicketIndicator + extend Increase::Internal::Type::Enum - # Code for the originating city or airport. - sig { returns(T.nilable(String)) } - attr_accessor :origination_city_airport_code + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Name of the passenger. - sig { returns(T.nilable(String)) } - attr_accessor :passenger_name + # No restrictions + NO_RESTRICTIONS = + T.let( + :no_restrictions, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ) - # Indicates whether this ticket is non-refundable. - sig do - returns( - T.nilable( + # Restricted non-refundable ticket + RESTRICTED_NON_REFUNDABLE_TICKET = + T.let( + :restricted_non_refundable_ticket, Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol ) - ) + + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + ] + ) + end + def self.values + end end - attr_accessor :restricted_ticket_indicator # Indicates why a ticket was changed. - sig do - returns( - T.nilable( + module TicketChangeIndicator + extend Increase::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + # None + NONE = + T.let( + :none, Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol ) - ) - end - attr_accessor :ticket_change_indicator - - # Ticket number. - sig { returns(T.nilable(String)) } - attr_accessor :ticket_number - # Code for the travel agency if the ticket was issued by a travel agency. - sig { returns(T.nilable(String)) } - attr_accessor :travel_agency_code + # Change to existing ticket + CHANGE_TO_EXISTING_TICKET = + T.let( + :change_to_existing_ticket, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) - # Name of the travel agency if the ticket was issued by a travel agency. - sig { returns(T.nilable(String)) } - attr_accessor :travel_agency_name + # New ticket + NEW_TICKET = + T.let( + :new_ticket, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + ) - # Fields specific to each leg of the journey. - sig do - returns( - T.nilable( + sig do + override.returns( T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol ] ) - ) - end - attr_accessor :trip_legs - - # Fields specific to travel. - sig do - params( - ancillary: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::OrHash - ), - computerized_reservation_system: T.nilable(String), - credit_reason_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::OrSymbol - ), - departure_date: T.nilable(Date), - origination_city_airport_code: T.nilable(String), - passenger_name: T.nilable(String), - restricted_ticket_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::OrSymbol - ), - ticket_change_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::OrSymbol - ), - ticket_number: T.nilable(String), - travel_agency_code: T.nilable(String), - travel_agency_name: T.nilable(String), - trip_legs: - T.nilable( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::OrHash - ] - ) - ).returns(T.attached_class) - end - def self.new( - # Ancillary purchases in addition to the airfare. - ancillary:, - # Indicates the computerized reservation system used to book the ticket. - computerized_reservation_system:, - # Indicates the reason for a credit to the cardholder. - credit_reason_indicator:, - # Date of departure. - departure_date:, - # Code for the originating city or airport. - origination_city_airport_code:, - # Name of the passenger. - passenger_name:, - # Indicates whether this ticket is non-refundable. - restricted_ticket_indicator:, - # Indicates why a ticket was changed. - ticket_change_indicator:, - # Ticket number. - ticket_number:, - # Code for the travel agency if the ticket was issued by a travel agency. - travel_agency_code:, - # Name of the travel agency if the ticket was issued by a travel agency. - travel_agency_name:, - # Fields specific to each leg of the journey. - trip_legs: - ) - end - - sig do - override.returns( - { - ancillary: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary - ), - computerized_reservation_system: T.nilable(String), - credit_reason_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ), - departure_date: T.nilable(Date), - origination_city_airport_code: T.nilable(String), - passenger_name: T.nilable(String), - restricted_ticket_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ), - ticket_change_indicator: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ), - ticket_number: T.nilable(String), - travel_agency_code: T.nilable(String), - travel_agency_name: T.nilable(String), - trip_legs: - T.nilable( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg - ] - ) - } - ) - end - def to_hash + end + def self.values + end end - class Ancillary < Increase::Internal::Type::BaseModel + class TripLeg < Increase::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg, Increase::Internal::AnyHash ) end - # If this purchase has a connection or relationship to another purchase, such as a - # baggage fee for a passenger transport ticket, this field should contain the - # ticket document number for the other purchase. + # Carrier code (e.g., United Airlines, Jet Blue, etc.). + sig { returns(T.nilable(String)) } + attr_accessor :carrier_code + + # Code for the destination city or airport. sig { returns(T.nilable(String)) } - attr_accessor :connected_ticket_document_number + attr_accessor :destination_city_airport_code - # Indicates the reason for a credit to the cardholder. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) - ) - end - attr_accessor :credit_reason_indicator + # Fare basis code. + sig { returns(T.nilable(String)) } + attr_accessor :fare_basis_code - # Name of the passenger or description of the ancillary purchase. + # Flight number. sig { returns(T.nilable(String)) } - attr_accessor :passenger_name_or_description + attr_accessor :flight_number - # Additional travel charges, such as baggage fees. + # Service class (e.g., first class, business class, etc.). + sig { returns(T.nilable(String)) } + attr_accessor :service_class + + # Indicates whether a stopover is allowed on this ticket. sig do returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service - ] + T.nilable( + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) ) end - attr_accessor :services - - # Ticket document number. - sig { returns(T.nilable(String)) } - attr_accessor :ticket_document_number + attr_accessor :stop_over_code - # Ancillary purchases in addition to the airfare. sig do params( - connected_ticket_document_number: T.nilable(String), - credit_reason_indicator: + carrier_code: T.nilable(String), + destination_city_airport_code: T.nilable(String), + fare_basis_code: T.nilable(String), + flight_number: T.nilable(String), + service_class: T.nilable(String), + stop_over_code: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::OrSymbol - ), - passenger_name_or_description: T.nilable(String), - services: - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::OrHash - ], - ticket_document_number: T.nilable(String) + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::OrSymbol + ) ).returns(T.attached_class) end def self.new( - # If this purchase has a connection or relationship to another purchase, such as a - # baggage fee for a passenger transport ticket, this field should contain the - # ticket document number for the other purchase. - connected_ticket_document_number:, - # Indicates the reason for a credit to the cardholder. - credit_reason_indicator:, - # Name of the passenger or description of the ancillary purchase. - passenger_name_or_description:, - # Additional travel charges, such as baggage fees. - services:, - # Ticket document number. - ticket_document_number: + # Carrier code (e.g., United Airlines, Jet Blue, etc.). + carrier_code:, + # Code for the destination city or airport. + destination_city_airport_code:, + # Fare basis code. + fare_basis_code:, + # Flight number. + flight_number:, + # Service class (e.g., first class, business class, etc.). + service_class:, + # Indicates whether a stopover is allowed on this ticket. + stop_over_code: ) end sig do override.returns( { - connected_ticket_document_number: T.nilable(String), - credit_reason_indicator: + carrier_code: T.nilable(String), + destination_city_airport_code: T.nilable(String), + fare_basis_code: T.nilable(String), + flight_number: T.nilable(String), + service_class: T.nilable(String), + stop_over_code: T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ), - passenger_name_or_description: T.nilable(String), - services: - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service - ], - ticket_document_number: T.nilable(String) + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol + ) } ) end def to_hash end - # Indicates the reason for a credit to the cardholder. - module CreditReasonIndicator + # Indicates whether a stopover is allowed on this ticket. + module StopOverCode extend Increase::Internal::Type::Enum TaggedSymbol = T.type_alias do T.all( Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode ) end OrSymbol = T.type_alias { T.any(Symbol, String) } - # No credit - NO_CREDIT = - T.let( - :no_credit, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol - ) - - # Passenger transport ancillary purchase cancellation - PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + # None + NONE = T.let( - :passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + :none, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol ) - # Airline ticket and passenger transport ancillary purchase cancellation - AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = + # Stop over allowed + STOP_OVER_ALLOWED = T.let( - :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + :stop_over_allowed, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol ) - # Other - OTHER = + # Stop over not allowed + STOP_OVER_NOT_ALLOWED = T.let( - :other, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + :stop_over_not_allowed, + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol ) sig do override.returns( T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::CreditReasonIndicator::TaggedSymbol + Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol ] ) end def self.values end end + end + end + end - class Service < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service, - Increase::Internal::AnyHash - ) - end - - # Category of the ancillary service. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) - ) - end - attr_accessor :category - - # Sub-category of the ancillary service, free-form. - sig { returns(T.nilable(String)) } - attr_accessor :sub_category - - sig do - params( - category: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::OrSymbol - ), - sub_category: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # Category of the ancillary service. - category:, - # Sub-category of the ancillary service, free-form. - sub_category: - ) - end - - sig do - override.returns( - { - category: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ), - sub_category: T.nilable(String) - } - ) - end - def to_hash - end + # A constant representing the object's type. For this resource it will always be + # `card_settlement`. + module Type + extend Increase::Internal::Type::Enum - # Category of the ancillary service. - module Category - extend Increase::Internal::Type::Enum + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardSettlement::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + CARD_SETTLEMENT = + T.let( + :card_settlement, + Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol + ) - # None - NONE = - T.let( - :none, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol + ] + ) + end + def self.values + end + end + end - # Bundled service - BUNDLED_SERVICE = - T.let( - :bundled_service, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + class CardValidation < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation, + Increase::Internal::AnyHash + ) + end - # Baggage fee - BAGGAGE_FEE = - T.let( - :baggage_fee, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The Card Validation identifier. + sig { returns(String) } + attr_accessor :id - # Change fee - CHANGE_FEE = - T.let( - :change_fee, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Whether this authorization was approved by Increase, the card network through + # stand-in processing, or the user through a real-time decision. + sig do + returns( + Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol + ) + end + attr_accessor :actioner - # Cargo - CARGO = - T.let( - :cargo, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # 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::CardPayment::Element::CardValidation::AdditionalAmounts + ) + end + attr_reader :additional_amounts - # Carbon offset - CARBON_OFFSET = - T.let( - :carbon_offset, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + additional_amounts: + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::OrHash + ).void + end + attr_writer :additional_amounts - # Frequent flyer - FREQUENT_FLYER = - T.let( - :frequent_flyer, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The ID of the Card Payment this transaction belongs to. + sig { returns(String) } + attr_accessor :card_payment_id - # Gift card - GIFT_CARD = - T.let( - :gift_card, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + # transaction's currency. + sig do + returns( + Increase::CardPayment::Element::CardValidation::Currency::TaggedSymbol + ) + end + attr_accessor :currency - # Ground transport - GROUND_TRANSPORT = - T.let( - :ground_transport, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # 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 - # In-flight entertainment - IN_FLIGHT_ENTERTAINMENT = - T.let( - :in_flight_entertainment, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The merchant identifier (commonly abbreviated as MID) of the merchant the card + # is transacting with. + sig { returns(String) } + attr_accessor :merchant_acceptor_id - # Lounge - LOUNGE = - T.let( - :lounge, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + # card is transacting with. + sig { returns(String) } + attr_accessor :merchant_category_code - # Medical - MEDICAL = - T.let( - :medical, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The city the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_city - # Meal beverage - MEAL_BEVERAGE = - T.let( - :meal_beverage, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The country the merchant resides in. + sig { returns(String) } + attr_accessor :merchant_country - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The merchant descriptor of the merchant the card is transacting with. + sig { returns(String) } + attr_accessor :merchant_descriptor - # Passenger assist fee - PASSENGER_ASSIST_FEE = - T.let( - :passenger_assist_fee, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # 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 - # Pets - PETS = - T.let( - :pets, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The state the merchant resides in. + sig { returns(T.nilable(String)) } + attr_accessor :merchant_state - # Seat fees - SEAT_FEES = - T.let( - :seat_fees, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Fields specific to the `network`. + sig do + returns( + Increase::CardPayment::Element::CardValidation::NetworkDetails + ) + end + attr_reader :network_details - # Standby - STANDBY = - T.let( - :standby, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + network_details: + Increase::CardPayment::Element::CardValidation::NetworkDetails::OrHash + ).void + end + attr_writer :network_details - # Service fee - SERVICE_FEE = - T.let( - :service_fee, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # Network-specific identifiers for a specific request or transaction. + sig do + returns( + Increase::CardPayment::Element::CardValidation::NetworkIdentifiers + ) + end + attr_reader :network_identifiers - # Store - STORE = - T.let( - :store, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + sig do + params( + network_identifiers: + Increase::CardPayment::Element::CardValidation::NetworkIdentifiers::OrHash + ).void + end + attr_writer :network_identifiers - # Travel service - TRAVEL_SERVICE = - T.let( - :travel_service, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # 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 - # Unaccompanied travel - UNACCOMPANIED_TRAVEL = - T.let( - :unaccompanied_travel, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # 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 - # Upgrades - UPGRADES = - T.let( - :upgrades, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # 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 - # Wi-fi - WIFI = - T.let( - :wifi, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ) + # The terminal identifier (commonly abbreviated as TID) of the terminal the card + # is transacting with. + sig { returns(T.nilable(String)) } + attr_accessor :terminal_id - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::Ancillary::Service::Category::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end + # A constant representing the object's type. For this resource it will always be + # `inbound_card_validation`. + sig do + returns( + Increase::CardPayment::Element::CardValidation::Type::TaggedSymbol + ) + end + attr_accessor :type + + # Fields related to verification of cardholder-provided values. + sig do + returns( + Increase::CardPayment::Element::CardValidation::Verification + ) + end + attr_reader :verification - # Indicates the reason for a credit to the cardholder. - module CreditReasonIndicator - extend Increase::Internal::Type::Enum + sig do + params( + verification: + Increase::CardPayment::Element::CardValidation::Verification::OrHash + ).void + end + attr_writer :verification - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # An Inbound Card Validation object. This field will be present in the JSON + # response if and only if `category` is equal to `card_validation`. Inbound Card + # Validations are requests from a merchant to verify that a card number and + # optionally its address and/or Card Verification Value are valid. + sig do + params( + id: String, + actioner: + Increase::CardPayment::Element::CardValidation::Actioner::OrSymbol, + additional_amounts: + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::OrHash, + card_payment_id: String, + currency: + Increase::CardPayment::Element::CardValidation::Currency::OrSymbol, + digital_wallet_token_id: T.nilable(String), + 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::CardPayment::Element::CardValidation::NetworkDetails::OrHash, + network_identifiers: + Increase::CardPayment::Element::CardValidation::NetworkIdentifiers::OrHash, + network_risk_score: T.nilable(Integer), + physical_card_id: T.nilable(String), + real_time_decision_id: T.nilable(String), + terminal_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardValidation::Type::OrSymbol, + verification: + Increase::CardPayment::Element::CardValidation::Verification::OrHash + ).returns(T.attached_class) + end + def self.new( + # The Card Validation identifier. + id:, + # Whether this authorization 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 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 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 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:, + # A constant representing the object's type. For this resource it will always be + # `inbound_card_validation`. + type:, + # Fields related to verification of cardholder-provided values. + verification: + ) + end - # No credit - NO_CREDIT = - T.let( - :no_credit, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + sig do + override.returns( + { + id: String, + actioner: + Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol, + additional_amounts: + Increase::CardPayment::Element::CardValidation::AdditionalAmounts, + card_payment_id: String, + currency: + Increase::CardPayment::Element::CardValidation::Currency::TaggedSymbol, + digital_wallet_token_id: T.nilable(String), + 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::CardPayment::Element::CardValidation::NetworkDetails, + network_identifiers: + Increase::CardPayment::Element::CardValidation::NetworkIdentifiers, + network_risk_score: T.nilable(Integer), + physical_card_id: T.nilable(String), + real_time_decision_id: T.nilable(String), + terminal_id: T.nilable(String), + type: + Increase::CardPayment::Element::CardValidation::Type::TaggedSymbol, + verification: + Increase::CardPayment::Element::CardValidation::Verification + } + ) + end + def to_hash + end - # Passenger transport ancillary purchase cancellation - PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = - T.let( - :passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # Whether this authorization 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 - # Airline ticket and passenger transport ancillary purchase cancellation - AIRLINE_TICKET_AND_PASSENGER_TRANSPORT_ANCILLARY_PURCHASE_CANCELLATION = - T.let( - :airline_ticket_and_passenger_transport_ancillary_purchase_cancellation, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Increase::CardPayment::Element::CardValidation::Actioner + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Airline ticket cancellation - AIRLINE_TICKET_CANCELLATION = - T.let( - :airline_ticket_cancellation, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # This object was actioned by the user through a real-time decision. + USER = + T.let( + :user, + Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol + ) - # Other - OTHER = - T.let( - :other, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # This object was actioned by Increase without user intervention. + INCREASE = + T.let( + :increase, + Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol + ) - # Partial refund of airline ticket - PARTIAL_REFUND_OF_AIRLINE_TICKET = - T.let( - :partial_refund_of_airline_ticket, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ) + # This object was actioned by the network, through stand-in processing. + NETWORK = + T.let( + :network, + Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol + ) - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::CreditReasonIndicator::TaggedSymbol - ] - ) - end - def self.values - end - end + sig do + override.returns( + T::Array[ + Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol + ] + ) + end + def self.values + end + end - # Indicates whether this ticket is non-refundable. - module RestrictedTicketIndicator - extend Increase::Internal::Type::Enum + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts, + Increase::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic - # No restrictions - NO_RESTRICTIONS = - T.let( - :no_restrictions, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol + sig do + params( + clinic: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic::OrHash ) + ).void + end + attr_writer :clinic - # Restricted non-refundable ticket - RESTRICTED_NON_REFUNDABLE_TICKET = - T.let( - :restricted_non_refundable_ticket, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ) + # The part of this transaction amount that was for dental-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental + ) + ) + end + attr_reader :dental - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::RestrictedTicketIndicator::TaggedSymbol - ] + sig do + params( + dental: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental::OrHash ) - end - def self.values - end - end - - # Indicates why a ticket was changed. - module TicketChangeIndicator - extend Increase::Internal::Type::Enum + ).void + end + attr_writer :dental - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The part of this transaction amount that was for healthcare prescriptions. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription + ) + ) + end + attr_reader :prescription - # None - NONE = - T.let( - :none, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + sig do + params( + prescription: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription::OrHash ) + ).void + end + attr_writer :prescription - # Change to existing ticket - CHANGE_TO_EXISTING_TICKET = - T.let( - :change_to_existing_ticket, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge + ) + ) + end + attr_reader :surcharge + + sig do + params( + surcharge: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge::OrHash ) + ).void + end + attr_writer :surcharge - # New ticket - NEW_TICKET = - T.let( - :new_ticket, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol + # The total amount of a series of incremental authorizations, optionally provided. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative + ) + ) + end + attr_reader :total_cumulative + + sig do + params( + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative::OrHash ) + ).void + end + attr_writer :total_cumulative - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TicketChangeIndicator::TaggedSymbol - ] + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare + ) + ) + end + attr_reader :total_healthcare + + sig do + params( + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare::OrHash ) - end - def self.values - end - end + ).void + end + attr_writer :total_healthcare - class TripLeg < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg, - Increase::Internal::AnyHash - ) - end + # The part of this transaction amount that was for transit-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit + ) + ) + end + attr_reader :transit - # Carrier code (e.g., United Airlines, Jet Blue, etc.). - sig { returns(T.nilable(String)) } - attr_accessor :carrier_code + sig do + params( + transit: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit - # Code for the destination city or airport. - sig { returns(T.nilable(String)) } - attr_accessor :destination_city_airport_code + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown + ) + ) + end + attr_reader :unknown - # Fare basis code. - sig { returns(T.nilable(String)) } - attr_accessor :fare_basis_code + sig do + params( + unknown: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown::OrHash + ) + ).void + end + attr_writer :unknown - # Flight number. - sig { returns(T.nilable(String)) } - attr_accessor :flight_number + # The part of this transaction amount that was for vision-related services. + sig do + returns( + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision + ) + ) + end + attr_reader :vision - # Service class (e.g., first class, business class, etc.). - sig { returns(T.nilable(String)) } - attr_accessor :service_class + sig do + params( + vision: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision::OrHash + ) + ).void + end + attr_writer :vision - # Indicates whether a stopover is allowed on this ticket. - sig do - returns( - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + # 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::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision::OrHash ) - end - attr_accessor :stop_over_code + ).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 - params( - carrier_code: T.nilable(String), - destination_city_airport_code: T.nilable(String), - fare_basis_code: T.nilable(String), - flight_number: T.nilable(String), - service_class: T.nilable(String), - stop_over_code: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::OrSymbol - ) - ).returns(T.attached_class) - end - def self.new( - # Carrier code (e.g., United Airlines, Jet Blue, etc.). - carrier_code:, - # Code for the destination city or airport. - destination_city_airport_code:, - # Fare basis code. - fare_basis_code:, - # Flight number. - flight_number:, - # Service class (e.g., first class, business class, etc.). - service_class:, - # Indicates whether a stopover is allowed on this ticket. - stop_over_code: - ) - end + sig do + override.returns( + { + clinic: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision + ) + } + ) + end + def to_hash + end - sig do - override.returns( - { - carrier_code: T.nilable(String), - destination_city_airport_code: T.nilable(String), - fare_basis_code: T.nilable(String), - flight_number: T.nilable(String), - service_class: T.nilable(String), - stop_over_code: - T.nilable( - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) - } + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash ) end - def to_hash - end - - # Indicates whether a stopover is allowed on this ticket. - module StopOverCode - extend Increase::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - # None - NONE = - T.let( - :none, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Stop over allowed - STOP_OVER_ALLOWED = - T.let( - :stop_over_allowed, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # Stop over not allowed - STOP_OVER_NOT_ALLOWED = - T.let( - :stop_over_not_allowed, - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ) + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::PurchaseDetails::Travel::TripLeg::StopOverCode::TaggedSymbol - ] - ) - end - def self.values - end - end + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash end end - end - # A constant representing the object's type. For this resource it will always be - # `card_settlement`. - module Type - extend Increase::Internal::Type::Enum + class Dental < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardSettlement::Type - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - CARD_SETTLEMENT = - T.let( - :card_settlement, - Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol - ) + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardSettlement::Type::TaggedSymbol - ] + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) - end - def self.values - end - end - end + end - class CardValidation < Increase::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Increase::CardPayment::Element::CardValidation, - Increase::Internal::AnyHash - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end end - # The Card Validation identifier. - sig { returns(String) } - attr_accessor :id - - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - sig do - returns( - Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol - ) - end - attr_accessor :actioner - - # The ID of the Card Payment this transaction belongs to. - sig { returns(String) } - attr_accessor :card_payment_id + class Prescription < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash + ) + end - # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - # transaction's currency. - sig do - returns( - Increase::CardPayment::Element::CardValidation::Currency::TaggedSymbol - ) - end - attr_accessor :currency + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # 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 [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # The merchant identifier (commonly abbreviated as MID) of the merchant the card - # is transacting with. - sig { returns(String) } - attr_accessor :merchant_acceptor_id + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - # card is transacting with. - sig { returns(String) } - attr_accessor :merchant_category_code + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # The city the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_city + class Surcharge < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end - # The country the merchant resides in. - sig { returns(String) } - attr_accessor :merchant_country + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # The merchant descriptor of the merchant the card is transacting with. - sig { returns(String) } - attr_accessor :merchant_descriptor + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # 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 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # The state the merchant resides in. - sig { returns(T.nilable(String)) } - attr_accessor :merchant_state + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # Fields specific to the `network`. - sig do - returns( - Increase::CardPayment::Element::CardValidation::NetworkDetails - ) - end - attr_reader :network_details + class TotalCumulative < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end - sig do - params( - network_details: - Increase::CardPayment::Element::CardValidation::NetworkDetails::OrHash - ).void - end - attr_writer :network_details + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # Network-specific identifiers for a specific request or transaction. - sig do - returns( - Increase::CardPayment::Element::CardValidation::NetworkIdentifiers - ) - end - attr_reader :network_identifiers + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - sig do - params( - network_identifiers: - Increase::CardPayment::Element::CardValidation::NetworkIdentifiers::OrHash - ).void - end - attr_writer :network_identifiers + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # 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 + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # 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 + class TotalHealthcare < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash + ) + end - # 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 amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - # 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 [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + sig { returns(String) } + attr_accessor :currency - # A constant representing the object's type. For this resource it will always be - # `inbound_card_validation`. - sig do - returns( - Increase::CardPayment::Element::CardValidation::Type::TaggedSymbol - ) - end - attr_accessor :type + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: + ) + end - # Fields related to verification of cardholder-provided values. - sig do - returns( - Increase::CardPayment::Element::CardValidation::Verification - ) - end - attr_reader :verification + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - sig do - params( - verification: - Increase::CardPayment::Element::CardValidation::Verification::OrHash - ).void - end - attr_writer :verification + class Transit < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit, + Increase::Internal::AnyHash + ) + end - # An Inbound Card Validation object. This field will be present in the JSON - # response if and only if `category` is equal to `card_validation`. Inbound Card - # Validations are requests from a merchant to verify that a card number and - # optionally its address and/or Card Verification Value are valid. - sig do - params( - id: String, - actioner: - Increase::CardPayment::Element::CardValidation::Actioner::OrSymbol, - card_payment_id: String, - currency: - Increase::CardPayment::Element::CardValidation::Currency::OrSymbol, - digital_wallet_token_id: T.nilable(String), - 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::CardPayment::Element::CardValidation::NetworkDetails::OrHash, - network_identifiers: - Increase::CardPayment::Element::CardValidation::NetworkIdentifiers::OrHash, - network_risk_score: T.nilable(Integer), - physical_card_id: T.nilable(String), - real_time_decision_id: T.nilable(String), - terminal_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardValidation::Type::OrSymbol, - verification: - Increase::CardPayment::Element::CardValidation::Verification::OrHash - ).returns(T.attached_class) - end - def self.new( - # The Card Validation identifier. - id:, - # Whether this authorization was approved by Increase, the card network through - # stand-in processing, or the user through a real-time decision. - actioner:, - # 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 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 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:, - # A constant representing the object's type. For this resource it will always be - # `inbound_card_validation`. - type:, - # Fields related to verification of cardholder-provided values. - verification: - ) - end + # The amount in minor units of the `currency` field. + sig { returns(Integer) } + attr_accessor :amount - sig do - override.returns( - { - id: String, - actioner: - Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol, - card_payment_id: String, + # 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. currency: - Increase::CardPayment::Element::CardValidation::Currency::TaggedSymbol, - digital_wallet_token_id: T.nilable(String), - 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::CardPayment::Element::CardValidation::NetworkDetails, - network_identifiers: - Increase::CardPayment::Element::CardValidation::NetworkIdentifiers, - network_risk_score: T.nilable(Integer), - physical_card_id: T.nilable(String), - real_time_decision_id: T.nilable(String), - terminal_id: T.nilable(String), - type: - Increase::CardPayment::Element::CardValidation::Type::TaggedSymbol, - verification: - Increase::CardPayment::Element::CardValidation::Verification - } - ) - end - def to_hash - end + ) + end - # Whether this authorization 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 + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Increase::CardPayment::Element::CardValidation::Actioner + class Unknown < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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 - 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::CardPayment::Element::CardValidation::Actioner::TaggedSymbol + def self.new( + # The amount in minor units of the `currency` field. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) + end - # This object was actioned by Increase without user intervention. - INCREASE = - T.let( - :increase, - Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol - ) + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end + end - # This object was actioned by the network, through stand-in processing. - NETWORK = - T.let( - :network, - Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol - ) + class Vision < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision, + Increase::Internal::AnyHash + ) + end - sig do - override.returns( - T::Array[ - Increase::CardPayment::Element::CardValidation::Actioner::TaggedSymbol - ] + # The amount in minor units of the `currency` field. + 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. + amount:, + # The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + # amount's currency. + currency: ) - end - def self.values + end + + sig { override.returns({ amount: Integer, currency: String }) } + def to_hash + end end end diff --git a/rbi/increase/models/declined_transaction.rbi b/rbi/increase/models/declined_transaction.rbi index bd7343ff5..c208ab8f7 100644 --- a/rbi/increase/models/declined_transaction.rbi +++ b/rbi/increase/models/declined_transaction.rbi @@ -774,6 +774,24 @@ module Increase 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts + ) + end + attr_reader :additional_amounts + + sig do + params( + additional_amounts: + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::OrHash + ).void + end + attr_writer :additional_amounts + # The declined amount in the minor unit of the destination account currency. For # dollars, for example, this is cents. sig { returns(Integer) } @@ -953,6 +971,8 @@ module Increase id: String, actioner: Increase::DeclinedTransaction::Source::CardDecline::Actioner::OrSymbol, + additional_amounts: + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::OrHash, amount: Integer, card_payment_id: String, currency: @@ -996,6 +1016,10 @@ module Increase # Whether this authorization 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 declined amount in the minor unit of the destination account currency. For # dollars, for example, this is cents. amount:, @@ -1069,6 +1093,8 @@ module Increase id: String, actioner: Increase::DeclinedTransaction::Source::CardDecline::Actioner::TaggedSymbol, + additional_amounts: + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: @@ -1156,6 +1182,648 @@ module Increase end end + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts, + Increase::Internal::AnyHash + ) + end + + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic + + sig do + params( + clinic: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental + ) + ) + end + attr_reader :dental + + sig do + params( + dental: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription + ) + ) + end + attr_reader :prescription + + sig do + params( + prescription: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription + + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge + ) + ) + end + attr_reader :surcharge + + sig do + params( + surcharge: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative + ) + ) + end + attr_reader :total_cumulative + + sig do + params( + total_cumulative: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative + + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare + ) + ) + end + attr_reader :total_healthcare + + sig do + params( + total_healthcare: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit + ) + ) + end + attr_reader :transit + + sig do + params( + transit: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit + + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown + ) + ) + end + attr_reader :unknown + + sig do + params( + unknown: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision + ) + ) + end + attr_reader :vision + + sig do + params( + vision: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision + ) + } + ) + end + def to_hash + end + + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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 destination # account currency. module Currency diff --git a/rbi/increase/models/pending_transaction.rbi b/rbi/increase/models/pending_transaction.rbi index 8dd58a99a..34a5a00b9 100644 --- a/rbi/increase/models/pending_transaction.rbi +++ b/rbi/increase/models/pending_transaction.rbi @@ -889,6 +889,24 @@ module Increase 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts + ) + end + attr_reader :additional_amounts + + sig do + params( + additional_amounts: + Increase::PendingTransaction::Source::CardAuthorization::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) } @@ -1065,6 +1083,8 @@ module Increase id: String, actioner: Increase::PendingTransaction::Source::CardAuthorization::Actioner::OrSymbol, + additional_amounts: + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::OrHash, amount: Integer, card_payment_id: String, currency: @@ -1105,6 +1125,10 @@ module Increase # Whether this authorization 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:, @@ -1179,6 +1203,8 @@ module Increase id: String, actioner: Increase::PendingTransaction::Source::CardAuthorization::Actioner::TaggedSymbol, + additional_amounts: + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: @@ -1263,6 +1289,648 @@ module Increase end end + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts, + Increase::Internal::AnyHash + ) + end + + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic + + sig do + params( + clinic: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental + ) + ) + end + attr_reader :dental + + sig do + params( + dental: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription + ) + ) + end + attr_reader :prescription + + sig do + params( + prescription: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription + + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge + ) + ) + end + attr_reader :surcharge + + sig do + params( + surcharge: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative + ) + ) + end + attr_reader :total_cumulative + + sig do + params( + total_cumulative: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative + + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare + ) + ) + end + attr_reader :total_healthcare + + sig do + params( + total_healthcare: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit + ) + ) + end + attr_reader :transit + + sig do + params( + transit: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit + + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown + ) + ) + end + attr_reader :unknown + + sig do + params( + unknown: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision + ) + ) + end + attr_reader :vision + + sig do + params( + vision: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision + ) + } + ) + end + def to_hash + end + + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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 diff --git a/rbi/increase/models/real_time_decision.rbi b/rbi/increase/models/real_time_decision.rbi index 060983a86..34d229261 100644 --- a/rbi/increase/models/real_time_decision.rbi +++ b/rbi/increase/models/real_time_decision.rbi @@ -445,6 +445,24 @@ module Increase sig { returns(String) } attr_accessor :account_id + # 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::RealTimeDecision::CardAuthorization::AdditionalAmounts + ) + end + attr_reader :additional_amounts + + sig do + params( + additional_amounts: + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::OrHash + ).void + end + attr_writer :additional_amounts + # The identifier of the Card that is being authorized. sig { returns(String) } attr_accessor :card_id @@ -616,6 +634,8 @@ module Increase sig do params( account_id: String, + additional_amounts: + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::OrHash, card_id: String, decision: T.nilable( @@ -654,6 +674,10 @@ module Increase def self.new( # The identifier of the Account the authorization will debit. account_id:, + # 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 identifier of the Card that is being authorized. card_id:, # Whether or not the authorization was approved. @@ -724,6 +748,8 @@ module Increase override.returns( { account_id: String, + additional_amounts: + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: T.nilable( @@ -763,6 +789,648 @@ module Increase def to_hash end + class AdditionalAmounts < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, + Increase::Internal::AnyHash + ) + end + + # The part of this transaction amount that was for clinic-related services. + sig do + returns( + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic + ) + ) + end + attr_reader :clinic + + sig do + params( + clinic: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental + ) + ) + end + attr_reader :dental + + sig do + params( + dental: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription + ) + ) + end + attr_reader :prescription + + sig do + params( + prescription: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription::OrHash + ) + ).void + end + attr_writer :prescription + + # The surcharge amount charged for this transaction by the merchant. + sig do + returns( + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge + ) + ) + end + attr_reader :surcharge + + sig do + params( + surcharge: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative + ) + ) + end + attr_reader :total_cumulative + + sig do + params( + total_cumulative: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative::OrHash + ) + ).void + end + attr_writer :total_cumulative + + # The total amount of healthcare-related additional amounts. + sig do + returns( + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare + ) + ) + end + attr_reader :total_healthcare + + sig do + params( + total_healthcare: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit + ) + ) + end + attr_reader :transit + + sig do + params( + transit: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit::OrHash + ) + ).void + end + attr_writer :transit + + # An unknown additional amount. + sig do + returns( + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown + ) + ) + end + attr_reader :unknown + + sig do + params( + unknown: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision + ) + ) + end + attr_reader :vision + + sig do + params( + vision: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic::OrHash + ), + dental: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental::OrHash + ), + prescription: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription::OrHash + ), + surcharge: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge::OrHash + ), + total_cumulative: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative::OrHash + ), + total_healthcare: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare::OrHash + ), + transit: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit::OrHash + ), + unknown: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown::OrHash + ), + vision: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic + ), + dental: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental + ), + prescription: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription + ), + surcharge: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge + ), + total_cumulative: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative + ), + total_healthcare: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare + ), + transit: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit + ), + unknown: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown + ), + vision: + T.nilable( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision + ) + } + ) + end + def to_hash + end + + class Clinic < Increase::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision, + Increase::Internal::AnyHash + ) + end + + # The amount in minor units of the `currency` field. + 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. + 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 + # Whether or not the authorization was approved. module Decision extend Increase::Internal::Type::Enum diff --git a/sig/increase/models/card_payment.rbs b/sig/increase/models/card_payment.rbs index 3d7bcb258..0ef006534 100644 --- a/sig/increase/models/card_payment.rbs +++ b/sig/increase/models/card_payment.rbs @@ -440,6 +440,7 @@ module Increase { id: String, actioner: Increase::Models::CardPayment::Element::CardAuthorization::actioner, + additional_amounts: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardAuthorization::currency, @@ -472,6 +473,8 @@ module Increase attr_accessor actioner: Increase::Models::CardPayment::Element::CardAuthorization::actioner + attr_accessor additional_amounts: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts + attr_accessor amount: Integer attr_accessor card_payment_id: String @@ -525,6 +528,7 @@ module Increase def initialize: ( id: String, actioner: Increase::Models::CardPayment::Element::CardAuthorization::actioner, + additional_amounts: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardAuthorization::currency, @@ -555,6 +559,7 @@ module Increase def to_hash: -> { id: String, actioner: Increase::Models::CardPayment::Element::CardAuthorization::actioner, + additional_amounts: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardAuthorization::currency, @@ -599,6 +604,171 @@ module Increase def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardAuthorization::actioner] end + type additional_amounts = + { + clinic: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardAuthorization::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 @@ -1123,6 +1293,7 @@ module Increase { id: String, actioner: Increase::Models::CardPayment::Element::CardDecline::actioner, + additional_amounts: Increase::CardPayment::Element::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardDecline::currency, @@ -1155,6 +1326,8 @@ module Increase attr_accessor actioner: Increase::Models::CardPayment::Element::CardDecline::actioner + attr_accessor additional_amounts: Increase::CardPayment::Element::CardDecline::AdditionalAmounts + attr_accessor amount: Integer attr_accessor card_payment_id: String @@ -1208,6 +1381,7 @@ module Increase def initialize: ( id: String, actioner: Increase::Models::CardPayment::Element::CardDecline::actioner, + additional_amounts: Increase::CardPayment::Element::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardDecline::currency, @@ -1238,6 +1412,7 @@ module Increase def to_hash: -> { id: String, actioner: Increase::Models::CardPayment::Element::CardDecline::actioner, + additional_amounts: Increase::CardPayment::Element::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardDecline::currency, @@ -1282,6 +1457,171 @@ module Increase def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardDecline::actioner] end + type additional_amounts = + { + clinic: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardDecline::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardDecline::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 @@ -1953,6 +2293,7 @@ module Increase { id: String, actioner: Increase::Models::CardPayment::Element::CardIncrement::actioner, + additional_amounts: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts, amount: Integer, card_authorization_id: String, currency: Increase::Models::CardPayment::Element::CardIncrement::currency, @@ -1960,6 +2301,8 @@ module Increase network_identifiers: Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, network_risk_score: Integer?, pending_transaction_id: String?, + presentment_amount: Integer, + presentment_currency: String, real_time_decision_id: String?, type: Increase::Models::CardPayment::Element::CardIncrement::type_, updated_authorization_amount: Integer @@ -1970,6 +2313,8 @@ module Increase attr_accessor actioner: Increase::Models::CardPayment::Element::CardIncrement::actioner + attr_accessor additional_amounts: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts + attr_accessor amount: Integer attr_accessor card_authorization_id: String @@ -1984,6 +2329,10 @@ module Increase attr_accessor pending_transaction_id: String? + attr_accessor presentment_amount: Integer + + attr_accessor presentment_currency: String + attr_accessor real_time_decision_id: String? attr_accessor type: Increase::Models::CardPayment::Element::CardIncrement::type_ @@ -1993,6 +2342,7 @@ module Increase def initialize: ( id: String, actioner: Increase::Models::CardPayment::Element::CardIncrement::actioner, + additional_amounts: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts, amount: Integer, card_authorization_id: String, currency: Increase::Models::CardPayment::Element::CardIncrement::currency, @@ -2000,6 +2350,8 @@ module Increase network_identifiers: Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, network_risk_score: Integer?, pending_transaction_id: String?, + presentment_amount: Integer, + presentment_currency: String, real_time_decision_id: String?, type: Increase::Models::CardPayment::Element::CardIncrement::type_, updated_authorization_amount: Integer @@ -2008,6 +2360,7 @@ module Increase def to_hash: -> { id: String, actioner: Increase::Models::CardPayment::Element::CardIncrement::actioner, + additional_amounts: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts, amount: Integer, card_authorization_id: String, currency: Increase::Models::CardPayment::Element::CardIncrement::currency, @@ -2015,6 +2368,8 @@ module Increase network_identifiers: Increase::CardPayment::Element::CardIncrement::NetworkIdentifiers, network_risk_score: Integer?, pending_transaction_id: String?, + presentment_amount: Integer, + presentment_currency: String, real_time_decision_id: String?, type: Increase::Models::CardPayment::Element::CardIncrement::type_, updated_authorization_amount: Integer @@ -2037,6 +2392,171 @@ module Increase def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardIncrement::actioner] end + type additional_amounts = + { + clinic: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardIncrement::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardIncrement::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 @@ -4393,6 +4913,7 @@ module Increase { id: String, actioner: Increase::Models::CardPayment::Element::CardValidation::actioner, + additional_amounts: Increase::CardPayment::Element::CardValidation::AdditionalAmounts, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardValidation::currency, digital_wallet_token_id: String?, @@ -4418,6 +4939,8 @@ module Increase attr_accessor actioner: Increase::Models::CardPayment::Element::CardValidation::actioner + attr_accessor additional_amounts: Increase::CardPayment::Element::CardValidation::AdditionalAmounts + attr_accessor card_payment_id: String attr_accessor currency: Increase::Models::CardPayment::Element::CardValidation::currency @@ -4457,6 +4980,7 @@ module Increase def initialize: ( id: String, actioner: Increase::Models::CardPayment::Element::CardValidation::actioner, + additional_amounts: Increase::CardPayment::Element::CardValidation::AdditionalAmounts, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardValidation::currency, digital_wallet_token_id: String?, @@ -4480,6 +5004,7 @@ module Increase def to_hash: -> { id: String, actioner: Increase::Models::CardPayment::Element::CardValidation::actioner, + additional_amounts: Increase::CardPayment::Element::CardValidation::AdditionalAmounts, card_payment_id: String, currency: Increase::Models::CardPayment::Element::CardValidation::currency, digital_wallet_token_id: String?, @@ -4517,6 +5042,171 @@ module Increase def self?.values: -> ::Array[Increase::Models::CardPayment::Element::CardValidation::actioner] end + type additional_amounts = + { + clinic: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Clinic?, + dental: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Dental?, + prescription: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Prescription?, + surcharge: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::TotalHealthcare?, + transit: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Transit?, + unknown: Increase::CardPayment::Element::CardValidation::AdditionalAmounts::Unknown?, + vision: Increase::CardPayment::Element::CardValidation::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 diff --git a/sig/increase/models/declined_transaction.rbs b/sig/increase/models/declined_transaction.rbs index c20530769..6c550e933 100644 --- a/sig/increase/models/declined_transaction.rbs +++ b/sig/increase/models/declined_transaction.rbs @@ -317,6 +317,7 @@ module Increase { id: String, actioner: Increase::Models::DeclinedTransaction::Source::CardDecline::actioner, + additional_amounts: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::DeclinedTransaction::Source::CardDecline::currency, @@ -349,6 +350,8 @@ module Increase attr_accessor actioner: Increase::Models::DeclinedTransaction::Source::CardDecline::actioner + attr_accessor additional_amounts: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts + attr_accessor amount: Integer attr_accessor card_payment_id: String @@ -402,6 +405,7 @@ module Increase def initialize: ( id: String, actioner: Increase::Models::DeclinedTransaction::Source::CardDecline::actioner, + additional_amounts: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::DeclinedTransaction::Source::CardDecline::currency, @@ -432,6 +436,7 @@ module Increase def to_hash: -> { id: String, actioner: Increase::Models::DeclinedTransaction::Source::CardDecline::actioner, + additional_amounts: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::DeclinedTransaction::Source::CardDecline::currency, @@ -476,6 +481,171 @@ module Increase def self?.values: -> ::Array[Increase::Models::DeclinedTransaction::Source::CardDecline::actioner] end + type additional_amounts = + { + clinic: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic?, + dental: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental?, + prescription: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription?, + surcharge: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare?, + transit: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit?, + unknown: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown?, + vision: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic?, + dental: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental?, + prescription: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription?, + surcharge: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare?, + transit: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit?, + unknown: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown?, + vision: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Clinic?, + dental: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Dental?, + prescription: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Prescription?, + surcharge: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::TotalHealthcare?, + transit: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Transit?, + unknown: Increase::DeclinedTransaction::Source::CardDecline::AdditionalAmounts::Unknown?, + vision: Increase::DeclinedTransaction::Source::CardDecline::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 diff --git a/sig/increase/models/pending_transaction.rbs b/sig/increase/models/pending_transaction.rbs index 03ddf7bce..5054963a6 100644 --- a/sig/increase/models/pending_transaction.rbs +++ b/sig/increase/models/pending_transaction.rbs @@ -283,6 +283,7 @@ module Increase { id: String, actioner: Increase::Models::PendingTransaction::Source::CardAuthorization::actioner, + additional_amounts: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::PendingTransaction::Source::CardAuthorization::currency, @@ -315,6 +316,8 @@ module Increase attr_accessor actioner: Increase::Models::PendingTransaction::Source::CardAuthorization::actioner + attr_accessor additional_amounts: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts + attr_accessor amount: Integer attr_accessor card_payment_id: String @@ -368,6 +371,7 @@ module Increase def initialize: ( id: String, actioner: Increase::Models::PendingTransaction::Source::CardAuthorization::actioner, + additional_amounts: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::PendingTransaction::Source::CardAuthorization::currency, @@ -398,6 +402,7 @@ module Increase def to_hash: -> { id: String, actioner: Increase::Models::PendingTransaction::Source::CardAuthorization::actioner, + additional_amounts: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts, amount: Integer, card_payment_id: String, currency: Increase::Models::PendingTransaction::Source::CardAuthorization::currency, @@ -442,6 +447,171 @@ module Increase def self?.values: -> ::Array[Increase::Models::PendingTransaction::Source::CardAuthorization::actioner] end + type additional_amounts = + { + clinic: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::PendingTransaction::Source::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::PendingTransaction::Source::CardAuthorization::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 diff --git a/sig/increase/models/real_time_decision.rbs b/sig/increase/models/real_time_decision.rbs index b4d34db4d..245b7d364 100644 --- a/sig/increase/models/real_time_decision.rbs +++ b/sig/increase/models/real_time_decision.rbs @@ -169,6 +169,7 @@ module Increase type card_authorization = { account_id: String, + additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, digital_wallet_token_id: String?, @@ -198,6 +199,8 @@ module Increase class CardAuthorization < Increase::Internal::Type::BaseModel attr_accessor account_id: String + attr_accessor additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts + attr_accessor card_id: String attr_accessor decision: Increase::Models::RealTimeDecision::CardAuthorization::decision? @@ -248,6 +251,7 @@ module Increase def initialize: ( account_id: String, + additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, digital_wallet_token_id: String?, @@ -276,6 +280,7 @@ module Increase def to_hash: -> { account_id: String, + additional_amounts: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts, card_id: String, decision: Increase::Models::RealTimeDecision::CardAuthorization::decision?, digital_wallet_token_id: String?, @@ -302,6 +307,171 @@ module Increase verification: Increase::RealTimeDecision::CardAuthorization::Verification } + type additional_amounts = + { + clinic: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision? + } + + class AdditionalAmounts < Increase::Internal::Type::BaseModel + attr_accessor clinic: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic? + + attr_accessor dental: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental? + + attr_accessor prescription: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription? + + attr_accessor surcharge: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge? + + attr_accessor total_cumulative: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative? + + attr_accessor total_healthcare: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare? + + attr_accessor transit: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit? + + attr_accessor unknown: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown? + + attr_accessor vision: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision? + + def initialize: ( + clinic: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Vision? + ) -> void + + def to_hash: -> { + clinic: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Clinic?, + dental: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Dental?, + prescription: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Prescription?, + surcharge: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Surcharge?, + total_cumulative: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalCumulative?, + total_healthcare: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::TotalHealthcare?, + transit: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Transit?, + unknown: Increase::RealTimeDecision::CardAuthorization::AdditionalAmounts::Unknown?, + vision: Increase::RealTimeDecision::CardAuthorization::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 decision = :approve | :decline module Decision