/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQtPurchasing.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtPurchasing.h"

#line 26 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qinapptransaction.sip"
#include <qinapptransaction.h>
#line 29 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"

#line 27 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 360 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qdatetime.sip"
#include <qdatetime.h>
#line 36 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qinappproduct.sip"
#include <qinappproduct.h>
#line 39 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 44 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 47 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 50 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 252 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 53 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 240 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 56 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 28 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobject.sip"
#include <qobject.h>
#line 59 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qvariant.sip"
#include <qvariant.h>
#line 62 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 38 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 30 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 68 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 149 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 71 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 74 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qthread.sip"
#include <qthread.h>
#line 77 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 80 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qregexp.sip"
#include <qregexp.h>
#line 83 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 86 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 89 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppTransaction.cpp"


PyDoc_STRVAR(doc_QInAppTransaction_product, "product(self) -> QInAppProduct|None");

extern "C" {static PyObject *meth_QInAppTransaction_product(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_product(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            ::QInAppProduct*sipRes;

            sipRes = sipCpp->product();

            return sipConvertFromType(sipRes, sipType_QInAppProduct, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_product, doc_QInAppTransaction_product);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_orderId, "orderId(self) -> str");

extern "C" {static PyObject *meth_QInAppTransaction_orderId(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_orderId(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString((sipSelfWasArg ? sipCpp->::QInAppTransaction::orderId() : sipCpp->orderId()));

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_orderId, doc_QInAppTransaction_orderId);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_failureReason, "failureReason(self) -> QInAppTransaction.FailureReason");

extern "C" {static PyObject *meth_QInAppTransaction_failureReason(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_failureReason(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            ::QInAppTransaction::FailureReason sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QInAppTransaction::failureReason() : sipCpp->failureReason());

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QInAppTransaction_FailureReason);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_failureReason, doc_QInAppTransaction_failureReason);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_errorString, "errorString(self) -> str");

extern "C" {static PyObject *meth_QInAppTransaction_errorString(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_errorString(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString((sipSelfWasArg ? sipCpp->::QInAppTransaction::errorString() : sipCpp->errorString()));

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_errorString, doc_QInAppTransaction_errorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_timestamp, "timestamp(self) -> QDateTime");

extern "C" {static PyObject *meth_QInAppTransaction_timestamp(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_timestamp(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            ::QDateTime*sipRes;

            sipRes = new ::QDateTime((sipSelfWasArg ? sipCpp->::QInAppTransaction::timestamp() : sipCpp->timestamp()));

            return sipConvertFromNewType(sipRes, sipType_QDateTime, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_timestamp, doc_QInAppTransaction_timestamp);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_finalize, "finalize(self)");

extern "C" {static PyObject *meth_QInAppTransaction_finalize(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_finalize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    PyObject *sipOrigSelf = sipSelf;

    {
        ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QInAppTransaction, sipName_finalize);
                return SIP_NULLPTR;
            }

            sipCpp->finalize();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_finalize, doc_QInAppTransaction_finalize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_platformProperty, "platformProperty(self, propertyName: str|None) -> str");

extern "C" {static PyObject *meth_QInAppTransaction_platformProperty(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_platformProperty(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QString* a0;
        int a0State = 0;
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QInAppTransaction, &sipCpp, sipType_QString, &a0, &a0State))
        {
            ::QString*sipRes;

            sipRes = new ::QString((sipSelfWasArg ? sipCpp->::QInAppTransaction::platformProperty(*a0) : sipCpp->platformProperty(*a0)));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_platformProperty, doc_QInAppTransaction_platformProperty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppTransaction_status, "status(self) -> QInAppTransaction.TransactionStatus");

extern "C" {static PyObject *meth_QInAppTransaction_status(PyObject *, PyObject *);}
static PyObject *meth_QInAppTransaction_status(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QInAppTransaction *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppTransaction, &sipCpp))
        {
            ::QInAppTransaction::TransactionStatus sipRes;

            sipRes = sipCpp->status();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QInAppTransaction_TransactionStatus);
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppTransaction, sipName_status, doc_QInAppTransaction_status);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QInAppTransaction(void *, const sipTypeDef *);}
static void *cast_QInAppTransaction(void *sipCppV, const sipTypeDef *targetType)
{
    ::QInAppTransaction *sipCpp = reinterpret_cast< ::QInAppTransaction *>(sipCppV);

    if (targetType == sipType_QInAppTransaction)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QInAppTransaction(void *, int);}
static void release_QInAppTransaction(void *sipCppV, int)
{
    ::QInAppTransaction *sipCpp = reinterpret_cast< ::QInAppTransaction *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void dealloc_QInAppTransaction(sipSimpleWrapper *);}
static void dealloc_QInAppTransaction(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QInAppTransaction(sipGetAddress(sipSelf), 0);
    }
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QInAppTransaction[] = {{4, 0, 1}};


static PyMethodDef methods_QInAppTransaction[] = {
    {sipName_errorString, meth_QInAppTransaction_errorString, METH_VARARGS, doc_QInAppTransaction_errorString},
    {sipName_failureReason, meth_QInAppTransaction_failureReason, METH_VARARGS, doc_QInAppTransaction_failureReason},
    {sipName_finalize, meth_QInAppTransaction_finalize, METH_VARARGS, doc_QInAppTransaction_finalize},
    {sipName_orderId, meth_QInAppTransaction_orderId, METH_VARARGS, doc_QInAppTransaction_orderId},
    {sipName_platformProperty, meth_QInAppTransaction_platformProperty, METH_VARARGS, doc_QInAppTransaction_platformProperty},
    {sipName_product, meth_QInAppTransaction_product, METH_VARARGS, doc_QInAppTransaction_product},
    {sipName_status, meth_QInAppTransaction_status, METH_VARARGS, doc_QInAppTransaction_status},
    {sipName_timestamp, meth_QInAppTransaction_timestamp, METH_VARARGS, doc_QInAppTransaction_timestamp}
};

static sipEnumMemberDef enummembers_QInAppTransaction[] = {
    {sipName_CanceledByUser, static_cast<int>(::QInAppTransaction::CanceledByUser), 4},
    {sipName_ErrorOccurred, static_cast<int>(::QInAppTransaction::ErrorOccurred), 4},
    {sipName_NoFailure, static_cast<int>(::QInAppTransaction::NoFailure), 4},
    {sipName_PurchaseApproved, static_cast<int>(::QInAppTransaction::PurchaseApproved), 5},
    {sipName_PurchaseFailed, static_cast<int>(::QInAppTransaction::PurchaseFailed), 5},
    {sipName_PurchaseRestored, static_cast<int>(::QInAppTransaction::PurchaseRestored), 5},
    {sipName_Unknown, static_cast<int>(::QInAppTransaction::Unknown), 5},
};


static pyqt5ClassPluginDef plugin_QInAppTransaction = {
    &::QInAppTransaction::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtPurchasing_QInAppTransaction = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QInAppTransaction,
        SIP_NULLPTR,
        &plugin_QInAppTransaction,
    },
    {
        sipNameNr_QInAppTransaction,
        {0, 0, 1},
        8, methods_QInAppTransaction,
        7, enummembers_QInAppTransaction,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QInAppTransaction,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QInAppTransaction,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QInAppTransaction,
    cast_QInAppTransaction,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
