Marketplace Models

class q2_marketplace.models.marketplace.MarketplaceProduct(name, extension_list, product_id)[source]
class q2_marketplace.models.marketplace.SubscriptionEvent(event, event_type, user_id, subscription_id, sso_user_id, product_identifier, extension_url, extension_name=None, created=None, processed=None, fi_name=None)[source]

Data structure for subscription related events

Parameters:
  • event (dict) – The payload received from the marketplace

  • event_type (str) – Will be either SUBSCRIPTION_ORDER, SUBSCRIPTION_CANCEL, or SUBSCRIPTION_CHANGE

  • user_id (int) – The UserID within the Q2 database

  • fi_name (str) – The name of the Financial Institution

  • subscription_id (str) – A guid that identifies the subscription

  • sso_user_id (str) – A guid that represents this user on the marketplace

  • product_identifier (str) – A unique identifer that represents a marketplace product

  • extension_url (str) – The url that will be called for each subscription event

  • extension_name (str) – The name of the installed extension that will be called for each subscription event

  • created (datetime) – Iso Timestamp of product creation in the marketplace

  • processed (datetime) – Iso Timestamp of product processing in the marketplace

// Sample subscription event
{
    "event": {
        "type": "SUBSCRIPTION_CANCEL",
        "marketplace": {
            "partner": "Q2TOTALACCESS",
            "baseUrl": "https://testq2totalaccess.appdirect.com"
        },
        "creator": {
            "uuid": "4fc5fb4b-9809-49b5-abc5-7dab4544e685",
            "openId": "https://testq2totalaccess.appdirect.com/openid/id/4fc5fb4b-9809-49b5-abc5-7dab4544e685",
            "email": "jdoe@q2ebanking.com",
            "firstName": "John",
            "lastName": "Doe",
            "language": "en",
            "locale": "en-US",
            "address": {
                "salutation": null,
                "firstName": "John",
                "lastName": "Doe",
                "fullName": "John Doe",
                "companyName": null,
                "phone": null,
                "phoneExtension": null,
                "fax": null,
                "faxExtension": null,
                "street1": "123 Some St",
                "street2": null,
                "city": "COLORADO SPRINGS",
                "state": "CO",
                "zip": "80909-5448",
                "country": "US",
                "pobox": null,
                "pozip": null
            },
            "attributes": null
        },
        "payload": {
            "user": null,
            "company": null,
            "account": {
                "accountIdentifier": null,
                "status": "ACTIVE",
                "parentAccountIdentifier": null
            },
            "addonInstance": null,
            "addonBinding": null,
            "order": null,
            "notice": null,
            "configuration": {
                "userExternalIdentifier": "169ac613-e9ac-433c-893c-15fffddeef49",
                "applicationId": "ef02eb9b-0a4c-4be5-b78e-4088d7a8a55c",
                "subscriptionId": "950cfd23-d730-4505-b538-d14a70a7a1b0"
            }
        },
        "links": []
    },
    "event_type": "SUBSCRIPTION_CANCEL",
    "user_id": 12345,
    "fi_name": "My FI Name",
    "subscription_id": "a3c9c831-e550-428f-b89c-43c5e7b338b9",
    "sso_user_id": "b584a5f9-85a4-4653-90e6-8bbd41d71403",
    "product_identifier": "",
    "extension_url": "https://someurl/marketplace/my-product-name",
    "created": "2021-12-06T15:27:32.636332",
    "processed": "2021-12-06T15:27:32.636332"
}
event: dict
event_type: str
user_id: int
subscription_id: str
sso_user_id: str
product_identifier: str
extension_url: str
extension_name: str = None
created: datetime = None
processed: datetime = None
fi_name: str = None
static from_json(body)[source]
enum q2_marketplace.models.marketplace.ErrorCode(value)[source]

Enumeration of error codes that can be returned during a SUBSCRIPTION_ORDER, SUBSCRIPTION_CANCEL, or SUBSCRIPTION_UPDATE event

Valid values are as follows:

USER_ALREADY_EXISTS = <ErrorCode.USER_ALREADY_EXISTS: 'USER_ALREADY_EXISTS'>
USER_NOT_FOUND = <ErrorCode.USER_NOT_FOUND: 'USER_NOT_FOUND'>
ACCOUNT_NOT_FOUND = <ErrorCode.ACCOUNT_NOT_FOUND: 'ACCOUNT_NOT_FOUND'>
MAX_USERS_REACHED = <ErrorCode.MAX_USERS_REACHED: 'MAX_USERS_REACHED'>
UNAUTHORIZED = <ErrorCode.UNAUTHORIZED: 'UNAUTHORIZED'>
OPERATION_CANCELLED = <ErrorCode.OPERATION_CANCELLED: 'OPERATION_CANCELLED'>
CONFIGURATION_ERROR = <ErrorCode.CONFIGURATION_ERROR: 'CONFIGURATION_ERROR'>
INVALID_RESPONSE = <ErrorCode.INVALID_RESPONSE: 'INVALID_RESPONSE'>
PENDING = <ErrorCode.PENDING: 'PENDING'>
FORBIDDEN = <ErrorCode.FORBIDDEN: 'FORBIDDEN'>
BINDING_NOT_FOUND = <ErrorCode.BINDING_NOT_FOUND: 'BINDING_NOT_FOUND'>
TRANSPORT_ERROR = <ErrorCode.TRANSPORT_ERROR: 'TRANSPORT_ERROR'>
UNKNOWN_ERROR = <ErrorCode.UNKNOWN_ERROR: 'UNKNOWN_ERROR'>
DO_NOT_CANCEL = <ErrorCode.DO_NOT_CANCEL: 'DO_NOT_CANCEL'>
class q2_marketplace.models.marketplace.SubscriptionResult(success)[source]
to_json()[source]
class q2_marketplace.models.marketplace.SubscriptionSuccess(account_identifier='')[source]
class q2_marketplace.models.marketplace.SubscriptionFailure(message, error_code)[source]