mollie-api-py 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. mollie/__init__.py +18 -0
  2. mollie/_hooks/__init__.py +5 -0
  3. mollie/_hooks/mollie_hooks.py +165 -0
  4. mollie/_hooks/registration.py +18 -0
  5. mollie/_hooks/sdkhooks.py +76 -0
  6. mollie/_hooks/types.py +113 -0
  7. mollie/_version.py +15 -0
  8. mollie/balance_transfers.py +651 -0
  9. mollie/balances.py +1105 -0
  10. mollie/basesdk.py +360 -0
  11. mollie/capabilities.py +209 -0
  12. mollie/captures.py +677 -0
  13. mollie/chargebacks_sdk.py +675 -0
  14. mollie/client_links.py +325 -0
  15. mollie/clients.py +409 -0
  16. mollie/customers.py +1563 -0
  17. mollie/delayed_routing.py +421 -0
  18. mollie/httpclient.py +125 -0
  19. mollie/invoices.py +429 -0
  20. mollie/mandates.py +895 -0
  21. mollie/methods.py +789 -0
  22. mollie/models/__init__.py +4002 -0
  23. mollie/models/address.py +29 -0
  24. mollie/models/amount.py +25 -0
  25. mollie/models/amount_nullable.py +24 -0
  26. mollie/models/apierror.py +40 -0
  27. mollie/models/balance_card_audience.py +10 -0
  28. mollie/models/balance_card_issuer.py +12 -0
  29. mollie/models/balance_card_region.py +12 -0
  30. mollie/models/balance_fee_type.py +43 -0
  31. mollie/models/balance_prepayment_part_type.py +13 -0
  32. mollie/models/balance_report_grouping.py +10 -0
  33. mollie/models/balance_transaction_type.py +47 -0
  34. mollie/models/balance_transfer_category.py +17 -0
  35. mollie/models/balance_transfer_category_response.py +18 -0
  36. mollie/models/balance_transfer_destination_type.py +14 -0
  37. mollie/models/balance_transfer_party_type.py +10 -0
  38. mollie/models/balance_transfer_party_type_response.py +11 -0
  39. mollie/models/balance_transfer_status.py +13 -0
  40. mollie/models/balance_transfer_status_reason_response.py +19 -0
  41. mollie/models/billingaddress.py +154 -0
  42. mollie/models/cancel_paymentop.py +93 -0
  43. mollie/models/cancel_refundop.py +86 -0
  44. mollie/models/cancel_subscriptionop.py +100 -0
  45. mollie/models/capability_requirement_status.py +15 -0
  46. mollie/models/capability_status.py +12 -0
  47. mollie/models/capability_status_reason.py +10 -0
  48. mollie/models/capture_mode.py +15 -0
  49. mollie/models/capture_mode_response.py +16 -0
  50. mollie/models/capture_response.py +265 -0
  51. mollie/models/client_link_request.py +210 -0
  52. mollie/models/client_link_response.py +56 -0
  53. mollie/models/clienterror.py +30 -0
  54. mollie/models/components_sub_totals.py +127 -0
  55. mollie/models/create_captureop.py +43 -0
  56. mollie/models/create_client_linkop.py +29 -0
  57. mollie/models/create_connect_balance_transferop.py +32 -0
  58. mollie/models/create_customer_paymentop.py +43 -0
  59. mollie/models/create_customerop.py +29 -0
  60. mollie/models/create_mandateop.py +43 -0
  61. mollie/models/create_payment_linkop.py +325 -0
  62. mollie/models/create_paymentop.py +73 -0
  63. mollie/models/create_profileop.py +29 -0
  64. mollie/models/create_refundop.py +43 -0
  65. mollie/models/create_sales_invoiceop.py +29 -0
  66. mollie/models/create_subscriptionop.py +43 -0
  67. mollie/models/create_webhook.py +123 -0
  68. mollie/models/create_webhookop.py +69 -0
  69. mollie/models/currencies.py +20 -0
  70. mollie/models/customer_response.py +169 -0
  71. mollie/models/delete_customerop.py +91 -0
  72. mollie/models/delete_payment_linkop.py +91 -0
  73. mollie/models/delete_profileop.py +29 -0
  74. mollie/models/delete_sales_invoiceop.py +44 -0
  75. mollie/models/delete_values_sales_invoice.py +54 -0
  76. mollie/models/delete_webhookop.py +56 -0
  77. mollie/models/entity_balance.py +325 -0
  78. mollie/models/entity_balance_report.py +541 -0
  79. mollie/models/entity_balance_transaction.py +1068 -0
  80. mollie/models/entity_balance_transfer.py +62 -0
  81. mollie/models/entity_balance_transfer_party.py +28 -0
  82. mollie/models/entity_balance_transfer_party_response.py +32 -0
  83. mollie/models/entity_balance_transfer_response.py +159 -0
  84. mollie/models/entity_capability.py +75 -0
  85. mollie/models/entity_capability_requirement.py +87 -0
  86. mollie/models/entity_capture.py +63 -0
  87. mollie/models/entity_chargeback.py +247 -0
  88. mollie/models/entity_customer.py +86 -0
  89. mollie/models/entity_event.py +46 -0
  90. mollie/models/entity_invoice.py +247 -0
  91. mollie/models/entity_method_get.py +329 -0
  92. mollie/models/entity_onboarding_status.py +95 -0
  93. mollie/models/entity_organization.py +178 -0
  94. mollie/models/entity_payment_route.py +111 -0
  95. mollie/models/entity_payment_route_response.py +140 -0
  96. mollie/models/entity_permission.py +61 -0
  97. mollie/models/entity_refund_response.py +361 -0
  98. mollie/models/entity_route.py +96 -0
  99. mollie/models/entity_settlement.py +467 -0
  100. mollie/models/entity_terminal.py +160 -0
  101. mollie/models/entity_webhook.py +122 -0
  102. mollie/models/entity_webhook_event.py +149 -0
  103. mollie/models/error_response.py +70 -0
  104. mollie/models/get_balance_reportop.py +126 -0
  105. mollie/models/get_balanceop.py +71 -0
  106. mollie/models/get_captureop.py +129 -0
  107. mollie/models/get_chargebackop.py +129 -0
  108. mollie/models/get_clientop.py +216 -0
  109. mollie/models/get_connect_balance_transferop.py +71 -0
  110. mollie/models/get_current_organizationop.py +22 -0
  111. mollie/models/get_current_profileop.py +22 -0
  112. mollie/models/get_customerop.py +286 -0
  113. mollie/models/get_invoiceop.py +29 -0
  114. mollie/models/get_mandateop.py +86 -0
  115. mollie/models/get_methodop.py +199 -0
  116. mollie/models/get_next_settlementop.py +22 -0
  117. mollie/models/get_onboarding_statusop.py +22 -0
  118. mollie/models/get_open_settlementop.py +22 -0
  119. mollie/models/get_organizationop.py +71 -0
  120. mollie/models/get_partner_statusop.py +231 -0
  121. mollie/models/get_payment_link_paymentsop.py +188 -0
  122. mollie/models/get_payment_linkop.py +77 -0
  123. mollie/models/get_paymentop.py +128 -0
  124. mollie/models/get_permissionop.py +73 -0
  125. mollie/models/get_primary_balanceop.py +22 -0
  126. mollie/models/get_profileop.py +71 -0
  127. mollie/models/get_refundop.py +129 -0
  128. mollie/models/get_sales_invoiceop.py +75 -0
  129. mollie/models/get_settlementop.py +29 -0
  130. mollie/models/get_subscriptionop.py +86 -0
  131. mollie/models/get_terminalop.py +77 -0
  132. mollie/models/get_webhook_eventop.py +71 -0
  133. mollie/models/get_webhookop.py +71 -0
  134. mollie/models/internal/__init__.py +54 -0
  135. mollie/models/internal/globals.py +59 -0
  136. mollie/models/line_categories.py +13 -0
  137. mollie/models/line_categories_response.py +14 -0
  138. mollie/models/list_all_chargebacksop.py +236 -0
  139. mollie/models/list_all_methodsop.py +249 -0
  140. mollie/models/list_all_refundsop.py +230 -0
  141. mollie/models/list_all_subscriptionsop.py +202 -0
  142. mollie/models/list_balance_transactionsop.py +174 -0
  143. mollie/models/list_balancesop.py +171 -0
  144. mollie/models/list_capabilitiesop.py +62 -0
  145. mollie/models/list_capture_response.py +264 -0
  146. mollie/models/list_capturesop.py +185 -0
  147. mollie/models/list_chargebacksop.py +185 -0
  148. mollie/models/list_clientsop.py +269 -0
  149. mollie/models/list_connect_balance_transfersop.py +177 -0
  150. mollie/models/list_customer_paymentsop.py +231 -0
  151. mollie/models/list_customer_response.py +164 -0
  152. mollie/models/list_customersop.py +172 -0
  153. mollie/models/list_entity_balance.py +322 -0
  154. mollie/models/list_entity_chargeback.py +244 -0
  155. mollie/models/list_entity_invoice.py +244 -0
  156. mollie/models/list_entity_method.py +315 -0
  157. mollie/models/list_entity_method_all.py +391 -0
  158. mollie/models/list_entity_permission.py +56 -0
  159. mollie/models/list_entity_refund.py +352 -0
  160. mollie/models/list_entity_settlement.py +457 -0
  161. mollie/models/list_entity_terminal.py +157 -0
  162. mollie/models/list_entity_webhook.py +117 -0
  163. mollie/models/list_invoicesop.py +175 -0
  164. mollie/models/list_links.py +68 -0
  165. mollie/models/list_mandate_response.py +261 -0
  166. mollie/models/list_mandatesop.py +186 -0
  167. mollie/models/list_methodsop.py +332 -0
  168. mollie/models/list_payment_linksop.py +159 -0
  169. mollie/models/list_payment_response.py +1953 -0
  170. mollie/models/list_paymentsop.py +217 -0
  171. mollie/models/list_permissionsop.py +85 -0
  172. mollie/models/list_profile_response.py +194 -0
  173. mollie/models/list_profilesop.py +118 -0
  174. mollie/models/list_refundsop.py +189 -0
  175. mollie/models/list_route_get_response.py +97 -0
  176. mollie/models/list_sales_invoice_response.py +505 -0
  177. mollie/models/list_sales_invoicesop.py +172 -0
  178. mollie/models/list_settlement_capturesop.py +187 -0
  179. mollie/models/list_settlement_chargebacksop.py +187 -0
  180. mollie/models/list_settlement_paymentsop.py +233 -0
  181. mollie/models/list_settlement_refundsop.py +191 -0
  182. mollie/models/list_settlementsop.py +178 -0
  183. mollie/models/list_subscription_paymentsop.py +242 -0
  184. mollie/models/list_subscription_response.py +344 -0
  185. mollie/models/list_subscriptionsop.py +189 -0
  186. mollie/models/list_terminalsop.py +172 -0
  187. mollie/models/list_webhooksop.py +189 -0
  188. mollie/models/locale.py +32 -0
  189. mollie/models/locale_response.py +33 -0
  190. mollie/models/mandate_details_card_label_response.py +22 -0
  191. mollie/models/mandate_method.py +15 -0
  192. mollie/models/mandate_method_response.py +16 -0
  193. mollie/models/mandate_request.py +160 -0
  194. mollie/models/mandate_response.py +264 -0
  195. mollie/models/metadata.py +19 -0
  196. mollie/models/method.py +50 -0
  197. mollie/models/method_include_wallets_parameter.py +8 -0
  198. mollie/models/method_resource_parameter.py +9 -0
  199. mollie/models/method_response.py +59 -0
  200. mollie/models/method_status.py +15 -0
  201. mollie/models/mode.py +12 -0
  202. mollie/models/no_response_error.py +17 -0
  203. mollie/models/onboarding_vat_regulation.py +16 -0
  204. mollie/models/organization_vat_regulation.py +17 -0
  205. mollie/models/payment_address.py +130 -0
  206. mollie/models/payment_create_routeop.py +43 -0
  207. mollie/models/payment_details_card_audition_response.py +12 -0
  208. mollie/models/payment_details_card_funding_response.py +14 -0
  209. mollie/models/payment_details_card_label_response.py +23 -0
  210. mollie/models/payment_details_card_security_response.py +12 -0
  211. mollie/models/payment_details_failure_reason_response.py +25 -0
  212. mollie/models/payment_details_fee_region_response.py +20 -0
  213. mollie/models/payment_details_receipt_card_read_method_response.py +17 -0
  214. mollie/models/payment_details_receipt_card_verification_method_response.py +21 -0
  215. mollie/models/payment_details_seller_protection_response.py +20 -0
  216. mollie/models/payment_details_wallet_response.py +11 -0
  217. mollie/models/payment_line_item.py +96 -0
  218. mollie/models/payment_line_item_response.py +104 -0
  219. mollie/models/payment_line_type.py +20 -0
  220. mollie/models/payment_line_type_response.py +21 -0
  221. mollie/models/payment_link_method.py +36 -0
  222. mollie/models/payment_link_method_response.py +37 -0
  223. mollie/models/payment_link_response.py +348 -0
  224. mollie/models/payment_link_sequence_type.py +9 -0
  225. mollie/models/payment_link_sequence_type_response.py +10 -0
  226. mollie/models/payment_list_routesop.py +140 -0
  227. mollie/models/payment_method.py +53 -0
  228. mollie/models/payment_request.py +919 -0
  229. mollie/models/payment_response.py +1953 -0
  230. mollie/models/profile_request.py +67 -0
  231. mollie/models/profile_response.py +197 -0
  232. mollie/models/profile_review_status_response.py +12 -0
  233. mollie/models/recurring_line_item.py +77 -0
  234. mollie/models/refund_external_reference_type.py +10 -0
  235. mollie/models/refund_external_reference_type_response.py +11 -0
  236. mollie/models/refund_request.py +200 -0
  237. mollie/models/release_authorizationop.py +108 -0
  238. mollie/models/request_apple_pay_payment_sessionop.py +76 -0
  239. mollie/models/responsevalidationerror.py +27 -0
  240. mollie/models/revoke_mandateop.py +100 -0
  241. mollie/models/route_create_response.py +97 -0
  242. mollie/models/route_destination_type.py +10 -0
  243. mollie/models/route_destination_type_response.py +11 -0
  244. mollie/models/sales_invoice_discount.py +21 -0
  245. mollie/models/sales_invoice_discount_response.py +25 -0
  246. mollie/models/sales_invoice_discount_type.py +11 -0
  247. mollie/models/sales_invoice_discount_type_response.py +12 -0
  248. mollie/models/sales_invoice_email_details.py +20 -0
  249. mollie/models/sales_invoice_line_item.py +67 -0
  250. mollie/models/sales_invoice_line_item_response.py +70 -0
  251. mollie/models/sales_invoice_payment_details.py +59 -0
  252. mollie/models/sales_invoice_payment_details_response.py +66 -0
  253. mollie/models/sales_invoice_payment_details_source.py +12 -0
  254. mollie/models/sales_invoice_payment_details_source_response.py +13 -0
  255. mollie/models/sales_invoice_payment_term.py +16 -0
  256. mollie/models/sales_invoice_payment_term_response.py +17 -0
  257. mollie/models/sales_invoice_recipient.py +176 -0
  258. mollie/models/sales_invoice_recipient_locale.py +18 -0
  259. mollie/models/sales_invoice_recipient_locale_response.py +19 -0
  260. mollie/models/sales_invoice_recipient_response.py +182 -0
  261. mollie/models/sales_invoice_recipient_type.py +13 -0
  262. mollie/models/sales_invoice_recipient_type_response.py +14 -0
  263. mollie/models/sales_invoice_request.py +256 -0
  264. mollie/models/sales_invoice_response.py +509 -0
  265. mollie/models/sales_invoice_status.py +25 -0
  266. mollie/models/sales_invoice_status_response.py +26 -0
  267. mollie/models/sales_invoice_vat_mode.py +13 -0
  268. mollie/models/sales_invoice_vat_mode_response.py +14 -0
  269. mollie/models/sales_invoice_vat_scheme.py +11 -0
  270. mollie/models/sales_invoice_vat_scheme_response.py +12 -0
  271. mollie/models/security.py +35 -0
  272. mollie/models/sequence_type.py +10 -0
  273. mollie/models/sequence_type_response.py +11 -0
  274. mollie/models/sorting.py +9 -0
  275. mollie/models/status_reason.py +168 -0
  276. mollie/models/sub_group.py +52 -0
  277. mollie/models/sub_totals.py +120 -0
  278. mollie/models/submit_onboarding_dataop.py +214 -0
  279. mollie/models/subscription_method.py +12 -0
  280. mollie/models/subscription_method_response.py +13 -0
  281. mollie/models/subscription_request.py +213 -0
  282. mollie/models/subscription_response.py +349 -0
  283. mollie/models/terminal_brand.py +12 -0
  284. mollie/models/terminal_model.py +16 -0
  285. mollie/models/test_webhookop.py +64 -0
  286. mollie/models/update_customerop.py +43 -0
  287. mollie/models/update_payment_linkop.py +172 -0
  288. mollie/models/update_paymentop.py +332 -0
  289. mollie/models/update_profileop.py +147 -0
  290. mollie/models/update_sales_invoiceop.py +44 -0
  291. mollie/models/update_subscriptionop.py +188 -0
  292. mollie/models/update_values_sales_invoice.py +176 -0
  293. mollie/models/update_webhookop.py +83 -0
  294. mollie/models/url.py +24 -0
  295. mollie/models/url_nullable.py +25 -0
  296. mollie/models/webhook_event_types.py +18 -0
  297. mollie/models/webhook_status.py +14 -0
  298. mollie/onboarding.py +403 -0
  299. mollie/organizations.py +579 -0
  300. mollie/payment_links.py +1323 -0
  301. mollie/payments_sdk.py +1385 -0
  302. mollie/permissions.py +397 -0
  303. mollie/profiles.py +1209 -0
  304. mollie/py.typed +1 -0
  305. mollie/refunds_sdk.py +1111 -0
  306. mollie/sales_invoices.py +1121 -0
  307. mollie/sdk.py +265 -0
  308. mollie/sdkconfiguration.py +50 -0
  309. mollie/settlements.py +1735 -0
  310. mollie/subscriptions.py +1617 -0
  311. mollie/terminals.py +427 -0
  312. mollie/types/__init__.py +21 -0
  313. mollie/types/basemodel.py +39 -0
  314. mollie/utils/__init__.py +200 -0
  315. mollie/utils/annotations.py +79 -0
  316. mollie/utils/datetimes.py +23 -0
  317. mollie/utils/enums.py +74 -0
  318. mollie/utils/eventstreaming.py +248 -0
  319. mollie/utils/forms.py +223 -0
  320. mollie/utils/headers.py +136 -0
  321. mollie/utils/logger.py +27 -0
  322. mollie/utils/metadata.py +118 -0
  323. mollie/utils/queryparams.py +205 -0
  324. mollie/utils/requestbodies.py +66 -0
  325. mollie/utils/retries.py +217 -0
  326. mollie/utils/security.py +195 -0
  327. mollie/utils/serializers.py +249 -0
  328. mollie/utils/unmarshal_json_response.py +24 -0
  329. mollie/utils/url.py +155 -0
  330. mollie/utils/values.py +137 -0
  331. mollie/wallets.py +263 -0
  332. mollie/webhook_events.py +211 -0
  333. mollie/webhooks.py +1305 -0
  334. mollie_api_py-1.0.0.dist-info/METADATA +834 -0
  335. mollie_api_py-1.0.0.dist-info/RECORD +337 -0
  336. mollie_api_py-1.0.0.dist-info/WHEEL +4 -0
  337. mollie_api_py-1.0.0.dist-info/licenses/LICENSE.md +24 -0
