schemas
Monzo API 'webhooks' related schemas.
MonzoWebhook
Bases: BaseModel
API schema for a 'webhook' object.
Note
Monzo API docs: https://docs.monzo.com/#webhooks
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
The ID of the webhook. |
account_id |
str
|
The account to receive notifications for. |
url |
str
|
The URL we will send notifications to. |
Source code in pymonzo/webhooks/schemas.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
MonzoWebhookEvent
Bases: BaseModel
API schema for a 'webhook event' object.
Note
Monzo API docs: https://docs.monzo.com/#transaction-created
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Webhook event type. |
data |
MonzoWebhookTransactionEvent
|
Webhook event data. |
Source code in pymonzo/webhooks/schemas.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
MonzoWebhookTransactionEvent
Bases: BaseModel
API schema for a 'webhook event' object.
For some reason it seems slight different from
pymonzo.transactions.MonzoTransaction.
Note
Monzo API docs: https://docs.monzo.com/#transaction-created
Attributes:
| Name | Type | Description |
|---|---|---|
account_id |
str
|
The ID of the account. |
amount |
int
|
The amount of the transaction in minor units of currency. For example pennies in the case of GBP. A negative amount indicates a debit (most card transactions will have a negative amount) |
created |
str
|
Transaction creation date. |
currency |
str
|
Transaction currency |
description |
str
|
Transaction description. |
id |
str
|
The ID of the transaction. |
category |
str
|
The category can be set for each transaction by the user. |
is_load |
bool
|
Top-ups to an account are represented as transactions with a positive
amount and |
settled |
str
|
The timestamp at which the transaction settled. In most cases, this happens 24-48 hours after created. If this field is an empty string, the transaction is authorised but not yet "complete." |
merchant |
MonzoTransactionMerchant
|
Merchant information. |
Source code in pymonzo/webhooks/schemas.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |