import { ShopifyObject } from "./base";
import { PaymentDetails } from "./payment_details";
import { TransactionKind } from "../enums/transaction_kind";
import { TransactionStatus } from "../enums/transaction_status";
export interface Transaction extends ShopifyObject {
    id: number;
    admin_graphql_api_id: string;
    /**
     * The amount of money that the transaction was for. Note: Shopify may return this property as a string.
     */
    amount: string;
    /**
     * The authorization code associated with the transaction.
     */
    authorization: string | null;
    /**
     * The date and time when the transaction was created.
     */
    created_at: string;
    /**
     * The three-letter code (ISO 4217) for the currency used for the payment.
     */
    currency: string;
    /**
     * The unique identifier for the device.
     * (can be null)
     */
    device_id: number | null;
    /**
     *  A standardized error code, independent of the payment provider. Valid values:
     *  * "incorrect_number"
     *  * "invalid_number"
     *  * "invalid_expiry_date"
     *  * "invalid_cvc"
     *  * "expired_card"
     *  * "incorrect_cvc"
     *  * "incorrect_zip"
     *  * "incorrect_address"
     *  * "card_declined"
     *  * "processing_error"
     *  * "call_issuer"
     *  * "pick_up_card"
     */
    error_code: string | null;
    /**
     * The name of the gateway the transaction was issued through.
     */
    gateway: string;
    /**
     * The kind of transaction. Known values are 'authorization', 'capture', 'sale', 'void' and 'refund'.
     */
    kind: TransactionKind;
    /**
     * The unique identifier for the location where the transaction was issued (coupled to device_id)
     * (can be null)
     */
    location_id: number | null;
    /**
     * A string generated by the payment provider with additional information about why the transaction succeeded or failed.
     */
    message: string | null;
    /**
     * The ID for the order that the transaction is associated with.
     */
    order_id: number;
    /**
     *  The ID of an associated transaction:
     *  * For `capture` transactions, the parent needs to be an `authorization` transaction.
     *  * For `void` transactions, the parent nees to be an `authorization` transaction.
     *  * For `refund` transactions, the parent needs to be a `capture` or `sale` transaction.
     */
    parent_id: number | null;
    /**
     * An object containing information about the credit card used for this transaction.
     * (may be undefined)
     */
    payment_details?: PaymentDetails;
    /**
     * The time when the transaction was processed as ISO string
     */
    processed_at: string;
    /**
     * Shopify does not currently offer documentation for this object.
     */
    receipt: any;
    /**
     * The origin of the transaction. This is set by Shopify and cannot be overridden. Example values include: 'web', 'pos', 'iphone', 'android'.
     */
    source_name: string;
    /**
     * The status of the transaction. Known values are: pending, failure, success or error.
     */
    status: TransactionStatus;
    /**
     * Whether the transaction is for testing purposes.
     */
    test: boolean;
    /**
     * The unique identifier for the user.
     */
    user_id: number | null;
}