@@ -0,0 +1,1068 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .amount import Amount, AmountTypedDict
5
+ from .amount_nullable import AmountNullable, AmountNullableTypedDict
6
+ from .balance_transaction_type import BalanceTransactionType
7
+ from mollie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
8
+ from mollie.utils import validate_open_enum
9
+ import pydantic
10
+ from pydantic import model_serializer
11
+ from pydantic.functional_validators import PlainValidator
12
+ from typing import Optional
13
+ from typing_extensions import Annotated, NotRequired, TypedDict
14
+
15
+
16
+ class PaymentTypedDict(TypedDict):
17
+ payment_id: NotRequired[str]
18
+ payment_description: NotRequired[str]
19
+
20
+
21
+ class Payment(BaseModel):
22
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
23
+
24
+ payment_description: Annotated[
25
+ Optional[str], pydantic.Field(alias="paymentDescription")
26
+ ] = None
27
+
28
+
29
+ class CaptureTypedDict(TypedDict):
30
+ payment_id: NotRequired[str]
31
+ payment_description: NotRequired[str]
32
+ capture_id: NotRequired[str]
33
+ capture_description: NotRequired[str]
34
+
35
+
36
+ class Capture(BaseModel):
37
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
38
+
39
+ payment_description: Annotated[
40
+ Optional[str], pydantic.Field(alias="paymentDescription")
41
+ ] = None
42
+
43
+ capture_id: Annotated[Optional[str], pydantic.Field(alias="captureId")] = None
44
+
45
+ capture_description: Annotated[
46
+ Optional[str], pydantic.Field(alias="captureDescription")
47
+ ] = None
48
+
49
+
50
+ class CaptureCommisionTypedDict(TypedDict):
51
+ payment_id: NotRequired[str]
52
+ payment_description: NotRequired[str]
53
+ capture_id: NotRequired[str]
54
+ capture_description: NotRequired[str]
55
+
56
+
57
+ class CaptureCommision(BaseModel):
58
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
59
+
60
+ payment_description: Annotated[
61
+ Optional[str], pydantic.Field(alias="paymentDescription")
62
+ ] = None
63
+
64
+ capture_id: Annotated[Optional[str], pydantic.Field(alias="captureId")] = None
65
+
66
+ capture_description: Annotated[
67
+ Optional[str], pydantic.Field(alias="captureDescription")
68
+ ] = None
69
+
70
+
71
+ class CaptureRollingReserveReleaseTypedDict(TypedDict):
72
+ payment_id: NotRequired[str]
73
+ payment_description: NotRequired[str]
74
+ capture_id: NotRequired[str]
75
+ capture_description: NotRequired[str]
76
+
77
+
78
+ class CaptureRollingReserveRelease(BaseModel):
79
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
80
+
81
+ payment_description: Annotated[
82
+ Optional[str], pydantic.Field(alias="paymentDescription")
83
+ ] = None
84
+
85
+ capture_id: Annotated[Optional[str], pydantic.Field(alias="captureId")] = None
86
+
87
+ capture_description: Annotated[
88
+ Optional[str], pydantic.Field(alias="captureDescription")
89
+ ] = None
90
+
91
+
92
+ class UnauthorizedDirectDebitTypedDict(TypedDict):
93
+ payment_id: NotRequired[str]
94
+ payment_description: NotRequired[str]
95
+
96
+
97
+ class UnauthorizedDirectDebit(BaseModel):
98
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
99
+
100
+ payment_description: Annotated[
101
+ Optional[str], pydantic.Field(alias="paymentDescription")
102
+ ] = None
103
+
104
+
105
+ class FailedPaymentTypedDict(TypedDict):
106
+ payment_id: NotRequired[str]
107
+ payment_description: NotRequired[str]
108
+
109
+
110
+ class FailedPayment(BaseModel):
111
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
112
+
113
+ payment_description: Annotated[
114
+ Optional[str], pydantic.Field(alias="paymentDescription")
115
+ ] = None
116
+
117
+
118
+ class RefundTypedDict(TypedDict):
119
+ payment_id: NotRequired[str]
120
+ payment_description: NotRequired[str]
121
+ refund_id: NotRequired[str]
122
+ refund_description: NotRequired[str]
123
+
124
+
125
+ class Refund(BaseModel):
126
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
127
+
128
+ payment_description: Annotated[
129
+ Optional[str], pydantic.Field(alias="paymentDescription")
130
+ ] = None
131
+
132
+ refund_id: Annotated[Optional[str], pydantic.Field(alias="refundId")] = None
133
+
134
+ refund_description: Annotated[
135
+ Optional[str], pydantic.Field(alias="refundDescription")
136
+ ] = None
137
+
138
+
139
+ class RefundCompensationTypedDict(TypedDict):
140
+ payment_id: NotRequired[str]
141
+ payment_description: NotRequired[str]
142
+ refund_id: NotRequired[str]
143
+ refund_description: NotRequired[str]
144
+
145
+
146
+ class RefundCompensation(BaseModel):
147
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
148
+
149
+ payment_description: Annotated[
150
+ Optional[str], pydantic.Field(alias="paymentDescription")
151
+ ] = None
152
+
153
+ refund_id: Annotated[Optional[str], pydantic.Field(alias="refundId")] = None
154
+
155
+ refund_description: Annotated[
156
+ Optional[str], pydantic.Field(alias="refundDescription")
157
+ ] = None
158
+
159
+
160
+ class ReturnedRefundTypedDict(TypedDict):
161
+ payment_id: NotRequired[str]
162
+ payment_description: NotRequired[str]
163
+ refund_id: NotRequired[str]
164
+ refund_description: NotRequired[str]
165
+
166
+
167
+ class ReturnedRefund(BaseModel):
168
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
169
+
170
+ payment_description: Annotated[
171
+ Optional[str], pydantic.Field(alias="paymentDescription")
172
+ ] = None
173
+
174
+ refund_id: Annotated[Optional[str], pydantic.Field(alias="refundId")] = None
175
+
176
+ refund_description: Annotated[
177
+ Optional[str], pydantic.Field(alias="refundDescription")
178
+ ] = None
179
+
180
+
181
+ class ReturnedRefundCompensationTypedDict(TypedDict):
182
+ payment_id: NotRequired[str]
183
+ payment_description: NotRequired[str]
184
+ refund_id: NotRequired[str]
185
+ refund_description: NotRequired[str]
186
+
187
+
188
+ class ReturnedRefundCompensation(BaseModel):
189
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
190
+
191
+ payment_description: Annotated[
192
+ Optional[str], pydantic.Field(alias="paymentDescription")
193
+ ] = None
194
+
195
+ refund_id: Annotated[Optional[str], pydantic.Field(alias="refundId")] = None
196
+
197
+ refund_description: Annotated[
198
+ Optional[str], pydantic.Field(alias="refundDescription")
199
+ ] = None
200
+
201
+
202
+ class ChargebackTypedDict(TypedDict):
203
+ payment_id: NotRequired[str]
204
+ payment_description: NotRequired[str]
205
+ chargeback_id: NotRequired[str]
206
+ chargeback_description: NotRequired[str]
207
+
208
+
209
+ class Chargeback(BaseModel):
210
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
211
+
212
+ payment_description: Annotated[
213
+ Optional[str], pydantic.Field(alias="paymentDescription")
214
+ ] = None
215
+
216
+ chargeback_id: Annotated[Optional[str], pydantic.Field(alias="chargebackId")] = None
217
+
218
+ chargeback_description: Annotated[
219
+ Optional[str], pydantic.Field(alias="chargebackDescription")
220
+ ] = None
221
+
222
+
223
+ class ChargebackReversalTypedDict(TypedDict):
224
+ payment_id: NotRequired[str]
225
+ payment_description: NotRequired[str]
226
+ chargeback_id: NotRequired[str]
227
+ chargeback_description: NotRequired[str]
228
+
229
+
230
+ class ChargebackReversal(BaseModel):
231
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
232
+
233
+ payment_description: Annotated[
234
+ Optional[str], pydantic.Field(alias="paymentDescription")
235
+ ] = None
236
+
237
+ chargeback_id: Annotated[Optional[str], pydantic.Field(alias="chargebackId")] = None
238
+
239
+ chargeback_description: Annotated[
240
+ Optional[str], pydantic.Field(alias="chargebackDescription")
241
+ ] = None
242
+
243
+
244
+ class ChargebackCompensationTypedDict(TypedDict):
245
+ payment_id: NotRequired[str]
246
+ payment_description: NotRequired[str]
247
+ chargeback_id: NotRequired[str]
248
+ chargeback_description: NotRequired[str]
249
+
250
+
251
+ class ChargebackCompensation(BaseModel):
252
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
253
+
254
+ payment_description: Annotated[
255
+ Optional[str], pydantic.Field(alias="paymentDescription")
256
+ ] = None
257
+
258
+ chargeback_id: Annotated[Optional[str], pydantic.Field(alias="chargebackId")] = None
259
+
260
+ chargeback_description: Annotated[
261
+ Optional[str], pydantic.Field(alias="chargebackDescription")
262
+ ] = None
263
+
264
+
265
+ class ReversedChargebackCompensationTypedDict(TypedDict):
266
+ payment_id: NotRequired[str]
267
+ payment_description: NotRequired[str]
268
+ chargeback_id: NotRequired[str]
269
+ chargeback_description: NotRequired[str]
270
+
271
+
272
+ class ReversedChargebackCompensation(BaseModel):
273
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
274
+
275
+ payment_description: Annotated[
276
+ Optional[str], pydantic.Field(alias="paymentDescription")
277
+ ] = None
278
+
279
+ chargeback_id: Annotated[Optional[str], pydantic.Field(alias="chargebackId")] = None
280
+
281
+ chargeback_description: Annotated[
282
+ Optional[str], pydantic.Field(alias="chargebackDescription")
283
+ ] = None
284
+
285
+
286
+ class OutgoingTransferTypedDict(TypedDict):
287
+ transfer_id: NotRequired[str]
288
+ settlement_id: NotRequired[str]
289
+
290
+
291
+ class OutgoingTransfer(BaseModel):
292
+ transfer_id: Annotated[Optional[str], pydantic.Field(alias="transferId")] = None
293
+
294
+ settlement_id: Annotated[Optional[str], pydantic.Field(alias="settlementId")] = None
295
+
296
+
297
+ class CanceledOutgoingTransferTypedDict(TypedDict):
298
+ transfer_id: NotRequired[str]
299
+ settlement_id: NotRequired[str]
300
+
301
+
302
+ class CanceledOutgoingTransfer(BaseModel):
303
+ transfer_id: Annotated[Optional[str], pydantic.Field(alias="transferId")] = None
304
+
305
+ settlement_id: Annotated[Optional[str], pydantic.Field(alias="settlementId")] = None
306
+
307
+
308
+ class ReturnedTransferTypedDict(TypedDict):
309
+ transfer_id: NotRequired[str]
310
+ settlement_id: NotRequired[str]
311
+
312
+
313
+ class ReturnedTransfer(BaseModel):
314
+ transfer_id: Annotated[Optional[str], pydantic.Field(alias="transferId")] = None
315
+
316
+ settlement_id: Annotated[Optional[str], pydantic.Field(alias="settlementId")] = None
317
+
318
+
319
+ class InvoiceCompensationTypedDict(TypedDict):
320
+ invoice_id: NotRequired[str]
321
+
322
+
323
+ class InvoiceCompensation(BaseModel):
324
+ invoice_id: Annotated[Optional[str], pydantic.Field(alias="invoiceId")] = None
325
+
326
+
327
+ class EntityBalanceTransactionApplicationFeeTypedDict(TypedDict):
328
+ payment_id: NotRequired[str]
329
+ payment_description: NotRequired[str]
330
+ paying_owner: NotRequired[str]
331
+
332
+
333
+ class EntityBalanceTransactionApplicationFee(BaseModel):
334
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
335
+
336
+ payment_description: Annotated[
337
+ Optional[str], pydantic.Field(alias="paymentDescription")
338
+ ] = None
339
+
340
+ paying_owner: Annotated[Optional[str], pydantic.Field(alias="payingOwner")] = None
341
+
342
+
343
+ class SplitPaymentTypedDict(TypedDict):
344
+ payment_id: NotRequired[str]
345
+ payment_description: NotRequired[str]
346
+ payment_onwer: NotRequired[str]
347
+
348
+
349
+ class SplitPayment(BaseModel):
350
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
351
+
352
+ payment_description: Annotated[
353
+ Optional[str], pydantic.Field(alias="paymentDescription")
354
+ ] = None
355
+
356
+ payment_onwer: Annotated[Optional[str], pydantic.Field(alias="paymentOnwer")] = None
357
+
358
+
359
+ class PlatformPaymentRefundTypedDict(TypedDict):
360
+ payment_id: NotRequired[str]
361
+ payment_description: NotRequired[str]
362
+ refund_id: NotRequired[str]
363
+ refund_description: NotRequired[str]
364
+
365
+
366
+ class PlatformPaymentRefund(BaseModel):
367
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
368
+
369
+ payment_description: Annotated[
370
+ Optional[str], pydantic.Field(alias="paymentDescription")
371
+ ] = None
372
+
373
+ refund_id: Annotated[Optional[str], pydantic.Field(alias="refundId")] = None
374
+
375
+ refund_description: Annotated[
376
+ Optional[str], pydantic.Field(alias="refundDescription")
377
+ ] = None
378
+
379
+
380
+ class ReturnedPlatformPaymentRefundTypedDict(TypedDict):
381
+ payment_id: NotRequired[str]
382
+ payment_description: NotRequired[str]
383
+ refund_id: NotRequired[str]
384
+ refund_description: NotRequired[str]
385
+
386
+
387
+ class ReturnedPlatformPaymentRefund(BaseModel):
388
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
389
+
390
+ payment_description: Annotated[
391
+ Optional[str], pydantic.Field(alias="paymentDescription")
392
+ ] = None
393
+
394
+ refund_id: Annotated[Optional[str], pydantic.Field(alias="refundId")] = None
395
+
396
+ refund_description: Annotated[
397
+ Optional[str], pydantic.Field(alias="refundDescription")
398
+ ] = None
399
+
400
+
401
+ class PlatformPaymentChargebackTypedDict(TypedDict):
402
+ payment_id: NotRequired[str]
403
+ payment_description: NotRequired[str]
404
+ chargeback_id: NotRequired[str]
405
+ chargeback_description: NotRequired[str]
406
+
407
+
408
+ class PlatformPaymentChargeback(BaseModel):
409
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
410
+
411
+ payment_description: Annotated[
412
+ Optional[str], pydantic.Field(alias="paymentDescription")
413
+ ] = None
414
+
415
+ chargeback_id: Annotated[Optional[str], pydantic.Field(alias="chargebackId")] = None
416
+
417
+ chargeback_description: Annotated[
418
+ Optional[str], pydantic.Field(alias="chargebackDescription")
419
+ ] = None
420
+
421
+
422
+ class ReversedPlatformPaymentChargebackTypedDict(TypedDict):
423
+ payment_id: NotRequired[str]
424
+ payment_description: NotRequired[str]
425
+ chargeback_id: NotRequired[str]
426
+ chargeback_description: NotRequired[str]
427
+
428
+
429
+ class ReversedPlatformPaymentChargeback(BaseModel):
430
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
431
+
432
+ payment_description: Annotated[
433
+ Optional[str], pydantic.Field(alias="paymentDescription")
434
+ ] = None
435
+
436
+ chargeback_id: Annotated[Optional[str], pydantic.Field(alias="chargebackId")] = None
437
+
438
+ chargeback_description: Annotated[
439
+ Optional[str], pydantic.Field(alias="chargebackDescription")
440
+ ] = None
441
+
442
+
443
+ class PaymentCommissionTypedDict(TypedDict):
444
+ payment_id: NotRequired[str]
445
+ payment_description: NotRequired[str]
446
+ organization_id: NotRequired[str]
447
+
448
+
449
+ class PaymentCommission(BaseModel):
450
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
451
+
452
+ payment_description: Annotated[
453
+ Optional[str], pydantic.Field(alias="paymentDescription")
454
+ ] = None
455
+
456
+ organization_id: Annotated[
457
+ Optional[str], pydantic.Field(alias="organizationId")
458
+ ] = None
459
+
460
+
461
+ class ReimbursementFeeTypedDict(TypedDict):
462
+ payment_id: NotRequired[str]
463
+ payment_description: NotRequired[str]
464
+
465
+
466
+ class ReimbursementFee(BaseModel):
467
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
468
+
469
+ payment_description: Annotated[
470
+ Optional[str], pydantic.Field(alias="paymentDescription")
471
+ ] = None
472
+
473
+
474
+ class FailedPaymentFeeTypedDict(TypedDict):
475
+ payment_id: NotRequired[str]
476
+ payment_description: NotRequired[str]
477
+
478
+
479
+ class FailedPaymentFee(BaseModel):
480
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
481
+
482
+ payment_description: Annotated[
483
+ Optional[str], pydantic.Field(alias="paymentDescription")
484
+ ] = None
485
+
486
+
487
+ class PaymentFeeTypedDict(TypedDict):
488
+ payment_id: NotRequired[str]
489
+ payment_description: NotRequired[str]
490
+
491
+
492
+ class PaymentFee(BaseModel):
493
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
494
+
495
+ payment_description: Annotated[
496
+ Optional[str], pydantic.Field(alias="paymentDescription")
497
+ ] = None
498
+
499
+
500
+ class ManagedFeeTypedDict(TypedDict):
501
+ fee_type: NotRequired[str]
502
+ fee_id: NotRequired[str]
503
+
504
+
505
+ class ManagedFee(BaseModel):
506
+ fee_type: Annotated[Optional[str], pydantic.Field(alias="feeType")] = None
507
+
508
+ fee_id: Annotated[Optional[str], pydantic.Field(alias="feeId")] = None
509
+
510
+
511
+ class ReturnedManagedFeeTypedDict(TypedDict):
512
+ fee_type: NotRequired[str]
513
+ fee_id: NotRequired[str]
514
+
515
+
516
+ class ReturnedManagedFee(BaseModel):
517
+ fee_type: Annotated[Optional[str], pydantic.Field(alias="feeType")] = None
518
+
519
+ fee_id: Annotated[Optional[str], pydantic.Field(alias="feeId")] = None
520
+
521
+
522
+ class PostPaymentSplitPaymentTypedDict(TypedDict):
523
+ payment_id: NotRequired[str]
524
+
525
+
526
+ class PostPaymentSplitPayment(BaseModel):
527
+ payment_id: Annotated[Optional[str], pydantic.Field(alias="paymentId")] = None
528
+
529
+
530
+ class ContextTypedDict(TypedDict):
531
+ r"""Depending on the type of the balance transaction, we will try to give more context about the specific event that
532
+ triggered it. For example, the context object for a payment transaction will look like
533
+ `{\"paymentId\": \"tr_5B8cwPMGnU6qLbRvo7qEZo\", \"paymentDescription\": \"Description\"}`.
534
+
535
+ Below is a complete list of the context values that each type of transaction will have.
536
+
537
+ * Type `payment`: `paymentId`, `paymentDescription`
538
+ * Type `capture`: `paymentId` `captureId`, `paymentDescription`, `captureDescription`
539
+ * Type `capture-commission`: `paymentId`, `paymentDescription`, `organizationId`
540
+ * Type `capture-rolling-reserve-release`: `paymentId`, `paymentDescription`, `captureId`, `captureDescription`
541
+ * Type `unauthorized-direct-debit`: `paymentId`, `paymentDescription`
542
+ * Type `failed-payment`: `paymentId`, `paymentDescription`
543
+ * Type `refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
544
+ * Type `refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
545
+ * Type `returned-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
546
+ * Type `returned-refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
547
+ * Type `chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
548
+ * Type `chargeback-reversal`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
549
+ * Type `chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
550
+ * Type `reversed-chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
551
+ * Type `outgoing-transfer`: `settlementId` `transferId`
552
+ * Type `canceled-outgoing-transfer`: `settlementId` `transferId`
553
+ * Type `returned-transfer`: `settlementId` `transferId`
554
+ * Type `invoice-compensation`: `invoiceId`
555
+ * Type `balance-correction`: none
556
+ * Type `application-fee`: `paymentId`, `paymentDescription`, `payingOwner`
557
+ * Type `split-payment`: `paymentId`, `paymentDescription`, `paymentOwner`
558
+ * Type `platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
559
+ * Type `returned-platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
560
+ * Type `platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
561
+ * Type `reversed-platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
562
+ * Type `payment-commission`: `paymentId`, `paymentDescription`, `organizationId`
563
+ * Type `reimbursement-fee`: `paymentId`, `paymentDescription`
564
+ * Type `failed-payment-fee`: `paymentId`, `paymentDescription`
565
+ * Type `payment-fee`: `paymentId`, `paymentDescription`
566
+ * Type `cash-advance-loan`: none
567
+ * Type `platform-connected-organizations-fee`: none
568
+ * Type `managed-fee`: `feeType`, `<name of the fee>Id`
569
+ * Type `returned-managed-fee`: `feeType`, `<name of the fee>Id`
570
+ * Type `topup`: none
571
+ * Type `balance-reserve`: none
572
+ * Type `balance-reserve-return`: none
573
+ * Type `movement`: none
574
+ * Type `post-payment-split-payment`: `paymentId`
575
+ * Type `cash-collateral-issuance`: none
576
+ * Type `cash-collateral-release`: none
577
+ """
578
+
579
+ payment: NotRequired[Nullable[PaymentTypedDict]]
580
+ capture: NotRequired[Nullable[CaptureTypedDict]]
581
+ capture_commision: NotRequired[Nullable[CaptureCommisionTypedDict]]
582
+ capture_rolling_reserve_release: NotRequired[
583
+ Nullable[CaptureRollingReserveReleaseTypedDict]
584
+ ]
585
+ unauthorized_direct_debit: NotRequired[Nullable[UnauthorizedDirectDebitTypedDict]]
586
+ failed_payment: NotRequired[Nullable[FailedPaymentTypedDict]]
587
+ refund: NotRequired[Nullable[RefundTypedDict]]
588
+ refund_compensation: NotRequired[Nullable[RefundCompensationTypedDict]]
589
+ returned_refund: NotRequired[Nullable[ReturnedRefundTypedDict]]
590
+ returned_refund_compensation: NotRequired[
591
+ Nullable[ReturnedRefundCompensationTypedDict]
592
+ ]
593
+ chargeback: NotRequired[Nullable[ChargebackTypedDict]]
594
+ chargeback_reversal: NotRequired[Nullable[ChargebackReversalTypedDict]]
595
+ chargeback_compensation: NotRequired[Nullable[ChargebackCompensationTypedDict]]
596
+ reversed_chargeback_compensation: NotRequired[
597
+ Nullable[ReversedChargebackCompensationTypedDict]
598
+ ]
599
+ outgoing_transfer: NotRequired[Nullable[OutgoingTransferTypedDict]]
600
+ canceled_outgoing_transfer: NotRequired[Nullable[CanceledOutgoingTransferTypedDict]]
601
+ returned_transfer: NotRequired[Nullable[ReturnedTransferTypedDict]]
602
+ invoice_compensation: NotRequired[Nullable[InvoiceCompensationTypedDict]]
603
+ application_fee: NotRequired[
604
+ Nullable[EntityBalanceTransactionApplicationFeeTypedDict]
605
+ ]
606
+ split_payment: NotRequired[Nullable[SplitPaymentTypedDict]]
607
+ platform_payment_refund: NotRequired[Nullable[PlatformPaymentRefundTypedDict]]
608
+ returned_platform_payment_refund: NotRequired[
609
+ Nullable[ReturnedPlatformPaymentRefundTypedDict]
610
+ ]
611
+ platform_payment_chargeback: NotRequired[
612
+ Nullable[PlatformPaymentChargebackTypedDict]
613
+ ]
614
+ reversed_platform_payment_chargeback: NotRequired[
615
+ Nullable[ReversedPlatformPaymentChargebackTypedDict]
616
+ ]
617
+ payment_commission: NotRequired[Nullable[PaymentCommissionTypedDict]]
618
+ reimbursement_fee: NotRequired[Nullable[ReimbursementFeeTypedDict]]
619
+ failed_payment_fee: NotRequired[Nullable[FailedPaymentFeeTypedDict]]
620
+ payment_fee: NotRequired[Nullable[PaymentFeeTypedDict]]
621
+ managed_fee: NotRequired[Nullable[ManagedFeeTypedDict]]
622
+ returned_managed_fee: NotRequired[Nullable[ReturnedManagedFeeTypedDict]]
623
+ post_payment_split_payment: NotRequired[Nullable[PostPaymentSplitPaymentTypedDict]]
624
+
625
+
626
+ class Context(BaseModel):
627
+ r"""Depending on the type of the balance transaction, we will try to give more context about the specific event that
628
+ triggered it. For example, the context object for a payment transaction will look like
629
+ `{\"paymentId\": \"tr_5B8cwPMGnU6qLbRvo7qEZo\", \"paymentDescription\": \"Description\"}`.
630
+
631
+ Below is a complete list of the context values that each type of transaction will have.
632
+
633
+ * Type `payment`: `paymentId`, `paymentDescription`
634
+ * Type `capture`: `paymentId` `captureId`, `paymentDescription`, `captureDescription`
635
+ * Type `capture-commission`: `paymentId`, `paymentDescription`, `organizationId`
636
+ * Type `capture-rolling-reserve-release`: `paymentId`, `paymentDescription`, `captureId`, `captureDescription`
637
+ * Type `unauthorized-direct-debit`: `paymentId`, `paymentDescription`
638
+ * Type `failed-payment`: `paymentId`, `paymentDescription`
639
+ * Type `refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
640
+ * Type `refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
641
+ * Type `returned-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
642
+ * Type `returned-refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
643
+ * Type `chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
644
+ * Type `chargeback-reversal`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
645
+ * Type `chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
646
+ * Type `reversed-chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
647
+ * Type `outgoing-transfer`: `settlementId` `transferId`
648
+ * Type `canceled-outgoing-transfer`: `settlementId` `transferId`
649
+ * Type `returned-transfer`: `settlementId` `transferId`
650
+ * Type `invoice-compensation`: `invoiceId`
651
+ * Type `balance-correction`: none
652
+ * Type `application-fee`: `paymentId`, `paymentDescription`, `payingOwner`
653
+ * Type `split-payment`: `paymentId`, `paymentDescription`, `paymentOwner`
654
+ * Type `platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
655
+ * Type `returned-platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
656
+ * Type `platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
657
+ * Type `reversed-platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
658
+ * Type `payment-commission`: `paymentId`, `paymentDescription`, `organizationId`
659
+ * Type `reimbursement-fee`: `paymentId`, `paymentDescription`
660
+ * Type `failed-payment-fee`: `paymentId`, `paymentDescription`
661
+ * Type `payment-fee`: `paymentId`, `paymentDescription`
662
+ * Type `cash-advance-loan`: none
663
+ * Type `platform-connected-organizations-fee`: none
664
+ * Type `managed-fee`: `feeType`, `<name of the fee>Id`
665
+ * Type `returned-managed-fee`: `feeType`, `<name of the fee>Id`
666
+ * Type `topup`: none
667
+ * Type `balance-reserve`: none
668
+ * Type `balance-reserve-return`: none
669
+ * Type `movement`: none
670
+ * Type `post-payment-split-payment`: `paymentId`
671
+ * Type `cash-collateral-issuance`: none
672
+ * Type `cash-collateral-release`: none
673
+ """
674
+
675
+ payment: OptionalNullable[Payment] = UNSET
676
+
677
+ capture: OptionalNullable[Capture] = UNSET
678
+
679
+ capture_commision: Annotated[
680
+ OptionalNullable[CaptureCommision], pydantic.Field(alias="capture-commision")
681
+ ] = UNSET
682
+
683
+ capture_rolling_reserve_release: Annotated[
684
+ OptionalNullable[CaptureRollingReserveRelease],
685
+ pydantic.Field(alias="capture-rolling-reserve-release"),
686
+ ] = UNSET
687
+
688
+ unauthorized_direct_debit: Annotated[
689
+ OptionalNullable[UnauthorizedDirectDebit],
690
+ pydantic.Field(alias="unauthorized-direct-debit"),
691
+ ] = UNSET
692
+
693
+ failed_payment: Annotated[
694
+ OptionalNullable[FailedPayment], pydantic.Field(alias="failed-payment")
695
+ ] = UNSET
696
+
697
+ refund: OptionalNullable[Refund] = UNSET
698
+
699
+ refund_compensation: Annotated[
700
+ OptionalNullable[RefundCompensation],
701
+ pydantic.Field(alias="refund-compensation"),
702
+ ] = UNSET
703
+
704
+ returned_refund: Annotated[
705
+ OptionalNullable[ReturnedRefund], pydantic.Field(alias="returned-refund")
706
+ ] = UNSET
707
+
708
+ returned_refund_compensation: Annotated[
709
+ OptionalNullable[ReturnedRefundCompensation],
710
+ pydantic.Field(alias="returned-refund-compensation"),
711
+ ] = UNSET
712
+
713
+ chargeback: OptionalNullable[Chargeback] = UNSET
714
+
715
+ chargeback_reversal: Annotated[
716
+ OptionalNullable[ChargebackReversal],
717
+ pydantic.Field(alias="chargeback-reversal"),
718
+ ] = UNSET
719
+
720
+ chargeback_compensation: Annotated[
721
+ OptionalNullable[ChargebackCompensation],
722
+ pydantic.Field(alias="chargeback-compensation"),
723
+ ] = UNSET
724
+
725
+ reversed_chargeback_compensation: Annotated[
726
+ OptionalNullable[ReversedChargebackCompensation],
727
+ pydantic.Field(alias="reversed-chargeback-compensation"),
728
+ ] = UNSET
729
+
730
+ outgoing_transfer: Annotated[
731
+ OptionalNullable[OutgoingTransfer], pydantic.Field(alias="outgoing-transfer")
732
+ ] = UNSET
733
+
734
+ canceled_outgoing_transfer: Annotated[
735
+ OptionalNullable[CanceledOutgoingTransfer],
736
+ pydantic.Field(alias="canceled-outgoing-transfer"),
737
+ ] = UNSET
738
+
739
+ returned_transfer: Annotated[
740
+ OptionalNullable[ReturnedTransfer], pydantic.Field(alias="returned-transfer")
741
+ ] = UNSET
742
+
743
+ invoice_compensation: Annotated[
744
+ OptionalNullable[InvoiceCompensation],
745
+ pydantic.Field(alias="invoice-compensation"),
746
+ ] = UNSET
747
+
748
+ application_fee: Annotated[
749
+ OptionalNullable[EntityBalanceTransactionApplicationFee],
750
+ pydantic.Field(alias="application-fee"),
751
+ ] = UNSET
752
+
753
+ split_payment: Annotated[
754
+ OptionalNullable[SplitPayment], pydantic.Field(alias="split-payment")
755
+ ] = UNSET
756
+
757
+ platform_payment_refund: Annotated[
758
+ OptionalNullable[PlatformPaymentRefund],
759
+ pydantic.Field(alias="platform-payment-refund"),
760
+ ] = UNSET
761
+
762
+ returned_platform_payment_refund: Annotated[
763
+ OptionalNullable[ReturnedPlatformPaymentRefund],
764
+ pydantic.Field(alias="returned-platform-payment-refund"),
765
+ ] = UNSET
766
+
767
+ platform_payment_chargeback: Annotated[
768
+ OptionalNullable[PlatformPaymentChargeback],
769
+ pydantic.Field(alias="platform-payment-chargeback"),
770
+ ] = UNSET
771
+
772
+ reversed_platform_payment_chargeback: Annotated[
773
+ OptionalNullable[ReversedPlatformPaymentChargeback],
774
+ pydantic.Field(alias="reversed-platform-payment-chargeback"),
775
+ ] = UNSET
776
+
777
+ payment_commission: Annotated[
778
+ OptionalNullable[PaymentCommission], pydantic.Field(alias="payment-commission")
779
+ ] = UNSET
780
+
781
+ reimbursement_fee: Annotated[
782
+ OptionalNullable[ReimbursementFee], pydantic.Field(alias="reimbursement-fee")
783
+ ] = UNSET
784
+
785
+ failed_payment_fee: Annotated[
786
+ OptionalNullable[FailedPaymentFee], pydantic.Field(alias="failed-payment-fee")
787
+ ] = UNSET
788
+
789
+ payment_fee: Annotated[
790
+ OptionalNullable[PaymentFee], pydantic.Field(alias="payment-fee")
791
+ ] = UNSET
792
+
793
+ managed_fee: Annotated[
794
+ OptionalNullable[ManagedFee], pydantic.Field(alias="managed-fee")
795
+ ] = UNSET
796
+
797
+ returned_managed_fee: Annotated[
798
+ OptionalNullable[ReturnedManagedFee],
799
+ pydantic.Field(alias="returned-managed-fee"),
800
+ ] = UNSET
801
+
802
+ post_payment_split_payment: Annotated[
803
+ OptionalNullable[PostPaymentSplitPayment],
804
+ pydantic.Field(alias="post-payment-split-payment"),
805
+ ] = UNSET
806
+
807
+ @model_serializer(mode="wrap")
808
+ def serialize_model(self, handler):
809
+ optional_fields = [
810
+ "payment",
811
+ "capture",
812
+ "capture-commision",
813
+ "capture-rolling-reserve-release",
814
+ "unauthorized-direct-debit",
815
+ "failed-payment",
816
+ "refund",
817
+ "refund-compensation",
818
+ "returned-refund",
819
+ "returned-refund-compensation",
820
+ "chargeback",
821
+ "chargeback-reversal",
822
+ "chargeback-compensation",
823
+ "reversed-chargeback-compensation",
824
+ "outgoing-transfer",
825
+ "canceled-outgoing-transfer",
826
+ "returned-transfer",
827
+ "invoice-compensation",
828
+ "application-fee",
829
+ "split-payment",
830
+ "platform-payment-refund",
831
+ "returned-platform-payment-refund",
832
+ "platform-payment-chargeback",
833
+ "reversed-platform-payment-chargeback",
834
+ "payment-commission",
835
+ "reimbursement-fee",
836
+ "failed-payment-fee",
837
+ "payment-fee",
838
+ "managed-fee",
839
+ "returned-managed-fee",
840
+ "post-payment-split-payment",
841
+ ]
842
+ nullable_fields = [
843
+ "payment",
844
+ "capture",
845
+ "capture-commision",
846
+ "capture-rolling-reserve-release",
847
+ "unauthorized-direct-debit",
848
+ "failed-payment",
849
+ "refund",
850
+ "refund-compensation",
851
+ "returned-refund",
852
+ "returned-refund-compensation",
853
+ "chargeback",
854
+ "chargeback-reversal",
855
+ "chargeback-compensation",
856
+ "reversed-chargeback-compensation",
857
+ "outgoing-transfer",
858
+ "canceled-outgoing-transfer",
859
+ "returned-transfer",
860
+ "invoice-compensation",
861
+ "application-fee",
862
+ "split-payment",
863
+ "platform-payment-refund",
864
+ "returned-platform-payment-refund",
865
+ "platform-payment-chargeback",
866
+ "reversed-platform-payment-chargeback",
867
+ "payment-commission",
868
+ "reimbursement-fee",
869
+ "failed-payment-fee",
870
+ "payment-fee",
871
+ "managed-fee",
872
+ "returned-managed-fee",
873
+ "post-payment-split-payment",
874
+ ]
875
+ null_default_fields = []
876
+
877
+ serialized = handler(self)
878
+
879
+ m = {}
880
+
881
+ for n, f in type(self).model_fields.items():
882
+ k = f.alias or n
883
+ val = serialized.get(k)
884
+ serialized.pop(k, None)
885
+
886
+ optional_nullable = k in optional_fields and k in nullable_fields
887
+ is_set = (
888
+ self.__pydantic_fields_set__.intersection({n})
889
+ or k in null_default_fields
890
+ ) # pylint: disable=no-member
891
+
892
+ if val is not None and val != UNSET_SENTINEL:
893
+ m[k] = val
894
+ elif val != UNSET_SENTINEL and (
895
+ not k in optional_fields or (optional_nullable and is_set)
896
+ ):
897
+ m[k] = val
898
+
899
+ return m
900
+
901
+
902
+ class EntityBalanceTransactionTypedDict(TypedDict):
903
+ resource: str
904
+ r"""Indicates the response contains a balance transaction object. Will always contain the string `balance-transaction`
905
+ for this endpoint.
906
+ """
907
+ id: str
908
+ r"""The identifier uniquely referring to this balance transaction."""
909
+ type: BalanceTransactionType
910
+ result_amount: AmountTypedDict
911
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
912
+ initial_amount: AmountTypedDict
913
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
914
+ created_at: str
915
+ r"""The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."""
916
+ deductions: NotRequired[Nullable[AmountNullableTypedDict]]
917
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
918
+ context: NotRequired[ContextTypedDict]
919
+ r"""Depending on the type of the balance transaction, we will try to give more context about the specific event that
920
+ triggered it. For example, the context object for a payment transaction will look like
921
+ `{\"paymentId\": \"tr_5B8cwPMGnU6qLbRvo7qEZo\", \"paymentDescription\": \"Description\"}`.
922
+
923
+ Below is a complete list of the context values that each type of transaction will have.
924
+
925
+ * Type `payment`: `paymentId`, `paymentDescription`
926
+ * Type `capture`: `paymentId` `captureId`, `paymentDescription`, `captureDescription`
927
+ * Type `capture-commission`: `paymentId`, `paymentDescription`, `organizationId`
928
+ * Type `capture-rolling-reserve-release`: `paymentId`, `paymentDescription`, `captureId`, `captureDescription`
929
+ * Type `unauthorized-direct-debit`: `paymentId`, `paymentDescription`
930
+ * Type `failed-payment`: `paymentId`, `paymentDescription`
931
+ * Type `refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
932
+ * Type `refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
933
+ * Type `returned-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
934
+ * Type `returned-refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
935
+ * Type `chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
936
+ * Type `chargeback-reversal`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
937
+ * Type `chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
938
+ * Type `reversed-chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
939
+ * Type `outgoing-transfer`: `settlementId` `transferId`
940
+ * Type `canceled-outgoing-transfer`: `settlementId` `transferId`
941
+ * Type `returned-transfer`: `settlementId` `transferId`
942
+ * Type `invoice-compensation`: `invoiceId`
943
+ * Type `balance-correction`: none
944
+ * Type `application-fee`: `paymentId`, `paymentDescription`, `payingOwner`
945
+ * Type `split-payment`: `paymentId`, `paymentDescription`, `paymentOwner`
946
+ * Type `platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
947
+ * Type `returned-platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
948
+ * Type `platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
949
+ * Type `reversed-platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
950
+ * Type `payment-commission`: `paymentId`, `paymentDescription`, `organizationId`
951
+ * Type `reimbursement-fee`: `paymentId`, `paymentDescription`
952
+ * Type `failed-payment-fee`: `paymentId`, `paymentDescription`
953
+ * Type `payment-fee`: `paymentId`, `paymentDescription`
954
+ * Type `cash-advance-loan`: none
955
+ * Type `platform-connected-organizations-fee`: none
956
+ * Type `managed-fee`: `feeType`, `<name of the fee>Id`
957
+ * Type `returned-managed-fee`: `feeType`, `<name of the fee>Id`
958
+ * Type `topup`: none
959
+ * Type `balance-reserve`: none
960
+ * Type `balance-reserve-return`: none
961
+ * Type `movement`: none
962
+ * Type `post-payment-split-payment`: `paymentId`
963
+ * Type `cash-collateral-issuance`: none
964
+ * Type `cash-collateral-release`: none
965
+ """
966
+
967
+
968
+ class EntityBalanceTransaction(BaseModel):
969
+ resource: str
970
+ r"""Indicates the response contains a balance transaction object. Will always contain the string `balance-transaction`
971
+ for this endpoint.
972
+ """
973
+
974
+ id: str
975
+ r"""The identifier uniquely referring to this balance transaction."""
976
+
977
+ type: Annotated[BalanceTransactionType, PlainValidator(validate_open_enum(False))]
978
+
979
+ result_amount: Annotated[Amount, pydantic.Field(alias="resultAmount")]
980
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
981
+
982
+ initial_amount: Annotated[Amount, pydantic.Field(alias="initialAmount")]
983
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
984
+
985
+ created_at: Annotated[str, pydantic.Field(alias="createdAt")]
986
+ r"""The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."""
987
+
988
+ deductions: OptionalNullable[AmountNullable] = UNSET
989
+ r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
990
+
991
+ context: Optional[Context] = None
992
+ r"""Depending on the type of the balance transaction, we will try to give more context about the specific event that
993
+ triggered it. For example, the context object for a payment transaction will look like
994
+ `{\"paymentId\": \"tr_5B8cwPMGnU6qLbRvo7qEZo\", \"paymentDescription\": \"Description\"}`.
995
+
996
+ Below is a complete list of the context values that each type of transaction will have.
997
+
998
+ * Type `payment`: `paymentId`, `paymentDescription`
999
+ * Type `capture`: `paymentId` `captureId`, `paymentDescription`, `captureDescription`
1000
+ * Type `capture-commission`: `paymentId`, `paymentDescription`, `organizationId`
1001
+ * Type `capture-rolling-reserve-release`: `paymentId`, `paymentDescription`, `captureId`, `captureDescription`
1002
+ * Type `unauthorized-direct-debit`: `paymentId`, `paymentDescription`
1003
+ * Type `failed-payment`: `paymentId`, `paymentDescription`
1004
+ * Type `refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
1005
+ * Type `refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
1006
+ * Type `returned-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
1007
+ * Type `returned-refund-compensation`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
1008
+ * Type `chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
1009
+ * Type `chargeback-reversal`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
1010
+ * Type `chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
1011
+ * Type `reversed-chargeback-compensation`: `paymentId`, `chargebackId`, `paymentDescription`, `chargebackDescription`
1012
+ * Type `outgoing-transfer`: `settlementId` `transferId`
1013
+ * Type `canceled-outgoing-transfer`: `settlementId` `transferId`
1014
+ * Type `returned-transfer`: `settlementId` `transferId`
1015
+ * Type `invoice-compensation`: `invoiceId`
1016
+ * Type `balance-correction`: none
1017
+ * Type `application-fee`: `paymentId`, `paymentDescription`, `payingOwner`
1018
+ * Type `split-payment`: `paymentId`, `paymentDescription`, `paymentOwner`
1019
+ * Type `platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
1020
+ * Type `returned-platform-payment-refund`: `paymentId` `refundId`, `paymentDescription`, `refundDescription`
1021
+ * Type `platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
1022
+ * Type `reversed-platform-payment-chargeback`: `paymentId` `chargebackId`, `paymentDescription`, `chargebackDescription`
1023
+ * Type `payment-commission`: `paymentId`, `paymentDescription`, `organizationId`
1024
+ * Type `reimbursement-fee`: `paymentId`, `paymentDescription`
1025
+ * Type `failed-payment-fee`: `paymentId`, `paymentDescription`
1026
+ * Type `payment-fee`: `paymentId`, `paymentDescription`
1027
+ * Type `cash-advance-loan`: none
1028
+ * Type `platform-connected-organizations-fee`: none
1029
+ * Type `managed-fee`: `feeType`, `<name of the fee>Id`
1030
+ * Type `returned-managed-fee`: `feeType`, `<name of the fee>Id`
1031
+ * Type `topup`: none
1032
+ * Type `balance-reserve`: none
1033
+ * Type `balance-reserve-return`: none
1034
+ * Type `movement`: none
1035
+ * Type `post-payment-split-payment`: `paymentId`
1036
+ * Type `cash-collateral-issuance`: none
1037
+ * Type `cash-collateral-release`: none
1038
+ """
1039
+
1040
+ @model_serializer(mode="wrap")
1041
+ def serialize_model(self, handler):
1042
+ optional_fields = ["deductions", "context"]
1043
+ nullable_fields = ["deductions"]
1044
+ null_default_fields = []
1045
+
1046
+ serialized = handler(self)
1047
+
1048
+ m = {}
1049
+
1050
+ for n, f in type(self).model_fields.items():
1051
+ k = f.alias or n
1052
+ val = serialized.get(k)
1053
+ serialized.pop(k, None)
1054
+
1055
+ optional_nullable = k in optional_fields and k in nullable_fields
1056
+ is_set = (
1057
+ self.__pydantic_fields_set__.intersection({n})
1058
+ or k in null_default_fields
1059
+ ) # pylint: disable=no-member
1060
+
1061
+ if val is not None and val != UNSET_SENTINEL:
1062
+ m[k] = val
1063
+ elif val != UNSET_SENTINEL and (
1064
+ not k in optional_fields or (optional_nullable and is_set)
1065
+ ):
1066
+ m[k] = val
1067
+
1068
+ return m