"""paypalserversdk.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501
from paypalserversdk.api_helper import APIHelper
from paypalserversdk.models.money import Money


class TransactionInformation(object):
    """Implementation of the 'Transaction Information' model.

    The transaction information.

    Attributes:
        paypal_account_id (str): The ID of the PayPal account of the counterparty.
        transaction_id (str): The PayPal-generated transaction ID.
        paypal_reference_id (str): The PayPal-generated base ID. PayPal exclusive.
            Cannot be altered. Defined as a related, pre-existing transaction or
            event.
        paypal_reference_id_type (PaypalReferenceIdType): The PayPal reference ID
            type.
        transaction_event_code (str): A five-digit transaction event code that
            classifies the transaction type based on money movement and debit or
            credit. For example, T0001. See [Transaction event
            codes](/docs/integration/direct/transaction-search/transaction-event-codes
            /).
        transaction_initiation_date (str): The date and time, in [Internet date and
            time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds
            are required while fractional seconds are optional. Note: The regular
            expression provides guidance but does not reject all invalid dates.
        transaction_updated_date (str): The date and time, in [Internet date and time
            format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are
            required while fractional seconds are optional. Note: The regular
            expression provides guidance but does not reject all invalid dates.
        transaction_amount (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        fee_amount (Money): The currency and amount for a financial transaction, such
            as a balance or payment due.
        discount_amount (Money): The currency and amount for a financial transaction,
            such as a balance or payment due.
        insurance_amount (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        sales_tax_amount (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        shipping_amount (Money): The currency and amount for a financial transaction,
            such as a balance or payment due.
        shipping_discount_amount (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        shipping_tax_amount (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        other_amount (Money): The currency and amount for a financial transaction,
            such as a balance or payment due.
        tip_amount (Money): The currency and amount for a financial transaction, such
            as a balance or payment due.
        transaction_status (str): A code that indicates the transaction status. Value
            is: Status code Description D PayPal or merchant rules denied the
            transaction. P The transaction is pending. The transaction was created
            but waits for another payment process to complete, such as an ACH
            transaction, before the status changes to S. S The transaction
            successfully completed without a denial and after any pending statuses. V
            A successful transaction was fully reversed and funds were refunded to
            the original sender.
        transaction_subject (str): The subject of payment. The payer passes this
            value to the payee. The payer controls this data through the interface
            through which he or she sends the data.
        transaction_note (str): A special note that the payer passes to the payee.
            Might contain special customer requests, such as shipping instructions.
        payment_tracking_id (str): The payment tracking ID, which is a unique ID that
            partners specify to either get information about a payment or request a
            refund.
        bank_reference_id (str): The bank reference ID. The bank provides this value
            for an ACH transaction.
        ending_balance (Money): The currency and amount for a financial transaction,
            such as a balance or payment due.
        available_balance (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        invoice_id (str): The invoice ID that is sent by the merchant with the
            transaction. Note: If an invoice ID was sent with the capture request,
            the value is reported. Otherwise, the invoice ID of the authorizing
            transaction is reported.
        custom_field (str): The merchant-provided custom text. Note: Usually, this
            field includes the unique ID for payments made with MassPay type
            transaction.
        protection_eligibility (str): Indicates whether the transaction is eligible
            for protection. Value is: 01. Eligible. 02. Not eligible 03. Partially
            eligible.
        credit_term (str): The credit term. The time span covered by the installment
            payments as expressed in the term length plus the length time unit code.
        credit_transactional_fee (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        credit_promotional_fee (Money): The currency and amount for a financial
            transaction, such as a balance or payment due.
        annual_percentage_rate (str): The percentage, as a fixed-point, signed
            decimal number. For example, define a 19.99% interest rate as `19.99`.
        payment_method_type (str): The payment method that was used for a
            transaction. Value is PUI, installment, or mEFT. Note: Appears only for
            pay upon invoice (PUI), installment, and mEFT transactions. Merchants and
            partners in the EMEA region can use this attribute to note transactions
            that attract turn-over tax.
        instrument_type (str): A high-level classification of the type of financial
            instrument that was used to fund a payment. The pattern is not provided
            because the value is defined by an external party. E.g. PAYPAL,
            CREDIT_CARD, DEBIT_CARD, APPLE_PAY, BANK , VENMO ,Pay Upon Invoice, Pay
            Later  or Alternative Payment Methods (APM).
        instrument_sub_type (str): A finer-grained classification of the financial
            instrument that was used to fund a payment. For example, `Visa card` or a
            `Mastercard` for a credit card, BANKCARD ,DISCOVER etc. The pattern is
            not provided because the value is defined by an external party.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "paypal_account_id": "paypal_account_id",
        "transaction_id": "transaction_id",
        "paypal_reference_id": "paypal_reference_id",
        "paypal_reference_id_type": "paypal_reference_id_type",
        "transaction_event_code": "transaction_event_code",
        "transaction_initiation_date": "transaction_initiation_date",
        "transaction_updated_date": "transaction_updated_date",
        "transaction_amount": "transaction_amount",
        "fee_amount": "fee_amount",
        "discount_amount": "discount_amount",
        "insurance_amount": "insurance_amount",
        "sales_tax_amount": "sales_tax_amount",
        "shipping_amount": "shipping_amount",
        "shipping_discount_amount": "shipping_discount_amount",
        "shipping_tax_amount": "shipping_tax_amount",
        "other_amount": "other_amount",
        "tip_amount": "tip_amount",
        "transaction_status": "transaction_status",
        "transaction_subject": "transaction_subject",
        "transaction_note": "transaction_note",
        "payment_tracking_id": "payment_tracking_id",
        "bank_reference_id": "bank_reference_id",
        "ending_balance": "ending_balance",
        "available_balance": "available_balance",
        "invoice_id": "invoice_id",
        "custom_field": "custom_field",
        "protection_eligibility": "protection_eligibility",
        "credit_term": "credit_term",
        "credit_transactional_fee": "credit_transactional_fee",
        "credit_promotional_fee": "credit_promotional_fee",
        "annual_percentage_rate": "annual_percentage_rate",
        "payment_method_type": "payment_method_type",
        "instrument_type": "instrument_type",
        "instrument_sub_type": "instrument_sub_type",
    }

    _optionals = [
        "paypal_account_id",
        "transaction_id",
        "paypal_reference_id",
        "paypal_reference_id_type",
        "transaction_event_code",
        "transaction_initiation_date",
        "transaction_updated_date",
        "transaction_amount",
        "fee_amount",
        "discount_amount",
        "insurance_amount",
        "sales_tax_amount",
        "shipping_amount",
        "shipping_discount_amount",
        "shipping_tax_amount",
        "other_amount",
        "tip_amount",
        "transaction_status",
        "transaction_subject",
        "transaction_note",
        "payment_tracking_id",
        "bank_reference_id",
        "ending_balance",
        "available_balance",
        "invoice_id",
        "custom_field",
        "protection_eligibility",
        "credit_term",
        "credit_transactional_fee",
        "credit_promotional_fee",
        "annual_percentage_rate",
        "payment_method_type",
        "instrument_type",
        "instrument_sub_type",
    ]

    def __init__(
        self,
        paypal_account_id=APIHelper.SKIP,
        transaction_id=APIHelper.SKIP,
        paypal_reference_id=APIHelper.SKIP,
        paypal_reference_id_type=APIHelper.SKIP,
        transaction_event_code=APIHelper.SKIP,
        transaction_initiation_date=APIHelper.SKIP,
        transaction_updated_date=APIHelper.SKIP,
        transaction_amount=APIHelper.SKIP,
        fee_amount=APIHelper.SKIP,
        discount_amount=APIHelper.SKIP,
        insurance_amount=APIHelper.SKIP,
        sales_tax_amount=APIHelper.SKIP,
        shipping_amount=APIHelper.SKIP,
        shipping_discount_amount=APIHelper.SKIP,
        shipping_tax_amount=APIHelper.SKIP,
        other_amount=APIHelper.SKIP,
        tip_amount=APIHelper.SKIP,
        transaction_status=APIHelper.SKIP,
        transaction_subject=APIHelper.SKIP,
        transaction_note=APIHelper.SKIP,
        payment_tracking_id=APIHelper.SKIP,
        bank_reference_id=APIHelper.SKIP,
        ending_balance=APIHelper.SKIP,
        available_balance=APIHelper.SKIP,
        invoice_id=APIHelper.SKIP,
        custom_field=APIHelper.SKIP,
        protection_eligibility=APIHelper.SKIP,
        credit_term=APIHelper.SKIP,
        credit_transactional_fee=APIHelper.SKIP,
        credit_promotional_fee=APIHelper.SKIP,
        annual_percentage_rate=APIHelper.SKIP,
        payment_method_type=APIHelper.SKIP,
        instrument_type=APIHelper.SKIP,
        instrument_sub_type=APIHelper.SKIP):
        """Initialize a TransactionInformation instance."""
        # Initialize members of the class
        if paypal_account_id is not APIHelper.SKIP:
            self.paypal_account_id = paypal_account_id
        if transaction_id is not APIHelper.SKIP:
            self.transaction_id = transaction_id
        if paypal_reference_id is not APIHelper.SKIP:
            self.paypal_reference_id = paypal_reference_id
        if paypal_reference_id_type is not APIHelper.SKIP:
            self.paypal_reference_id_type = paypal_reference_id_type
        if transaction_event_code is not APIHelper.SKIP:
            self.transaction_event_code = transaction_event_code
        if transaction_initiation_date is not APIHelper.SKIP:
            self.transaction_initiation_date = transaction_initiation_date
        if transaction_updated_date is not APIHelper.SKIP:
            self.transaction_updated_date = transaction_updated_date
        if transaction_amount is not APIHelper.SKIP:
            self.transaction_amount = transaction_amount
        if fee_amount is not APIHelper.SKIP:
            self.fee_amount = fee_amount
        if discount_amount is not APIHelper.SKIP:
            self.discount_amount = discount_amount
        if insurance_amount is not APIHelper.SKIP:
            self.insurance_amount = insurance_amount
        if sales_tax_amount is not APIHelper.SKIP:
            self.sales_tax_amount = sales_tax_amount
        if shipping_amount is not APIHelper.SKIP:
            self.shipping_amount = shipping_amount
        if shipping_discount_amount is not APIHelper.SKIP:
            self.shipping_discount_amount = shipping_discount_amount
        if shipping_tax_amount is not APIHelper.SKIP:
            self.shipping_tax_amount = shipping_tax_amount
        if other_amount is not APIHelper.SKIP:
            self.other_amount = other_amount
        if tip_amount is not APIHelper.SKIP:
            self.tip_amount = tip_amount
        if transaction_status is not APIHelper.SKIP:
            self.transaction_status = transaction_status
        if transaction_subject is not APIHelper.SKIP:
            self.transaction_subject = transaction_subject
        if transaction_note is not APIHelper.SKIP:
            self.transaction_note = transaction_note
        if payment_tracking_id is not APIHelper.SKIP:
            self.payment_tracking_id = payment_tracking_id
        if bank_reference_id is not APIHelper.SKIP:
            self.bank_reference_id = bank_reference_id
        if ending_balance is not APIHelper.SKIP:
            self.ending_balance = ending_balance
        if available_balance is not APIHelper.SKIP:
            self.available_balance = available_balance
        if invoice_id is not APIHelper.SKIP:
            self.invoice_id = invoice_id
        if custom_field is not APIHelper.SKIP:
            self.custom_field = custom_field
        if protection_eligibility is not APIHelper.SKIP:
            self.protection_eligibility = protection_eligibility
        if credit_term is not APIHelper.SKIP:
            self.credit_term = credit_term
        if credit_transactional_fee is not APIHelper.SKIP:
            self.credit_transactional_fee = credit_transactional_fee
        if credit_promotional_fee is not APIHelper.SKIP:
            self.credit_promotional_fee = credit_promotional_fee
        if annual_percentage_rate is not APIHelper.SKIP:
            self.annual_percentage_rate = annual_percentage_rate
        if payment_method_type is not APIHelper.SKIP:
            self.payment_method_type = payment_method_type
        if instrument_type is not APIHelper.SKIP:
            self.instrument_type = instrument_type
        if instrument_sub_type is not APIHelper.SKIP:
            self.instrument_sub_type = instrument_sub_type

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        paypal_account_id =\
            dictionary.get("paypal_account_id")\
            if dictionary.get("paypal_account_id")\
                else APIHelper.SKIP
        transaction_id =\
            dictionary.get("transaction_id")\
            if dictionary.get("transaction_id")\
                else APIHelper.SKIP
        paypal_reference_id =\
            dictionary.get("paypal_reference_id")\
            if dictionary.get("paypal_reference_id")\
                else APIHelper.SKIP
        paypal_reference_id_type =\
            dictionary.get("paypal_reference_id_type")\
            if dictionary.get("paypal_reference_id_type")\
                else APIHelper.SKIP
        transaction_event_code =\
            dictionary.get("transaction_event_code")\
            if dictionary.get("transaction_event_code")\
                else APIHelper.SKIP
        transaction_initiation_date =\
            dictionary.get("transaction_initiation_date")\
            if dictionary.get("transaction_initiation_date")\
                else APIHelper.SKIP
        transaction_updated_date =\
            dictionary.get("transaction_updated_date")\
            if dictionary.get("transaction_updated_date")\
                else APIHelper.SKIP
        transaction_amount =\
            Money.from_dictionary(
                dictionary.get("transaction_amount"))\
                if "transaction_amount" in dictionary.keys()\
                else APIHelper.SKIP
        fee_amount =\
            Money.from_dictionary(
                dictionary.get("fee_amount"))\
                if "fee_amount" in dictionary.keys()\
                else APIHelper.SKIP
        discount_amount =\
            Money.from_dictionary(
                dictionary.get("discount_amount"))\
                if "discount_amount" in dictionary.keys()\
                else APIHelper.SKIP
        insurance_amount =\
            Money.from_dictionary(
                dictionary.get("insurance_amount"))\
                if "insurance_amount" in dictionary.keys()\
                else APIHelper.SKIP
        sales_tax_amount =\
            Money.from_dictionary(
                dictionary.get("sales_tax_amount"))\
                if "sales_tax_amount" in dictionary.keys()\
                else APIHelper.SKIP
        shipping_amount =\
            Money.from_dictionary(
                dictionary.get("shipping_amount"))\
                if "shipping_amount" in dictionary.keys()\
                else APIHelper.SKIP
        shipping_discount_amount =\
            Money.from_dictionary(
                dictionary.get("shipping_discount_amount"))\
                if "shipping_discount_amount" in dictionary.keys()\
                else APIHelper.SKIP
        shipping_tax_amount =\
            Money.from_dictionary(
                dictionary.get("shipping_tax_amount"))\
                if "shipping_tax_amount" in dictionary.keys()\
                else APIHelper.SKIP
        other_amount =\
            Money.from_dictionary(
                dictionary.get("other_amount"))\
                if "other_amount" in dictionary.keys()\
                else APIHelper.SKIP
        tip_amount =\
            Money.from_dictionary(
                dictionary.get("tip_amount"))\
                if "tip_amount" in dictionary.keys()\
                else APIHelper.SKIP
        transaction_status =\
            dictionary.get("transaction_status")\
            if dictionary.get("transaction_status")\
                else APIHelper.SKIP
        transaction_subject =\
            dictionary.get("transaction_subject")\
            if dictionary.get("transaction_subject")\
                else APIHelper.SKIP
        transaction_note =\
            dictionary.get("transaction_note")\
            if dictionary.get("transaction_note")\
                else APIHelper.SKIP
        payment_tracking_id =\
            dictionary.get("payment_tracking_id")\
            if dictionary.get("payment_tracking_id")\
                else APIHelper.SKIP
        bank_reference_id =\
            dictionary.get("bank_reference_id")\
            if dictionary.get("bank_reference_id")\
                else APIHelper.SKIP
        ending_balance =\
            Money.from_dictionary(
                dictionary.get("ending_balance"))\
                if "ending_balance" in dictionary.keys()\
                else APIHelper.SKIP
        available_balance =\
            Money.from_dictionary(
                dictionary.get("available_balance"))\
                if "available_balance" in dictionary.keys()\
                else APIHelper.SKIP
        invoice_id =\
            dictionary.get("invoice_id")\
            if dictionary.get("invoice_id")\
                else APIHelper.SKIP
        custom_field =\
            dictionary.get("custom_field")\
            if dictionary.get("custom_field")\
                else APIHelper.SKIP
        protection_eligibility =\
            dictionary.get("protection_eligibility")\
            if dictionary.get("protection_eligibility")\
                else APIHelper.SKIP
        credit_term =\
            dictionary.get("credit_term")\
            if dictionary.get("credit_term")\
                else APIHelper.SKIP
        credit_transactional_fee =\
            Money.from_dictionary(
                dictionary.get("credit_transactional_fee"))\
                if "credit_transactional_fee" in dictionary.keys()\
                else APIHelper.SKIP
        credit_promotional_fee =\
            Money.from_dictionary(
                dictionary.get("credit_promotional_fee"))\
                if "credit_promotional_fee" in dictionary.keys()\
                else APIHelper.SKIP
        annual_percentage_rate =\
            dictionary.get("annual_percentage_rate")\
            if dictionary.get("annual_percentage_rate")\
                else APIHelper.SKIP
        payment_method_type =\
            dictionary.get("payment_method_type")\
            if dictionary.get("payment_method_type")\
                else APIHelper.SKIP
        instrument_type =\
            dictionary.get("instrument_type")\
            if dictionary.get("instrument_type")\
                else APIHelper.SKIP
        instrument_sub_type =\
            dictionary.get("instrument_sub_type")\
            if dictionary.get("instrument_sub_type")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(paypal_account_id,
                   transaction_id,
                   paypal_reference_id,
                   paypal_reference_id_type,
                   transaction_event_code,
                   transaction_initiation_date,
                   transaction_updated_date,
                   transaction_amount,
                   fee_amount,
                   discount_amount,
                   insurance_amount,
                   sales_tax_amount,
                   shipping_amount,
                   shipping_discount_amount,
                   shipping_tax_amount,
                   other_amount,
                   tip_amount,
                   transaction_status,
                   transaction_subject,
                   transaction_note,
                   payment_tracking_id,
                   bank_reference_id,
                   ending_balance,
                   available_balance,
                   invoice_id,
                   custom_field,
                   protection_eligibility,
                   credit_term,
                   credit_transactional_fee,
                   credit_promotional_fee,
                   annual_percentage_rate,
                   payment_method_type,
                   instrument_type,
                   instrument_sub_type)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _paypal_account_id=(
            self.paypal_account_id
            if hasattr(self, "paypal_account_id")
            else None
        )
        _transaction_id=(
            self.transaction_id
            if hasattr(self, "transaction_id")
            else None
        )
        _paypal_reference_id=(
            self.paypal_reference_id
            if hasattr(self, "paypal_reference_id")
            else None
        )
        _paypal_reference_id_type=(
            self.paypal_reference_id_type
            if hasattr(self, "paypal_reference_id_type")
            else None
        )
        _transaction_event_code=(
            self.transaction_event_code
            if hasattr(self, "transaction_event_code")
            else None
        )
        _transaction_initiation_date=(
            self.transaction_initiation_date
            if hasattr(self, "transaction_initiation_date")
            else None
        )
        _transaction_updated_date=(
            self.transaction_updated_date
            if hasattr(self, "transaction_updated_date")
            else None
        )
        _transaction_amount=(
            self.transaction_amount
            if hasattr(self, "transaction_amount")
            else None
        )
        _fee_amount=(
            self.fee_amount
            if hasattr(self, "fee_amount")
            else None
        )
        _discount_amount=(
            self.discount_amount
            if hasattr(self, "discount_amount")
            else None
        )
        _insurance_amount=(
            self.insurance_amount
            if hasattr(self, "insurance_amount")
            else None
        )
        _sales_tax_amount=(
            self.sales_tax_amount
            if hasattr(self, "sales_tax_amount")
            else None
        )
        _shipping_amount=(
            self.shipping_amount
            if hasattr(self, "shipping_amount")
            else None
        )
        _shipping_discount_amount=(
            self.shipping_discount_amount
            if hasattr(self, "shipping_discount_amount")
            else None
        )
        _shipping_tax_amount=(
            self.shipping_tax_amount
            if hasattr(self, "shipping_tax_amount")
            else None
        )
        _other_amount=(
            self.other_amount
            if hasattr(self, "other_amount")
            else None
        )
        _tip_amount=(
            self.tip_amount
            if hasattr(self, "tip_amount")
            else None
        )
        _transaction_status=(
            self.transaction_status
            if hasattr(self, "transaction_status")
            else None
        )
        _transaction_subject=(
            self.transaction_subject
            if hasattr(self, "transaction_subject")
            else None
        )
        _transaction_note=(
            self.transaction_note
            if hasattr(self, "transaction_note")
            else None
        )
        _payment_tracking_id=(
            self.payment_tracking_id
            if hasattr(self, "payment_tracking_id")
            else None
        )
        _bank_reference_id=(
            self.bank_reference_id
            if hasattr(self, "bank_reference_id")
            else None
        )
        _ending_balance=(
            self.ending_balance
            if hasattr(self, "ending_balance")
            else None
        )
        _available_balance=(
            self.available_balance
            if hasattr(self, "available_balance")
            else None
        )
        _invoice_id=(
            self.invoice_id
            if hasattr(self, "invoice_id")
            else None
        )
        _custom_field=(
            self.custom_field
            if hasattr(self, "custom_field")
            else None
        )
        _protection_eligibility=(
            self.protection_eligibility
            if hasattr(self, "protection_eligibility")
            else None
        )
        _credit_term=(
            self.credit_term
            if hasattr(self, "credit_term")
            else None
        )
        _credit_transactional_fee=(
            self.credit_transactional_fee
            if hasattr(self, "credit_transactional_fee")
            else None
        )
        _credit_promotional_fee=(
            self.credit_promotional_fee
            if hasattr(self, "credit_promotional_fee")
            else None
        )
        _annual_percentage_rate=(
            self.annual_percentage_rate
            if hasattr(self, "annual_percentage_rate")
            else None
        )
        _payment_method_type=(
            self.payment_method_type
            if hasattr(self, "payment_method_type")
            else None
        )
        _instrument_type=(
            self.instrument_type
            if hasattr(self, "instrument_type")
            else None
        )
        _instrument_sub_type=(
            self.instrument_sub_type
            if hasattr(self, "instrument_sub_type")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"paypal_account_id={_paypal_account_id!r}, "
            f"transaction_id={_transaction_id!r}, "
            f"paypal_reference_id={_paypal_reference_id!r}, "
            f"paypal_reference_id_type={_paypal_reference_id_type!r}, "
            f"transaction_event_code={_transaction_event_code!r}, "
            f"transaction_initiation_date={_transaction_initiation_date!r}, "
            f"transaction_updated_date={_transaction_updated_date!r}, "
            f"transaction_amount={_transaction_amount!r}, "
            f"fee_amount={_fee_amount!r}, "
            f"discount_amount={_discount_amount!r}, "
            f"insurance_amount={_insurance_amount!r}, "
            f"sales_tax_amount={_sales_tax_amount!r}, "
            f"shipping_amount={_shipping_amount!r}, "
            f"shipping_discount_amount={_shipping_discount_amount!r}, "
            f"shipping_tax_amount={_shipping_tax_amount!r}, "
            f"other_amount={_other_amount!r}, "
            f"tip_amount={_tip_amount!r}, "
            f"transaction_status={_transaction_status!r}, "
            f"transaction_subject={_transaction_subject!r}, "
            f"transaction_note={_transaction_note!r}, "
            f"payment_tracking_id={_payment_tracking_id!r}, "
            f"bank_reference_id={_bank_reference_id!r}, "
            f"ending_balance={_ending_balance!r}, "
            f"available_balance={_available_balance!r}, "
            f"invoice_id={_invoice_id!r}, "
            f"custom_field={_custom_field!r}, "
            f"protection_eligibility={_protection_eligibility!r}, "
            f"credit_term={_credit_term!r}, "
            f"credit_transactional_fee={_credit_transactional_fee!r}, "
            f"credit_promotional_fee={_credit_promotional_fee!r}, "
            f"annual_percentage_rate={_annual_percentage_rate!r}, "
            f"payment_method_type={_payment_method_type!r}, "
            f"instrument_type={_instrument_type!r}, "
            f"instrument_sub_type={_instrument_sub_type!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _paypal_account_id=(
            self.paypal_account_id
            if hasattr(self, "paypal_account_id")
            else None
        )
        _transaction_id=(
            self.transaction_id
            if hasattr(self, "transaction_id")
            else None
        )
        _paypal_reference_id=(
            self.paypal_reference_id
            if hasattr(self, "paypal_reference_id")
            else None
        )
        _paypal_reference_id_type=(
            self.paypal_reference_id_type
            if hasattr(self, "paypal_reference_id_type")
            else None
        )
        _transaction_event_code=(
            self.transaction_event_code
            if hasattr(self, "transaction_event_code")
            else None
        )
        _transaction_initiation_date=(
            self.transaction_initiation_date
            if hasattr(self, "transaction_initiation_date")
            else None
        )
        _transaction_updated_date=(
            self.transaction_updated_date
            if hasattr(self, "transaction_updated_date")
            else None
        )
        _transaction_amount=(
            self.transaction_amount
            if hasattr(self, "transaction_amount")
            else None
        )
        _fee_amount=(
            self.fee_amount
            if hasattr(self, "fee_amount")
            else None
        )
        _discount_amount=(
            self.discount_amount
            if hasattr(self, "discount_amount")
            else None
        )
        _insurance_amount=(
            self.insurance_amount
            if hasattr(self, "insurance_amount")
            else None
        )
        _sales_tax_amount=(
            self.sales_tax_amount
            if hasattr(self, "sales_tax_amount")
            else None
        )
        _shipping_amount=(
            self.shipping_amount
            if hasattr(self, "shipping_amount")
            else None
        )
        _shipping_discount_amount=(
            self.shipping_discount_amount
            if hasattr(self, "shipping_discount_amount")
            else None
        )
        _shipping_tax_amount=(
            self.shipping_tax_amount
            if hasattr(self, "shipping_tax_amount")
            else None
        )
        _other_amount=(
            self.other_amount
            if hasattr(self, "other_amount")
            else None
        )
        _tip_amount=(
            self.tip_amount
            if hasattr(self, "tip_amount")
            else None
        )
        _transaction_status=(
            self.transaction_status
            if hasattr(self, "transaction_status")
            else None
        )
        _transaction_subject=(
            self.transaction_subject
            if hasattr(self, "transaction_subject")
            else None
        )
        _transaction_note=(
            self.transaction_note
            if hasattr(self, "transaction_note")
            else None
        )
        _payment_tracking_id=(
            self.payment_tracking_id
            if hasattr(self, "payment_tracking_id")
            else None
        )
        _bank_reference_id=(
            self.bank_reference_id
            if hasattr(self, "bank_reference_id")
            else None
        )
        _ending_balance=(
            self.ending_balance
            if hasattr(self, "ending_balance")
            else None
        )
        _available_balance=(
            self.available_balance
            if hasattr(self, "available_balance")
            else None
        )
        _invoice_id=(
            self.invoice_id
            if hasattr(self, "invoice_id")
            else None
        )
        _custom_field=(
            self.custom_field
            if hasattr(self, "custom_field")
            else None
        )
        _protection_eligibility=(
            self.protection_eligibility
            if hasattr(self, "protection_eligibility")
            else None
        )
        _credit_term=(
            self.credit_term
            if hasattr(self, "credit_term")
            else None
        )
        _credit_transactional_fee=(
            self.credit_transactional_fee
            if hasattr(self, "credit_transactional_fee")
            else None
        )
        _credit_promotional_fee=(
            self.credit_promotional_fee
            if hasattr(self, "credit_promotional_fee")
            else None
        )
        _annual_percentage_rate=(
            self.annual_percentage_rate
            if hasattr(self, "annual_percentage_rate")
            else None
        )
        _payment_method_type=(
            self.payment_method_type
            if hasattr(self, "payment_method_type")
            else None
        )
        _instrument_type=(
            self.instrument_type
            if hasattr(self, "instrument_type")
            else None
        )
        _instrument_sub_type=(
            self.instrument_sub_type
            if hasattr(self, "instrument_sub_type")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"paypal_account_id={_paypal_account_id!s}, "
            f"transaction_id={_transaction_id!s}, "
            f"paypal_reference_id={_paypal_reference_id!s}, "
            f"paypal_reference_id_type={_paypal_reference_id_type!s}, "
            f"transaction_event_code={_transaction_event_code!s}, "
            f"transaction_initiation_date={_transaction_initiation_date!s}, "
            f"transaction_updated_date={_transaction_updated_date!s}, "
            f"transaction_amount={_transaction_amount!s}, "
            f"fee_amount={_fee_amount!s}, "
            f"discount_amount={_discount_amount!s}, "
            f"insurance_amount={_insurance_amount!s}, "
            f"sales_tax_amount={_sales_tax_amount!s}, "
            f"shipping_amount={_shipping_amount!s}, "
            f"shipping_discount_amount={_shipping_discount_amount!s}, "
            f"shipping_tax_amount={_shipping_tax_amount!s}, "
            f"other_amount={_other_amount!s}, "
            f"tip_amount={_tip_amount!s}, "
            f"transaction_status={_transaction_status!s}, "
            f"transaction_subject={_transaction_subject!s}, "
            f"transaction_note={_transaction_note!s}, "
            f"payment_tracking_id={_payment_tracking_id!s}, "
            f"bank_reference_id={_bank_reference_id!s}, "
            f"ending_balance={_ending_balance!s}, "
            f"available_balance={_available_balance!s}, "
            f"invoice_id={_invoice_id!s}, "
            f"custom_field={_custom_field!s}, "
            f"protection_eligibility={_protection_eligibility!s}, "
            f"credit_term={_credit_term!s}, "
            f"credit_transactional_fee={_credit_transactional_fee!s}, "
            f"credit_promotional_fee={_credit_promotional_fee!s}, "
            f"annual_percentage_rate={_annual_percentage_rate!s}, "
            f"payment_method_type={_payment_method_type!s}, "
            f"instrument_type={_instrument_type!s}, "
            f"instrument_sub_type={_instrument_sub_type!s}, "
            f")"
        )
