/*
 * The version of the OpenAPI document: v6
 * Contact: developer-experience@adyen.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit this class manually.
 */

import { Amount } from './amount';
import { BankAccountDetail } from './bankAccountDetail';

export class Transaction {
    'amount'?: Amount;
    'bankAccountDetail'?: BankAccountDetail;
    /**
    * The merchant reference of a related capture.
    */
    'captureMerchantReference'?: string;
    /**
    * The psp reference of a related capture.
    */
    'capturePspReference'?: string;
    /**
    * The date on which the transaction was performed.
    */
    'creationDate'?: Date;
    /**
    * A description of the transaction.
    */
    'description'?: string;
    /**
    * The code of the account to which funds were credited during an outgoing fund transfer.
    */
    'destinationAccountCode'?: string;
    /**
    * The psp reference of the related dispute.
    */
    'disputePspReference'?: string;
    /**
    * The reason code of a dispute.
    */
    'disputeReasonCode'?: string;
    /**
    * The merchant reference of a transaction.
    */
    'merchantReference'?: string;
    /**
    * The psp reference of the related authorisation or transfer.
    */
    'paymentPspReference'?: string;
    /**
    * The psp reference of the related payout.
    */
    'payoutPspReference'?: string;
    /**
    * The psp reference of a transaction.
    */
    'pspReference'?: string;
    /**
    * The code of the account from which funds were debited during an incoming fund transfer.
    */
    'sourceAccountCode'?: string;
    /**
    * The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`.
    */
    'transactionStatus'?: Transaction.TransactionStatusEnum;
    /**
    * The transfer code of the transaction.
    */
    'transferCode'?: string;

    static discriminator: string | undefined = undefined;

    static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
        {
            "name": "amount",
            "baseName": "amount",
            "type": "Amount"
        },
        {
            "name": "bankAccountDetail",
            "baseName": "bankAccountDetail",
            "type": "BankAccountDetail"
        },
        {
            "name": "captureMerchantReference",
            "baseName": "captureMerchantReference",
            "type": "string"
        },
        {
            "name": "capturePspReference",
            "baseName": "capturePspReference",
            "type": "string"
        },
        {
            "name": "creationDate",
            "baseName": "creationDate",
            "type": "Date"
        },
        {
            "name": "description",
            "baseName": "description",
            "type": "string"
        },
        {
            "name": "destinationAccountCode",
            "baseName": "destinationAccountCode",
            "type": "string"
        },
        {
            "name": "disputePspReference",
            "baseName": "disputePspReference",
            "type": "string"
        },
        {
            "name": "disputeReasonCode",
            "baseName": "disputeReasonCode",
            "type": "string"
        },
        {
            "name": "merchantReference",
            "baseName": "merchantReference",
            "type": "string"
        },
        {
            "name": "paymentPspReference",
            "baseName": "paymentPspReference",
            "type": "string"
        },
        {
            "name": "payoutPspReference",
            "baseName": "payoutPspReference",
            "type": "string"
        },
        {
            "name": "pspReference",
            "baseName": "pspReference",
            "type": "string"
        },
        {
            "name": "sourceAccountCode",
            "baseName": "sourceAccountCode",
            "type": "string"
        },
        {
            "name": "transactionStatus",
            "baseName": "transactionStatus",
            "type": "Transaction.TransactionStatusEnum"
        },
        {
            "name": "transferCode",
            "baseName": "transferCode",
            "type": "string"
        }    ];

    static getAttributeTypeMap() {
        return Transaction.attributeTypeMap;
    }
}

export namespace Transaction {
    export enum TransactionStatusEnum {
        BalanceNotPaidOutTransfer = <any> 'BalanceNotPaidOutTransfer',
        BalancePlatformSweep = <any> 'BalancePlatformSweep',
        BalancePlatfromSweepReturned = <any> 'BalancePlatfromSweepReturned',
        Chargeback = <any> 'Chargeback',
        ChargebackCorrection = <any> 'ChargebackCorrection',
        ChargebackCorrectionReceived = <any> 'ChargebackCorrectionReceived',
        ChargebackReceived = <any> 'ChargebackReceived',
        ChargebackReversed = <any> 'ChargebackReversed',
        ChargebackReversedCorrection = <any> 'ChargebackReversedCorrection',
        ChargebackReversedCorrectionReceived = <any> 'ChargebackReversedCorrectionReceived',
        ChargebackReversedReceived = <any> 'ChargebackReversedReceived',
        Converted = <any> 'Converted',
        CreditClosed = <any> 'CreditClosed',
        CreditFailed = <any> 'CreditFailed',
        CreditReversed = <any> 'CreditReversed',
        CreditReversedReceived = <any> 'CreditReversedReceived',
        CreditSuspended = <any> 'CreditSuspended',
        Credited = <any> 'Credited',
        DebitFailed = <any> 'DebitFailed',
        DebitReversedReceived = <any> 'DebitReversedReceived',
        Debited = <any> 'Debited',
        DebitedReversed = <any> 'DebitedReversed',
        DepositCorrectionCredited = <any> 'DepositCorrectionCredited',
        DepositCorrectionDebited = <any> 'DepositCorrectionDebited',
        Fee = <any> 'Fee',
        FundTransfer = <any> 'FundTransfer',
        FundTransferReversed = <any> 'FundTransferReversed',
        InvoiceDeductionCredited = <any> 'InvoiceDeductionCredited',
        InvoiceDeductionDebited = <any> 'InvoiceDeductionDebited',
        ManualCorrected = <any> 'ManualCorrected',
        ManualCorrectionCredited = <any> 'ManualCorrectionCredited',
        ManualCorrectionDebited = <any> 'ManualCorrectionDebited',
        MerchantPayin = <any> 'MerchantPayin',
        MerchantPayinReversed = <any> 'MerchantPayinReversed',
        Payout = <any> 'Payout',
        PayoutReversed = <any> 'PayoutReversed',
        PendingCredit = <any> 'PendingCredit',
        PendingDebit = <any> 'PendingDebit',
        PendingFundTransfer = <any> 'PendingFundTransfer',
        ReCredited = <any> 'ReCredited',
        ReCreditedReceived = <any> 'ReCreditedReceived',
        SecondChargeback = <any> 'SecondChargeback',
        SecondChargebackCorrection = <any> 'SecondChargebackCorrection',
        SecondChargebackCorrectionReceived = <any> 'SecondChargebackCorrectionReceived',
        SecondChargebackReceived = <any> 'SecondChargebackReceived'
    }
}
