"""visaacceptancemergedspec.

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

# ruff: noqa: E501
from visaacceptancemergedspec.api_helper import (
    APIHelper,
)
from visaacceptancemergedspec.models.ancillary_information import (
    AncillaryInformation,
)
from visaacceptancemergedspec.models.leg import (
    Leg,
)
from visaacceptancemergedspec.models.ticket_issuer import (
    TicketIssuer,
)


class Airline(object):
    """Implementation of the 'Airline' model.

    Attributes:
        is_domestic (str): Specifies if the flight is: Domestic (01) International
            (02) If Y then 01 else 02
        booking_reference_number (str): Reference number for the airline booking.
            Required if ticket numbers are not issued.
        carrier_name (str): Airline that generated the ticket. Format: English
            characters only. Optional request field.
        ticket_issuer (TicketIssuer): The model property of type TicketIssuer.
        ticket_number (str): Ticket number. Format: English characters only.
            Restricted string data type that indicates a sequence of letters,
            numbers, and spaces; special characters are not included. Optional
            request field.
        check_digit (str): Check digit for the ticket number. Visa Acceptance
            recommends that you validate the check digit. With Discover and Diners
            Club, a valid ticket number has these characteristics: - The value is
            numeric. - The first three digits are a valid IATA2 license plate carrier
            code. - The last digit is a check digit or zero (0). - All remaining
            digits are nonzero.
        restricted_ticket_indicator (int): Flag that indicates whether or not the
            ticket is restricted (nonrefundable). Possible values: - 0: No
            restriction (refundable) - 1: Restricted (nonrefundable) Format: English
            characters only. Restricted string data type that indicates a sequence of
            letters, numbers, and spaces; special characters are not included.
            Optional request field.
        transaction_type (int): Type of charge. Possible values: - 01: Charge is for
            an airline ticket - 02: Charge is for an item that is not an airline
            ticket
        extended_payment_code (str): The field is not currently supported.
        passenger_name (str): Name of the passenger to whom the ticket was issued.
            This will always be a single passenger's name. If there are more than one
            passengers, provide only the primary passenger's name. Do not include
            special characters such as commas, hyphens, or apostrophes. Only ASCII
            characters are supported. Format: English characters only. Optional
            request field.
        customer_code (str): Reference number or code that identifies the cardholder.
            Format: English characters only. Restricted string data type that
            indicates a sequence of letters, numbers, and spaces; special characters
            are not included. Optional request field.
        document_type (str): Airline document type code that specifies the purpose of
            the transaction. Format: English characters only. Optional request field.
            | Code | Description | | --- | --- | | 01 | Passenger ticket | | 02 |
            Additional collection | | 03 | Excess baggage | | 04 | Miscellaneous
            charge order (MCO) or prepaid ticket authorization | | 05 | Special
            service ticket | | 06 | Supported refund | | 07 | Unsupported refund | |
            08 | Lost ticket application | | 09 | Tour order voucher | | 10 | Ticket
            by mail | | 11 | Undercharge adjustment | | 12 | Group ticket | | 13 |
            Exchange adjustment | | 14 | SPD or air freight | | 15 | In-flight
            adjustment | | 16 | Agency passenger ticket | | 17 | Agency tour order or
            voucher | | 18 | Agency miscellaneous charge order (MCO) | | 19 | Agency
            exchange order | | 20 | Agency group ticket | | 21 | Debit adjustment for
            duplicate refund or use | | 22 | In-flight merchandise order | | 23 |
            Catalogue merchandise order | | 24 | In-flight phone charges | | 25 |
            Frequent flyer fee or purchase | | 26 | Kennel charge | | 27 | Animal
            transportation charge | | 28 | Firearms case | | 29 | Upgrade charge | |
            30 | Credit for unused transportation | | 31 | Credit for class of
            service adjustment | | 32 | Credit for denied boarding | | 33 | Credit
            for miscellaneous refund | | 34 | Credit for lost ticket refund | | 35 |
            Credit for exchange refund | | 36 | Credit for overcharge adjustment | |
            37 | Credit for multiple Unused tickets | | 38 | Exchange order | | 39 |
            Self-service ticket | | 41 | In-flight duty-free purchase | | 42 | Senior
            citizen discount booklets | | 43 | Club membership fee | | 44 | Coupon
            book | | 45 | In-flight charges | | 46 | Tour deposit | | 47 | Frequent
            flyer overnight delivery charge | | 48 | Frequent flyer fulfillment | |
            49 | Small package delivery | | 50 | Vendor sale | | 51 | Miscellaneous
            taxes or fees | | 52 | Travel agency fee | | 60 | Vendor refund or credit
            | | 64 | Duty free sale | | 65 | Preferred seat upgrade | | 66 | Cabin
            upgrade | | 67 | Lounge or club access or day pass | | 68 | Agent
            assisted reservation or ticketing fee | | 69 | Ticket change or cancel
            fee | | 70 | Trip insurance | | 71 | Unaccompanied minor | | 72 | Standby
            fee | | 73 | Curbside baggage | | 74 | In-flight medical equipment | | 75
            | Ticket or pass print fee | | 76 | Checked sporting or special equipment
            | | 77 | Dry ice fee | | 78 | Mail or postage fee | | 79 | Club
            membership fee or temporary trial | | 80 | Frequent flyer activation or
            reinstatement | | 81 | Gift certificate | | 82 | Onboard or in-flight
            prepaid voucher | | 83 | Optional services fee | | 84 | Advance purchase
            for excess baggage | | 85 | Advance purchase for preferred seat upgrade |
            | 86 | Advance purchase for cabin upgrade | | 87 | Advance purchase for
            optional services | | 88 | WiFi | | 89 | Packages | | 90 | In-flight
            entertainment or internet access | | 91 | Overweight bag fee | | 92 |
            Sleep sets | | 93 | Special purchase fee |
        document_number (str): The field is not currently supported.
        document_number_of_parts (int): The field is not currently supported.
        invoice_number (str): Invoice number for the airline transaction.
        invoice_date (int): Invoice date. The format is YYYYMMDD. If this value is
            included in the request, it is used in the creation of the invoice
            number. See "Invoice Number,"
        additional_charges (str): Description of the charge if the charge does not
            involve an airline ticket. For example: Excess baggage.
        total_fee_amount (str): Total fee for the ticket. This value cannot exceed
            `99999999999999999999` (twenty 9s). Format: English characters only.
            Optional request field.
        clearing_sequence (str): Number that identifies the clearing message when
            multiple clearing messages are allowed per authorized transaction. Each
            clearing message linked to one authorization request must include a
            unique clearing sequence number between 1 and the total number of
            clearing records. Format: English characters only. Optional request field.
        clearing_count (str): Total number of clearing messages associated with the
            authorization request. Format: English characters only. Optional request
            field.
        total_clearing_amount (str): Total clearing amount for all transactions in
            the clearing count set. This value cannot exceed `99999999999999999999`
            (twenty 9s). Format: English characters only. If this field is not set
            and if the total amount from the original authorization is not NULL, the
            total clearing amount is set to the total amount from the original
            authorization.
        number_of_passengers (int): Number of passengers for whom the ticket was
            issued. Format: English characters only. Optional request field.
        reservation_system_code (str): Code that specifies the computerized
            reservation system used to make the reservation and purchase the ticket.
            Format: English characters only. Restricted string data type that
            indicates a sequence of letters, numbers, and spaces; special characters
            are not included. Optional request field.
        process_identifier (str): Airline process identifier. This value is the
            airline’s three-digit IATA1 code which is used to process extended
            payment airline tickets.
        ticket_issue_date (str): Date on which the transaction occurred. Format:
            `YYYYMMDD` Format: English characters only. Optional request field.
        electronic_ticket_indicator (bool): Flag that indicates whether an electronic
            ticket was issued. Possible values: - `true` - `false` Optional request
            field.
        original_ticket_number (str): Original ticket number when the transaction is
            for a replacement ticket.
        purchase_type (str): Type of purchase. Possible values: - `EXC`: Exchange
            ticket - `MSC`: Miscellaneous (not a ticket purchase and not a
            transaction related to an exchange ticket) - `REF`: Refund - `TKT`:
            Ticket Format: English characters only. Optional request field.
        credit_reason_indicator (str): Reason for the credit. Possible values: - `A`:
            Cancellation of the ancillary passenger transport purchase. - `B`:
            Cancellation of the airline ticket and the passenger transport ancillary
            purchase. - `C`: Cancellation of the airline ticket. - `O`: Other. - `P`:
            Partial refund of the airline ticket. Format: English characters only.
            Optional request field.
        ticket_change_indicator (str): Type of update. Possible values: - `C`: Change
            to the existing ticket. - `N`: New ticket. Format: English characters
            only Optional request field.
        plan_number (str): Plan number based on the fare. This value is provided by
            the airline. Format: English characters only. Optional request field.
        arrival_date (str): Date of arrival for the last leg of the trip. Format:
            `MMDDYYYY` English characters only. Optional request field.
        restricted_ticket_desciption (str): Text that describes the ticket
            limitations, such as _nonrefundable_. Format: English characters only.
            Optional request field.
        exchange_ticket_amount (str): Amount of the exchanged ticket. Format: English
            characters only.
        exchange_ticket_fee_amount (str): Fee for exchanging the ticket. Format:
            English characters only. Optional request field.
        reservation_type (str): The field is not currently supported.
        boarding_fee_amount (str): Boarding fee.
        legs (List[Leg]): The model property of type List[Leg].
        ancillary_information (AncillaryInformation): The model property of type
            AncillaryInformation.
        flight_type (str): Specifies the type of flight. One way (0) Return (1)
            Transit (2) Transit & Return (3) Multi-City (4)
        insurance_amount (str): The total cost of the flight insurance. Example:
            10000.00
        frequent_flyer_number (str): The consumer’s frequent flyer number. Leave 0 if
            there is no frequent flyer number
        third_party_status (str): Specifies if the travel agent joins the flight (0)
            or not (1)
        passenger_type (str): List of passenger types in a booking code: A (Adult) C
            (Child) Comma separated values for total number of passenger
        total_insurance_amount (str): Total insurance amount. We have per leg and not
            total
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "is_domestic": "isDomestic",
        "booking_reference_number": "bookingReferenceNumber",
        "carrier_name": "carrierName",
        "ticket_issuer": "ticketIssuer",
        "ticket_number": "ticketNumber",
        "check_digit": "checkDigit",
        "restricted_ticket_indicator": "restrictedTicketIndicator",
        "transaction_type": "transactionType",
        "extended_payment_code": "extendedPaymentCode",
        "passenger_name": "passengerName",
        "customer_code": "customerCode",
        "document_type": "documentType",
        "document_number": "documentNumber",
        "document_number_of_parts": "documentNumberOfParts",
        "invoice_number": "invoiceNumber",
        "invoice_date": "invoiceDate",
        "additional_charges": "additionalCharges",
        "total_fee_amount": "totalFeeAmount",
        "clearing_sequence": "clearingSequence",
        "clearing_count": "clearingCount",
        "total_clearing_amount": "totalClearingAmount",
        "number_of_passengers": "numberOfPassengers",
        "reservation_system_code": "reservationSystemCode",
        "process_identifier": "processIdentifier",
        "ticket_issue_date": "ticketIssueDate",
        "electronic_ticket_indicator": "electronicTicketIndicator",
        "original_ticket_number": "originalTicketNumber",
        "purchase_type": "purchaseType",
        "credit_reason_indicator": "creditReasonIndicator",
        "ticket_change_indicator": "ticketChangeIndicator",
        "plan_number": "planNumber",
        "arrival_date": "arrivalDate",
        "restricted_ticket_desciption": "restrictedTicketDesciption",
        "exchange_ticket_amount": "exchangeTicketAmount",
        "exchange_ticket_fee_amount": "exchangeTicketFeeAmount",
        "reservation_type": "reservationType",
        "boarding_fee_amount": "boardingFeeAmount",
        "legs": "legs",
        "ancillary_information": "ancillaryInformation",
        "flight_type": "flightType",
        "insurance_amount": "insuranceAmount",
        "frequent_flyer_number": "frequentFlyerNumber",
        "third_party_status": "thirdPartyStatus",
        "passenger_type": "passengerType",
        "total_insurance_amount": "totalInsuranceAmount",
    }

    _optionals = [
        "is_domestic",
        "booking_reference_number",
        "carrier_name",
        "ticket_issuer",
        "ticket_number",
        "check_digit",
        "restricted_ticket_indicator",
        "transaction_type",
        "extended_payment_code",
        "passenger_name",
        "customer_code",
        "document_type",
        "document_number",
        "document_number_of_parts",
        "invoice_number",
        "invoice_date",
        "additional_charges",
        "total_fee_amount",
        "clearing_sequence",
        "clearing_count",
        "total_clearing_amount",
        "number_of_passengers",
        "reservation_system_code",
        "process_identifier",
        "ticket_issue_date",
        "electronic_ticket_indicator",
        "original_ticket_number",
        "purchase_type",
        "credit_reason_indicator",
        "ticket_change_indicator",
        "plan_number",
        "arrival_date",
        "restricted_ticket_desciption",
        "exchange_ticket_amount",
        "exchange_ticket_fee_amount",
        "reservation_type",
        "boarding_fee_amount",
        "legs",
        "ancillary_information",
        "flight_type",
        "insurance_amount",
        "frequent_flyer_number",
        "third_party_status",
        "passenger_type",
        "total_insurance_amount",
    ]

    def __init__(
        self,
        is_domestic=APIHelper.SKIP,
        booking_reference_number=APIHelper.SKIP,
        carrier_name=APIHelper.SKIP,
        ticket_issuer=APIHelper.SKIP,
        ticket_number=APIHelper.SKIP,
        check_digit=APIHelper.SKIP,
        restricted_ticket_indicator=APIHelper.SKIP,
        transaction_type=APIHelper.SKIP,
        extended_payment_code=APIHelper.SKIP,
        passenger_name=APIHelper.SKIP,
        customer_code=APIHelper.SKIP,
        document_type=APIHelper.SKIP,
        document_number=APIHelper.SKIP,
        document_number_of_parts=APIHelper.SKIP,
        invoice_number=APIHelper.SKIP,
        invoice_date=APIHelper.SKIP,
        additional_charges=APIHelper.SKIP,
        total_fee_amount=APIHelper.SKIP,
        clearing_sequence=APIHelper.SKIP,
        clearing_count=APIHelper.SKIP,
        total_clearing_amount=APIHelper.SKIP,
        number_of_passengers=APIHelper.SKIP,
        reservation_system_code=APIHelper.SKIP,
        process_identifier=APIHelper.SKIP,
        ticket_issue_date=APIHelper.SKIP,
        electronic_ticket_indicator=APIHelper.SKIP,
        original_ticket_number=APIHelper.SKIP,
        purchase_type=APIHelper.SKIP,
        credit_reason_indicator=APIHelper.SKIP,
        ticket_change_indicator=APIHelper.SKIP,
        plan_number=APIHelper.SKIP,
        arrival_date=APIHelper.SKIP,
        restricted_ticket_desciption=APIHelper.SKIP,
        exchange_ticket_amount=APIHelper.SKIP,
        exchange_ticket_fee_amount=APIHelper.SKIP,
        reservation_type=APIHelper.SKIP,
        boarding_fee_amount=APIHelper.SKIP,
        legs=APIHelper.SKIP,
        ancillary_information=APIHelper.SKIP,
        flight_type=APIHelper.SKIP,
        insurance_amount=APIHelper.SKIP,
        frequent_flyer_number=APIHelper.SKIP,
        third_party_status=APIHelper.SKIP,
        passenger_type=APIHelper.SKIP,
        total_insurance_amount=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a Airline instance."""
        # Initialize members of the class
        if is_domestic is not APIHelper.SKIP:
            self.is_domestic = is_domestic
        if booking_reference_number is not APIHelper.SKIP:
            self.booking_reference_number = booking_reference_number
        if carrier_name is not APIHelper.SKIP:
            self.carrier_name = carrier_name
        if ticket_issuer is not APIHelper.SKIP:
            self.ticket_issuer = ticket_issuer
        if ticket_number is not APIHelper.SKIP:
            self.ticket_number = ticket_number
        if check_digit is not APIHelper.SKIP:
            self.check_digit = check_digit
        if restricted_ticket_indicator is not APIHelper.SKIP:
            self.restricted_ticket_indicator = restricted_ticket_indicator
        if transaction_type is not APIHelper.SKIP:
            self.transaction_type = transaction_type
        if extended_payment_code is not APIHelper.SKIP:
            self.extended_payment_code = extended_payment_code
        if passenger_name is not APIHelper.SKIP:
            self.passenger_name = passenger_name
        if customer_code is not APIHelper.SKIP:
            self.customer_code = customer_code
        if document_type is not APIHelper.SKIP:
            self.document_type = document_type
        if document_number is not APIHelper.SKIP:
            self.document_number = document_number
        if document_number_of_parts is not APIHelper.SKIP:
            self.document_number_of_parts = document_number_of_parts
        if invoice_number is not APIHelper.SKIP:
            self.invoice_number = invoice_number
        if invoice_date is not APIHelper.SKIP:
            self.invoice_date = invoice_date
        if additional_charges is not APIHelper.SKIP:
            self.additional_charges = additional_charges
        if total_fee_amount is not APIHelper.SKIP:
            self.total_fee_amount = total_fee_amount
        if clearing_sequence is not APIHelper.SKIP:
            self.clearing_sequence = clearing_sequence
        if clearing_count is not APIHelper.SKIP:
            self.clearing_count = clearing_count
        if total_clearing_amount is not APIHelper.SKIP:
            self.total_clearing_amount = total_clearing_amount
        if number_of_passengers is not APIHelper.SKIP:
            self.number_of_passengers = number_of_passengers
        if reservation_system_code is not APIHelper.SKIP:
            self.reservation_system_code = reservation_system_code
        if process_identifier is not APIHelper.SKIP:
            self.process_identifier = process_identifier
        if ticket_issue_date is not APIHelper.SKIP:
            self.ticket_issue_date = ticket_issue_date
        if electronic_ticket_indicator is not APIHelper.SKIP:
            self.electronic_ticket_indicator = electronic_ticket_indicator
        if original_ticket_number is not APIHelper.SKIP:
            self.original_ticket_number = original_ticket_number
        if purchase_type is not APIHelper.SKIP:
            self.purchase_type = purchase_type
        if credit_reason_indicator is not APIHelper.SKIP:
            self.credit_reason_indicator = credit_reason_indicator
        if ticket_change_indicator is not APIHelper.SKIP:
            self.ticket_change_indicator = ticket_change_indicator
        if plan_number is not APIHelper.SKIP:
            self.plan_number = plan_number
        if arrival_date is not APIHelper.SKIP:
            self.arrival_date = arrival_date
        if restricted_ticket_desciption is not APIHelper.SKIP:
            self.restricted_ticket_desciption = restricted_ticket_desciption
        if exchange_ticket_amount is not APIHelper.SKIP:
            self.exchange_ticket_amount = exchange_ticket_amount
        if exchange_ticket_fee_amount is not APIHelper.SKIP:
            self.exchange_ticket_fee_amount = exchange_ticket_fee_amount
        if reservation_type is not APIHelper.SKIP:
            self.reservation_type = reservation_type
        if boarding_fee_amount is not APIHelper.SKIP:
            self.boarding_fee_amount = boarding_fee_amount
        if legs is not APIHelper.SKIP:
            self.legs = legs
        if ancillary_information is not APIHelper.SKIP:
            self.ancillary_information = ancillary_information
        if flight_type is not APIHelper.SKIP:
            self.flight_type = flight_type
        if insurance_amount is not APIHelper.SKIP:
            self.insurance_amount = insurance_amount
        if frequent_flyer_number is not APIHelper.SKIP:
            self.frequent_flyer_number = frequent_flyer_number
        if third_party_status is not APIHelper.SKIP:
            self.third_party_status = third_party_status
        if passenger_type is not APIHelper.SKIP:
            self.passenger_type = passenger_type
        if total_insurance_amount is not APIHelper.SKIP:
            self.total_insurance_amount = total_insurance_amount

        # Add additional model properties to the instance
        if additional_properties is None:
            additional_properties = {}
        self.additional_properties = additional_properties

    @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
        is_domestic =\
            dictionary.get("isDomestic")\
            if dictionary.get("isDomestic")\
                else APIHelper.SKIP
        booking_reference_number =\
            dictionary.get("bookingReferenceNumber")\
            if dictionary.get("bookingReferenceNumber")\
                else APIHelper.SKIP
        carrier_name =\
            dictionary.get("carrierName")\
            if dictionary.get("carrierName")\
                else APIHelper.SKIP
        ticket_issuer =\
            TicketIssuer.from_dictionary(
                dictionary.get("ticketIssuer"))\
                if "ticketIssuer" in dictionary.keys()\
                else APIHelper.SKIP
        ticket_number =\
            dictionary.get("ticketNumber")\
            if dictionary.get("ticketNumber")\
                else APIHelper.SKIP
        check_digit =\
            dictionary.get("checkDigit")\
            if dictionary.get("checkDigit")\
                else APIHelper.SKIP
        restricted_ticket_indicator =\
            dictionary.get("restrictedTicketIndicator")\
            if dictionary.get("restrictedTicketIndicator")\
                else APIHelper.SKIP
        transaction_type =\
            dictionary.get("transactionType")\
            if dictionary.get("transactionType")\
                else APIHelper.SKIP
        extended_payment_code =\
            dictionary.get("extendedPaymentCode")\
            if dictionary.get("extendedPaymentCode")\
                else APIHelper.SKIP
        passenger_name =\
            dictionary.get("passengerName")\
            if dictionary.get("passengerName")\
                else APIHelper.SKIP
        customer_code =\
            dictionary.get("customerCode")\
            if dictionary.get("customerCode")\
                else APIHelper.SKIP
        document_type =\
            dictionary.get("documentType")\
            if dictionary.get("documentType")\
                else APIHelper.SKIP
        document_number =\
            dictionary.get("documentNumber")\
            if dictionary.get("documentNumber")\
                else APIHelper.SKIP
        document_number_of_parts =\
            dictionary.get("documentNumberOfParts")\
            if dictionary.get("documentNumberOfParts")\
                else APIHelper.SKIP
        invoice_number =\
            dictionary.get("invoiceNumber")\
            if dictionary.get("invoiceNumber")\
                else APIHelper.SKIP
        invoice_date =\
            dictionary.get("invoiceDate")\
            if dictionary.get("invoiceDate")\
                else APIHelper.SKIP
        additional_charges =\
            dictionary.get("additionalCharges")\
            if dictionary.get("additionalCharges")\
                else APIHelper.SKIP
        total_fee_amount =\
            dictionary.get("totalFeeAmount")\
            if dictionary.get("totalFeeAmount")\
                else APIHelper.SKIP
        clearing_sequence =\
            dictionary.get("clearingSequence")\
            if dictionary.get("clearingSequence")\
                else APIHelper.SKIP
        clearing_count =\
            dictionary.get("clearingCount")\
            if dictionary.get("clearingCount")\
                else APIHelper.SKIP
        total_clearing_amount =\
            dictionary.get("totalClearingAmount")\
            if dictionary.get("totalClearingAmount")\
                else APIHelper.SKIP
        number_of_passengers =\
            dictionary.get("numberOfPassengers")\
            if dictionary.get("numberOfPassengers")\
                else APIHelper.SKIP
        reservation_system_code =\
            dictionary.get("reservationSystemCode")\
            if dictionary.get("reservationSystemCode")\
                else APIHelper.SKIP
        process_identifier =\
            dictionary.get("processIdentifier")\
            if dictionary.get("processIdentifier")\
                else APIHelper.SKIP
        ticket_issue_date =\
            dictionary.get("ticketIssueDate")\
            if dictionary.get("ticketIssueDate")\
                else APIHelper.SKIP
        electronic_ticket_indicator =\
            dictionary.get("electronicTicketIndicator")\
            if "electronicTicketIndicator" in dictionary.keys()\
                else APIHelper.SKIP
        original_ticket_number =\
            dictionary.get("originalTicketNumber")\
            if dictionary.get("originalTicketNumber")\
                else APIHelper.SKIP
        purchase_type =\
            dictionary.get("purchaseType")\
            if dictionary.get("purchaseType")\
                else APIHelper.SKIP
        credit_reason_indicator =\
            dictionary.get("creditReasonIndicator")\
            if dictionary.get("creditReasonIndicator")\
                else APIHelper.SKIP
        ticket_change_indicator =\
            dictionary.get("ticketChangeIndicator")\
            if dictionary.get("ticketChangeIndicator")\
                else APIHelper.SKIP
        plan_number =\
            dictionary.get("planNumber")\
            if dictionary.get("planNumber")\
                else APIHelper.SKIP
        arrival_date =\
            dictionary.get("arrivalDate")\
            if dictionary.get("arrivalDate")\
                else APIHelper.SKIP
        restricted_ticket_desciption =\
            dictionary.get("restrictedTicketDesciption")\
            if dictionary.get("restrictedTicketDesciption")\
                else APIHelper.SKIP
        exchange_ticket_amount =\
            dictionary.get("exchangeTicketAmount")\
            if dictionary.get("exchangeTicketAmount")\
                else APIHelper.SKIP
        exchange_ticket_fee_amount =\
            dictionary.get("exchangeTicketFeeAmount")\
            if dictionary.get("exchangeTicketFeeAmount")\
                else APIHelper.SKIP
        reservation_type =\
            dictionary.get("reservationType")\
            if dictionary.get("reservationType")\
                else APIHelper.SKIP
        boarding_fee_amount =\
            dictionary.get("boardingFeeAmount")\
            if dictionary.get("boardingFeeAmount")\
                else APIHelper.SKIP
        legs = None
        if dictionary.get("legs") is not None:
            legs = [
                Leg.from_dictionary(x)
                    for x in dictionary.get("legs")
            ]
        else:
            legs = APIHelper.SKIP
        ancillary_information =\
            AncillaryInformation.from_dictionary(
                dictionary.get("ancillaryInformation"))\
                if "ancillaryInformation" in dictionary.keys()\
                else APIHelper.SKIP
        flight_type =\
            dictionary.get("flightType")\
            if dictionary.get("flightType")\
                else APIHelper.SKIP
        insurance_amount =\
            dictionary.get("insuranceAmount")\
            if dictionary.get("insuranceAmount")\
                else APIHelper.SKIP
        frequent_flyer_number =\
            dictionary.get("frequentFlyerNumber")\
            if dictionary.get("frequentFlyerNumber")\
                else APIHelper.SKIP
        third_party_status =\
            dictionary.get("thirdPartyStatus")\
            if dictionary.get("thirdPartyStatus")\
                else APIHelper.SKIP
        passenger_type =\
            dictionary.get("passengerType")\
            if dictionary.get("passengerType")\
                else APIHelper.SKIP
        total_insurance_amount =\
            dictionary.get("totalInsuranceAmount")\
            if dictionary.get("totalInsuranceAmount")\
                else APIHelper.SKIP

        additional_properties = APIHelper.get_additional_properties(
            dictionary={k: v for k, v in dictionary.items()
                        if k not in cls._names.values()},
            unboxing_function=lambda value: value)

        # Return an object of this model
        return cls(is_domestic,
                   booking_reference_number,
                   carrier_name,
                   ticket_issuer,
                   ticket_number,
                   check_digit,
                   restricted_ticket_indicator,
                   transaction_type,
                   extended_payment_code,
                   passenger_name,
                   customer_code,
                   document_type,
                   document_number,
                   document_number_of_parts,
                   invoice_number,
                   invoice_date,
                   additional_charges,
                   total_fee_amount,
                   clearing_sequence,
                   clearing_count,
                   total_clearing_amount,
                   number_of_passengers,
                   reservation_system_code,
                   process_identifier,
                   ticket_issue_date,
                   electronic_ticket_indicator,
                   original_ticket_number,
                   purchase_type,
                   credit_reason_indicator,
                   ticket_change_indicator,
                   plan_number,
                   arrival_date,
                   restricted_ticket_desciption,
                   exchange_ticket_amount,
                   exchange_ticket_fee_amount,
                   reservation_type,
                   boarding_fee_amount,
                   legs,
                   ancillary_information,
                   flight_type,
                   insurance_amount,
                   frequent_flyer_number,
                   third_party_status,
                   passenger_type,
                   total_insurance_amount,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _is_domestic=(
            self.is_domestic
            if hasattr(self, "is_domestic")
            else None
        )
        _booking_reference_number=(
            self.booking_reference_number
            if hasattr(self, "booking_reference_number")
            else None
        )
        _carrier_name=(
            self.carrier_name
            if hasattr(self, "carrier_name")
            else None
        )
        _ticket_issuer=(
            self.ticket_issuer
            if hasattr(self, "ticket_issuer")
            else None
        )
        _ticket_number=(
            self.ticket_number
            if hasattr(self, "ticket_number")
            else None
        )
        _check_digit=(
            self.check_digit
            if hasattr(self, "check_digit")
            else None
        )
        _restricted_ticket_indicator=(
            self.restricted_ticket_indicator
            if hasattr(self, "restricted_ticket_indicator")
            else None
        )
        _transaction_type=(
            self.transaction_type
            if hasattr(self, "transaction_type")
            else None
        )
        _extended_payment_code=(
            self.extended_payment_code
            if hasattr(self, "extended_payment_code")
            else None
        )
        _passenger_name=(
            self.passenger_name
            if hasattr(self, "passenger_name")
            else None
        )
        _customer_code=(
            self.customer_code
            if hasattr(self, "customer_code")
            else None
        )
        _document_type=(
            self.document_type
            if hasattr(self, "document_type")
            else None
        )
        _document_number=(
            self.document_number
            if hasattr(self, "document_number")
            else None
        )
        _document_number_of_parts=(
            self.document_number_of_parts
            if hasattr(self, "document_number_of_parts")
            else None
        )
        _invoice_number=(
            self.invoice_number
            if hasattr(self, "invoice_number")
            else None
        )
        _invoice_date=(
            self.invoice_date
            if hasattr(self, "invoice_date")
            else None
        )
        _additional_charges=(
            self.additional_charges
            if hasattr(self, "additional_charges")
            else None
        )
        _total_fee_amount=(
            self.total_fee_amount
            if hasattr(self, "total_fee_amount")
            else None
        )
        _clearing_sequence=(
            self.clearing_sequence
            if hasattr(self, "clearing_sequence")
            else None
        )
        _clearing_count=(
            self.clearing_count
            if hasattr(self, "clearing_count")
            else None
        )
        _total_clearing_amount=(
            self.total_clearing_amount
            if hasattr(self, "total_clearing_amount")
            else None
        )
        _number_of_passengers=(
            self.number_of_passengers
            if hasattr(self, "number_of_passengers")
            else None
        )
        _reservation_system_code=(
            self.reservation_system_code
            if hasattr(self, "reservation_system_code")
            else None
        )
        _process_identifier=(
            self.process_identifier
            if hasattr(self, "process_identifier")
            else None
        )
        _ticket_issue_date=(
            self.ticket_issue_date
            if hasattr(self, "ticket_issue_date")
            else None
        )
        _electronic_ticket_indicator=(
            self.electronic_ticket_indicator
            if hasattr(self, "electronic_ticket_indicator")
            else None
        )
        _original_ticket_number=(
            self.original_ticket_number
            if hasattr(self, "original_ticket_number")
            else None
        )
        _purchase_type=(
            self.purchase_type
            if hasattr(self, "purchase_type")
            else None
        )
        _credit_reason_indicator=(
            self.credit_reason_indicator
            if hasattr(self, "credit_reason_indicator")
            else None
        )
        _ticket_change_indicator=(
            self.ticket_change_indicator
            if hasattr(self, "ticket_change_indicator")
            else None
        )
        _plan_number=(
            self.plan_number
            if hasattr(self, "plan_number")
            else None
        )
        _arrival_date=(
            self.arrival_date
            if hasattr(self, "arrival_date")
            else None
        )
        _restricted_ticket_desciption=(
            self.restricted_ticket_desciption
            if hasattr(self, "restricted_ticket_desciption")
            else None
        )
        _exchange_ticket_amount=(
            self.exchange_ticket_amount
            if hasattr(self, "exchange_ticket_amount")
            else None
        )
        _exchange_ticket_fee_amount=(
            self.exchange_ticket_fee_amount
            if hasattr(self, "exchange_ticket_fee_amount")
            else None
        )
        _reservation_type=(
            self.reservation_type
            if hasattr(self, "reservation_type")
            else None
        )
        _boarding_fee_amount=(
            self.boarding_fee_amount
            if hasattr(self, "boarding_fee_amount")
            else None
        )
        _legs=(
            self.legs
            if hasattr(self, "legs")
            else None
        )
        _ancillary_information=(
            self.ancillary_information
            if hasattr(self, "ancillary_information")
            else None
        )
        _flight_type=(
            self.flight_type
            if hasattr(self, "flight_type")
            else None
        )
        _insurance_amount=(
            self.insurance_amount
            if hasattr(self, "insurance_amount")
            else None
        )
        _frequent_flyer_number=(
            self.frequent_flyer_number
            if hasattr(self, "frequent_flyer_number")
            else None
        )
        _third_party_status=(
            self.third_party_status
            if hasattr(self, "third_party_status")
            else None
        )
        _passenger_type=(
            self.passenger_type
            if hasattr(self, "passenger_type")
            else None
        )
        _total_insurance_amount=(
            self.total_insurance_amount
            if hasattr(self, "total_insurance_amount")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"is_domestic={_is_domestic!r}, "
            f"booking_reference_number={_booking_reference_number!r}, "
            f"carrier_name={_carrier_name!r}, "
            f"ticket_issuer={_ticket_issuer!r}, "
            f"ticket_number={_ticket_number!r}, "
            f"check_digit={_check_digit!r}, "
            f"restricted_ticket_indicator={_restricted_ticket_indicator!r}, "
            f"transaction_type={_transaction_type!r}, "
            f"extended_payment_code={_extended_payment_code!r}, "
            f"passenger_name={_passenger_name!r}, "
            f"customer_code={_customer_code!r}, "
            f"document_type={_document_type!r}, "
            f"document_number={_document_number!r}, "
            f"document_number_of_parts={_document_number_of_parts!r}, "
            f"invoice_number={_invoice_number!r}, "
            f"invoice_date={_invoice_date!r}, "
            f"additional_charges={_additional_charges!r}, "
            f"total_fee_amount={_total_fee_amount!r}, "
            f"clearing_sequence={_clearing_sequence!r}, "
            f"clearing_count={_clearing_count!r}, "
            f"total_clearing_amount={_total_clearing_amount!r}, "
            f"number_of_passengers={_number_of_passengers!r}, "
            f"reservation_system_code={_reservation_system_code!r}, "
            f"process_identifier={_process_identifier!r}, "
            f"ticket_issue_date={_ticket_issue_date!r}, "
            f"electronic_ticket_indicator={_electronic_ticket_indicator!r}, "
            f"original_ticket_number={_original_ticket_number!r}, "
            f"purchase_type={_purchase_type!r}, "
            f"credit_reason_indicator={_credit_reason_indicator!r}, "
            f"ticket_change_indicator={_ticket_change_indicator!r}, "
            f"plan_number={_plan_number!r}, "
            f"arrival_date={_arrival_date!r}, "
            f"restricted_ticket_desciption={_restricted_ticket_desciption!r}, "
            f"exchange_ticket_amount={_exchange_ticket_amount!r}, "
            f"exchange_ticket_fee_amount={_exchange_ticket_fee_amount!r}, "
            f"reservation_type={_reservation_type!r}, "
            f"boarding_fee_amount={_boarding_fee_amount!r}, "
            f"legs={_legs!r}, "
            f"ancillary_information={_ancillary_information!r}, "
            f"flight_type={_flight_type!r}, "
            f"insurance_amount={_insurance_amount!r}, "
            f"frequent_flyer_number={_frequent_flyer_number!r}, "
            f"third_party_status={_third_party_status!r}, "
            f"passenger_type={_passenger_type!r}, "
            f"total_insurance_amount={_total_insurance_amount!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _is_domestic=(
            self.is_domestic
            if hasattr(self, "is_domestic")
            else None
        )
        _booking_reference_number=(
            self.booking_reference_number
            if hasattr(self, "booking_reference_number")
            else None
        )
        _carrier_name=(
            self.carrier_name
            if hasattr(self, "carrier_name")
            else None
        )
        _ticket_issuer=(
            self.ticket_issuer
            if hasattr(self, "ticket_issuer")
            else None
        )
        _ticket_number=(
            self.ticket_number
            if hasattr(self, "ticket_number")
            else None
        )
        _check_digit=(
            self.check_digit
            if hasattr(self, "check_digit")
            else None
        )
        _restricted_ticket_indicator=(
            self.restricted_ticket_indicator
            if hasattr(self, "restricted_ticket_indicator")
            else None
        )
        _transaction_type=(
            self.transaction_type
            if hasattr(self, "transaction_type")
            else None
        )
        _extended_payment_code=(
            self.extended_payment_code
            if hasattr(self, "extended_payment_code")
            else None
        )
        _passenger_name=(
            self.passenger_name
            if hasattr(self, "passenger_name")
            else None
        )
        _customer_code=(
            self.customer_code
            if hasattr(self, "customer_code")
            else None
        )
        _document_type=(
            self.document_type
            if hasattr(self, "document_type")
            else None
        )
        _document_number=(
            self.document_number
            if hasattr(self, "document_number")
            else None
        )
        _document_number_of_parts=(
            self.document_number_of_parts
            if hasattr(self, "document_number_of_parts")
            else None
        )
        _invoice_number=(
            self.invoice_number
            if hasattr(self, "invoice_number")
            else None
        )
        _invoice_date=(
            self.invoice_date
            if hasattr(self, "invoice_date")
            else None
        )
        _additional_charges=(
            self.additional_charges
            if hasattr(self, "additional_charges")
            else None
        )
        _total_fee_amount=(
            self.total_fee_amount
            if hasattr(self, "total_fee_amount")
            else None
        )
        _clearing_sequence=(
            self.clearing_sequence
            if hasattr(self, "clearing_sequence")
            else None
        )
        _clearing_count=(
            self.clearing_count
            if hasattr(self, "clearing_count")
            else None
        )
        _total_clearing_amount=(
            self.total_clearing_amount
            if hasattr(self, "total_clearing_amount")
            else None
        )
        _number_of_passengers=(
            self.number_of_passengers
            if hasattr(self, "number_of_passengers")
            else None
        )
        _reservation_system_code=(
            self.reservation_system_code
            if hasattr(self, "reservation_system_code")
            else None
        )
        _process_identifier=(
            self.process_identifier
            if hasattr(self, "process_identifier")
            else None
        )
        _ticket_issue_date=(
            self.ticket_issue_date
            if hasattr(self, "ticket_issue_date")
            else None
        )
        _electronic_ticket_indicator=(
            self.electronic_ticket_indicator
            if hasattr(self, "electronic_ticket_indicator")
            else None
        )
        _original_ticket_number=(
            self.original_ticket_number
            if hasattr(self, "original_ticket_number")
            else None
        )
        _purchase_type=(
            self.purchase_type
            if hasattr(self, "purchase_type")
            else None
        )
        _credit_reason_indicator=(
            self.credit_reason_indicator
            if hasattr(self, "credit_reason_indicator")
            else None
        )
        _ticket_change_indicator=(
            self.ticket_change_indicator
            if hasattr(self, "ticket_change_indicator")
            else None
        )
        _plan_number=(
            self.plan_number
            if hasattr(self, "plan_number")
            else None
        )
        _arrival_date=(
            self.arrival_date
            if hasattr(self, "arrival_date")
            else None
        )
        _restricted_ticket_desciption=(
            self.restricted_ticket_desciption
            if hasattr(self, "restricted_ticket_desciption")
            else None
        )
        _exchange_ticket_amount=(
            self.exchange_ticket_amount
            if hasattr(self, "exchange_ticket_amount")
            else None
        )
        _exchange_ticket_fee_amount=(
            self.exchange_ticket_fee_amount
            if hasattr(self, "exchange_ticket_fee_amount")
            else None
        )
        _reservation_type=(
            self.reservation_type
            if hasattr(self, "reservation_type")
            else None
        )
        _boarding_fee_amount=(
            self.boarding_fee_amount
            if hasattr(self, "boarding_fee_amount")
            else None
        )
        _legs=(
            self.legs
            if hasattr(self, "legs")
            else None
        )
        _ancillary_information=(
            self.ancillary_information
            if hasattr(self, "ancillary_information")
            else None
        )
        _flight_type=(
            self.flight_type
            if hasattr(self, "flight_type")
            else None
        )
        _insurance_amount=(
            self.insurance_amount
            if hasattr(self, "insurance_amount")
            else None
        )
        _frequent_flyer_number=(
            self.frequent_flyer_number
            if hasattr(self, "frequent_flyer_number")
            else None
        )
        _third_party_status=(
            self.third_party_status
            if hasattr(self, "third_party_status")
            else None
        )
        _passenger_type=(
            self.passenger_type
            if hasattr(self, "passenger_type")
            else None
        )
        _total_insurance_amount=(
            self.total_insurance_amount
            if hasattr(self, "total_insurance_amount")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"is_domestic={_is_domestic!s}, "
            f"booking_reference_number={_booking_reference_number!s}, "
            f"carrier_name={_carrier_name!s}, "
            f"ticket_issuer={_ticket_issuer!s}, "
            f"ticket_number={_ticket_number!s}, "
            f"check_digit={_check_digit!s}, "
            f"restricted_ticket_indicator={_restricted_ticket_indicator!s}, "
            f"transaction_type={_transaction_type!s}, "
            f"extended_payment_code={_extended_payment_code!s}, "
            f"passenger_name={_passenger_name!s}, "
            f"customer_code={_customer_code!s}, "
            f"document_type={_document_type!s}, "
            f"document_number={_document_number!s}, "
            f"document_number_of_parts={_document_number_of_parts!s}, "
            f"invoice_number={_invoice_number!s}, "
            f"invoice_date={_invoice_date!s}, "
            f"additional_charges={_additional_charges!s}, "
            f"total_fee_amount={_total_fee_amount!s}, "
            f"clearing_sequence={_clearing_sequence!s}, "
            f"clearing_count={_clearing_count!s}, "
            f"total_clearing_amount={_total_clearing_amount!s}, "
            f"number_of_passengers={_number_of_passengers!s}, "
            f"reservation_system_code={_reservation_system_code!s}, "
            f"process_identifier={_process_identifier!s}, "
            f"ticket_issue_date={_ticket_issue_date!s}, "
            f"electronic_ticket_indicator={_electronic_ticket_indicator!s}, "
            f"original_ticket_number={_original_ticket_number!s}, "
            f"purchase_type={_purchase_type!s}, "
            f"credit_reason_indicator={_credit_reason_indicator!s}, "
            f"ticket_change_indicator={_ticket_change_indicator!s}, "
            f"plan_number={_plan_number!s}, "
            f"arrival_date={_arrival_date!s}, "
            f"restricted_ticket_desciption={_restricted_ticket_desciption!s}, "
            f"exchange_ticket_amount={_exchange_ticket_amount!s}, "
            f"exchange_ticket_fee_amount={_exchange_ticket_fee_amount!s}, "
            f"reservation_type={_reservation_type!s}, "
            f"boarding_fee_amount={_boarding_fee_amount!s}, "
            f"legs={_legs!s}, "
            f"ancillary_information={_ancillary_information!s}, "
            f"flight_type={_flight_type!s}, "
            f"insurance_amount={_insurance_amount!s}, "
            f"frequent_flyer_number={_frequent_flyer_number!s}, "
            f"third_party_status={_third_party_status!s}, "
            f"passenger_type={_passenger_type!s}, "
            f"total_insurance_amount={_total_insurance_amount!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
