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 marketplaceevent_type (
str) – Will be either SUBSCRIPTION_ORDER, SUBSCRIPTION_CANCEL, or SUBSCRIPTION_CHANGEuser_id (
int) – The UserID within the Q2 databasefi_name (
str) – The name of the Financial Institutionsubscription_id (
str) – A guid that identifies the subscriptionsso_user_id (
str) – A guid that represents this user on the marketplaceproduct_identifier (
str) – A unique identifer that represents a marketplace productextension_url (
str) – The url that will be called for each subscription eventextension_name (
str) – The name of the installed extension that will be called for each subscription eventcreated (
datetime) – Iso Timestamp of product creation in the marketplaceprocessed (
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
- class q2_marketplace.models.marketplace.ErrorCode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Enumeration of error codes that can be returned during a SUBSCRIPTION_ORDER, SUBSCRIPTION_CANCEL, or SUBSCRIPTION_UPDATE event
- USER_ALREADY_EXISTS = 'USER_ALREADY_EXISTS'
- USER_NOT_FOUND = 'USER_NOT_FOUND'
- ACCOUNT_NOT_FOUND = 'ACCOUNT_NOT_FOUND'
- MAX_USERS_REACHED = 'MAX_USERS_REACHED'
- UNAUTHORIZED = 'UNAUTHORIZED'
- OPERATION_CANCELLED = 'OPERATION_CANCELLED'
- CONFIGURATION_ERROR = 'CONFIGURATION_ERROR'
- INVALID_RESPONSE = 'INVALID_RESPONSE'
- PENDING = 'PENDING'
- FORBIDDEN = 'FORBIDDEN'
- BINDING_NOT_FOUND = 'BINDING_NOT_FOUND'
- TRANSPORT_ERROR = 'TRANSPORT_ERROR'
- UNKNOWN_ERROR = 'UNKNOWN_ERROR'
- DO_NOT_CANCEL = 'DO_NOT_CANCEL'