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.
- mollie/__init__.py +18 -0
- mollie/_hooks/__init__.py +5 -0
- mollie/_hooks/mollie_hooks.py +165 -0
- mollie/_hooks/registration.py +18 -0
- mollie/_hooks/sdkhooks.py +76 -0
- mollie/_hooks/types.py +113 -0
- mollie/_version.py +15 -0
- mollie/balance_transfers.py +651 -0
- mollie/balances.py +1105 -0
- mollie/basesdk.py +360 -0
- mollie/capabilities.py +209 -0
- mollie/captures.py +677 -0
- mollie/chargebacks_sdk.py +675 -0
- mollie/client_links.py +325 -0
- mollie/clients.py +409 -0
- mollie/customers.py +1563 -0
- mollie/delayed_routing.py +421 -0
- mollie/httpclient.py +125 -0
- mollie/invoices.py +429 -0
- mollie/mandates.py +895 -0
- mollie/methods.py +789 -0
- mollie/models/__init__.py +4002 -0
- mollie/models/address.py +29 -0
- mollie/models/amount.py +25 -0
- mollie/models/amount_nullable.py +24 -0
- mollie/models/apierror.py +40 -0
- mollie/models/balance_card_audience.py +10 -0
- mollie/models/balance_card_issuer.py +12 -0
- mollie/models/balance_card_region.py +12 -0
- mollie/models/balance_fee_type.py +43 -0
- mollie/models/balance_prepayment_part_type.py +13 -0
- mollie/models/balance_report_grouping.py +10 -0
- mollie/models/balance_transaction_type.py +47 -0
- mollie/models/balance_transfer_category.py +17 -0
- mollie/models/balance_transfer_category_response.py +18 -0
- mollie/models/balance_transfer_destination_type.py +14 -0
- mollie/models/balance_transfer_party_type.py +10 -0
- mollie/models/balance_transfer_party_type_response.py +11 -0
- mollie/models/balance_transfer_status.py +13 -0
- mollie/models/balance_transfer_status_reason_response.py +19 -0
- mollie/models/billingaddress.py +154 -0
- mollie/models/cancel_paymentop.py +93 -0
- mollie/models/cancel_refundop.py +86 -0
- mollie/models/cancel_subscriptionop.py +100 -0
- mollie/models/capability_requirement_status.py +15 -0
- mollie/models/capability_status.py +12 -0
- mollie/models/capability_status_reason.py +10 -0
- mollie/models/capture_mode.py +15 -0
- mollie/models/capture_mode_response.py +16 -0
- mollie/models/capture_response.py +265 -0
- mollie/models/client_link_request.py +210 -0
- mollie/models/client_link_response.py +56 -0
- mollie/models/clienterror.py +30 -0
- mollie/models/components_sub_totals.py +127 -0
- mollie/models/create_captureop.py +43 -0
- mollie/models/create_client_linkop.py +29 -0
- mollie/models/create_connect_balance_transferop.py +32 -0
- mollie/models/create_customer_paymentop.py +43 -0
- mollie/models/create_customerop.py +29 -0
- mollie/models/create_mandateop.py +43 -0
- mollie/models/create_payment_linkop.py +325 -0
- mollie/models/create_paymentop.py +73 -0
- mollie/models/create_profileop.py +29 -0
- mollie/models/create_refundop.py +43 -0
- mollie/models/create_sales_invoiceop.py +29 -0
- mollie/models/create_subscriptionop.py +43 -0
- mollie/models/create_webhook.py +123 -0
- mollie/models/create_webhookop.py +69 -0
- mollie/models/currencies.py +20 -0
- mollie/models/customer_response.py +169 -0
- mollie/models/delete_customerop.py +91 -0
- mollie/models/delete_payment_linkop.py +91 -0
- mollie/models/delete_profileop.py +29 -0
- mollie/models/delete_sales_invoiceop.py +44 -0
- mollie/models/delete_values_sales_invoice.py +54 -0
- mollie/models/delete_webhookop.py +56 -0
- mollie/models/entity_balance.py +325 -0
- mollie/models/entity_balance_report.py +541 -0
- mollie/models/entity_balance_transaction.py +1068 -0
- mollie/models/entity_balance_transfer.py +62 -0
- mollie/models/entity_balance_transfer_party.py +28 -0
- mollie/models/entity_balance_transfer_party_response.py +32 -0
- mollie/models/entity_balance_transfer_response.py +159 -0
- mollie/models/entity_capability.py +75 -0
- mollie/models/entity_capability_requirement.py +87 -0
- mollie/models/entity_capture.py +63 -0
- mollie/models/entity_chargeback.py +247 -0
- mollie/models/entity_customer.py +86 -0
- mollie/models/entity_event.py +46 -0
- mollie/models/entity_invoice.py +247 -0
- mollie/models/entity_method_get.py +329 -0
- mollie/models/entity_onboarding_status.py +95 -0
- mollie/models/entity_organization.py +178 -0
- mollie/models/entity_payment_route.py +111 -0
- mollie/models/entity_payment_route_response.py +140 -0
- mollie/models/entity_permission.py +61 -0
- mollie/models/entity_refund_response.py +361 -0
- mollie/models/entity_route.py +96 -0
- mollie/models/entity_settlement.py +467 -0
- mollie/models/entity_terminal.py +160 -0
- mollie/models/entity_webhook.py +122 -0
- mollie/models/entity_webhook_event.py +149 -0
- mollie/models/error_response.py +70 -0
- mollie/models/get_balance_reportop.py +126 -0
- mollie/models/get_balanceop.py +71 -0
- mollie/models/get_captureop.py +129 -0
- mollie/models/get_chargebackop.py +129 -0
- mollie/models/get_clientop.py +216 -0
- mollie/models/get_connect_balance_transferop.py +71 -0
- mollie/models/get_current_organizationop.py +22 -0
- mollie/models/get_current_profileop.py +22 -0
- mollie/models/get_customerop.py +286 -0
- mollie/models/get_invoiceop.py +29 -0
- mollie/models/get_mandateop.py +86 -0
- mollie/models/get_methodop.py +199 -0
- mollie/models/get_next_settlementop.py +22 -0
- mollie/models/get_onboarding_statusop.py +22 -0
- mollie/models/get_open_settlementop.py +22 -0
- mollie/models/get_organizationop.py +71 -0
- mollie/models/get_partner_statusop.py +231 -0
- mollie/models/get_payment_link_paymentsop.py +188 -0
- mollie/models/get_payment_linkop.py +77 -0
- mollie/models/get_paymentop.py +128 -0
- mollie/models/get_permissionop.py +73 -0
- mollie/models/get_primary_balanceop.py +22 -0
- mollie/models/get_profileop.py +71 -0
- mollie/models/get_refundop.py +129 -0
- mollie/models/get_sales_invoiceop.py +75 -0
- mollie/models/get_settlementop.py +29 -0
- mollie/models/get_subscriptionop.py +86 -0
- mollie/models/get_terminalop.py +77 -0
- mollie/models/get_webhook_eventop.py +71 -0
- mollie/models/get_webhookop.py +71 -0
- mollie/models/internal/__init__.py +54 -0
- mollie/models/internal/globals.py +59 -0
- mollie/models/line_categories.py +13 -0
- mollie/models/line_categories_response.py +14 -0
- mollie/models/list_all_chargebacksop.py +236 -0
- mollie/models/list_all_methodsop.py +249 -0
- mollie/models/list_all_refundsop.py +230 -0
- mollie/models/list_all_subscriptionsop.py +202 -0
- mollie/models/list_balance_transactionsop.py +174 -0
- mollie/models/list_balancesop.py +171 -0
- mollie/models/list_capabilitiesop.py +62 -0
- mollie/models/list_capture_response.py +264 -0
- mollie/models/list_capturesop.py +185 -0
- mollie/models/list_chargebacksop.py +185 -0
- mollie/models/list_clientsop.py +269 -0
- mollie/models/list_connect_balance_transfersop.py +177 -0
- mollie/models/list_customer_paymentsop.py +231 -0
- mollie/models/list_customer_response.py +164 -0
- mollie/models/list_customersop.py +172 -0
- mollie/models/list_entity_balance.py +322 -0
- mollie/models/list_entity_chargeback.py +244 -0
- mollie/models/list_entity_invoice.py +244 -0
- mollie/models/list_entity_method.py +315 -0
- mollie/models/list_entity_method_all.py +391 -0
- mollie/models/list_entity_permission.py +56 -0
- mollie/models/list_entity_refund.py +352 -0
- mollie/models/list_entity_settlement.py +457 -0
- mollie/models/list_entity_terminal.py +157 -0
- mollie/models/list_entity_webhook.py +117 -0
- mollie/models/list_invoicesop.py +175 -0
- mollie/models/list_links.py +68 -0
- mollie/models/list_mandate_response.py +261 -0
- mollie/models/list_mandatesop.py +186 -0
- mollie/models/list_methodsop.py +332 -0
- mollie/models/list_payment_linksop.py +159 -0
- mollie/models/list_payment_response.py +1953 -0
- mollie/models/list_paymentsop.py +217 -0
- mollie/models/list_permissionsop.py +85 -0
- mollie/models/list_profile_response.py +194 -0
- mollie/models/list_profilesop.py +118 -0
- mollie/models/list_refundsop.py +189 -0
- mollie/models/list_route_get_response.py +97 -0
- mollie/models/list_sales_invoice_response.py +505 -0
- mollie/models/list_sales_invoicesop.py +172 -0
- mollie/models/list_settlement_capturesop.py +187 -0
- mollie/models/list_settlement_chargebacksop.py +187 -0
- mollie/models/list_settlement_paymentsop.py +233 -0
- mollie/models/list_settlement_refundsop.py +191 -0
- mollie/models/list_settlementsop.py +178 -0
- mollie/models/list_subscription_paymentsop.py +242 -0
- mollie/models/list_subscription_response.py +344 -0
- mollie/models/list_subscriptionsop.py +189 -0
- mollie/models/list_terminalsop.py +172 -0
- mollie/models/list_webhooksop.py +189 -0
- mollie/models/locale.py +32 -0
- mollie/models/locale_response.py +33 -0
- mollie/models/mandate_details_card_label_response.py +22 -0
- mollie/models/mandate_method.py +15 -0
- mollie/models/mandate_method_response.py +16 -0
- mollie/models/mandate_request.py +160 -0
- mollie/models/mandate_response.py +264 -0
- mollie/models/metadata.py +19 -0
- mollie/models/method.py +50 -0
- mollie/models/method_include_wallets_parameter.py +8 -0
- mollie/models/method_resource_parameter.py +9 -0
- mollie/models/method_response.py +59 -0
- mollie/models/method_status.py +15 -0
- mollie/models/mode.py +12 -0
- mollie/models/no_response_error.py +17 -0
- mollie/models/onboarding_vat_regulation.py +16 -0
- mollie/models/organization_vat_regulation.py +17 -0
- mollie/models/payment_address.py +130 -0
- mollie/models/payment_create_routeop.py +43 -0
- mollie/models/payment_details_card_audition_response.py +12 -0
- mollie/models/payment_details_card_funding_response.py +14 -0
- mollie/models/payment_details_card_label_response.py +23 -0
- mollie/models/payment_details_card_security_response.py +12 -0
- mollie/models/payment_details_failure_reason_response.py +25 -0
- mollie/models/payment_details_fee_region_response.py +20 -0
- mollie/models/payment_details_receipt_card_read_method_response.py +17 -0
- mollie/models/payment_details_receipt_card_verification_method_response.py +21 -0
- mollie/models/payment_details_seller_protection_response.py +20 -0
- mollie/models/payment_details_wallet_response.py +11 -0
- mollie/models/payment_line_item.py +96 -0
- mollie/models/payment_line_item_response.py +104 -0
- mollie/models/payment_line_type.py +20 -0
- mollie/models/payment_line_type_response.py +21 -0
- mollie/models/payment_link_method.py +36 -0
- mollie/models/payment_link_method_response.py +37 -0
- mollie/models/payment_link_response.py +348 -0
- mollie/models/payment_link_sequence_type.py +9 -0
- mollie/models/payment_link_sequence_type_response.py +10 -0
- mollie/models/payment_list_routesop.py +140 -0
- mollie/models/payment_method.py +53 -0
- mollie/models/payment_request.py +919 -0
- mollie/models/payment_response.py +1953 -0
- mollie/models/profile_request.py +67 -0
- mollie/models/profile_response.py +197 -0
- mollie/models/profile_review_status_response.py +12 -0
- mollie/models/recurring_line_item.py +77 -0
- mollie/models/refund_external_reference_type.py +10 -0
- mollie/models/refund_external_reference_type_response.py +11 -0
- mollie/models/refund_request.py +200 -0
- mollie/models/release_authorizationop.py +108 -0
- mollie/models/request_apple_pay_payment_sessionop.py +76 -0
- mollie/models/responsevalidationerror.py +27 -0
- mollie/models/revoke_mandateop.py +100 -0
- mollie/models/route_create_response.py +97 -0
- mollie/models/route_destination_type.py +10 -0
- mollie/models/route_destination_type_response.py +11 -0
- mollie/models/sales_invoice_discount.py +21 -0
- mollie/models/sales_invoice_discount_response.py +25 -0
- mollie/models/sales_invoice_discount_type.py +11 -0
- mollie/models/sales_invoice_discount_type_response.py +12 -0
- mollie/models/sales_invoice_email_details.py +20 -0
- mollie/models/sales_invoice_line_item.py +67 -0
- mollie/models/sales_invoice_line_item_response.py +70 -0
- mollie/models/sales_invoice_payment_details.py +59 -0
- mollie/models/sales_invoice_payment_details_response.py +66 -0
- mollie/models/sales_invoice_payment_details_source.py +12 -0
- mollie/models/sales_invoice_payment_details_source_response.py +13 -0
- mollie/models/sales_invoice_payment_term.py +16 -0
- mollie/models/sales_invoice_payment_term_response.py +17 -0
- mollie/models/sales_invoice_recipient.py +176 -0
- mollie/models/sales_invoice_recipient_locale.py +18 -0
- mollie/models/sales_invoice_recipient_locale_response.py +19 -0
- mollie/models/sales_invoice_recipient_response.py +182 -0
- mollie/models/sales_invoice_recipient_type.py +13 -0
- mollie/models/sales_invoice_recipient_type_response.py +14 -0
- mollie/models/sales_invoice_request.py +256 -0
- mollie/models/sales_invoice_response.py +509 -0
- mollie/models/sales_invoice_status.py +25 -0
- mollie/models/sales_invoice_status_response.py +26 -0
- mollie/models/sales_invoice_vat_mode.py +13 -0
- mollie/models/sales_invoice_vat_mode_response.py +14 -0
- mollie/models/sales_invoice_vat_scheme.py +11 -0
- mollie/models/sales_invoice_vat_scheme_response.py +12 -0
- mollie/models/security.py +35 -0
- mollie/models/sequence_type.py +10 -0
- mollie/models/sequence_type_response.py +11 -0
- mollie/models/sorting.py +9 -0
- mollie/models/status_reason.py +168 -0
- mollie/models/sub_group.py +52 -0
- mollie/models/sub_totals.py +120 -0
- mollie/models/submit_onboarding_dataop.py +214 -0
- mollie/models/subscription_method.py +12 -0
- mollie/models/subscription_method_response.py +13 -0
- mollie/models/subscription_request.py +213 -0
- mollie/models/subscription_response.py +349 -0
- mollie/models/terminal_brand.py +12 -0
- mollie/models/terminal_model.py +16 -0
- mollie/models/test_webhookop.py +64 -0
- mollie/models/update_customerop.py +43 -0
- mollie/models/update_payment_linkop.py +172 -0
- mollie/models/update_paymentop.py +332 -0
- mollie/models/update_profileop.py +147 -0
- mollie/models/update_sales_invoiceop.py +44 -0
- mollie/models/update_subscriptionop.py +188 -0
- mollie/models/update_values_sales_invoice.py +176 -0
- mollie/models/update_webhookop.py +83 -0
- mollie/models/url.py +24 -0
- mollie/models/url_nullable.py +25 -0
- mollie/models/webhook_event_types.py +18 -0
- mollie/models/webhook_status.py +14 -0
- mollie/onboarding.py +403 -0
- mollie/organizations.py +579 -0
- mollie/payment_links.py +1323 -0
- mollie/payments_sdk.py +1385 -0
- mollie/permissions.py +397 -0
- mollie/profiles.py +1209 -0
- mollie/py.typed +1 -0
- mollie/refunds_sdk.py +1111 -0
- mollie/sales_invoices.py +1121 -0
- mollie/sdk.py +265 -0
- mollie/sdkconfiguration.py +50 -0
- mollie/settlements.py +1735 -0
- mollie/subscriptions.py +1617 -0
- mollie/terminals.py +427 -0
- mollie/types/__init__.py +21 -0
- mollie/types/basemodel.py +39 -0
- mollie/utils/__init__.py +200 -0
- mollie/utils/annotations.py +79 -0
- mollie/utils/datetimes.py +23 -0
- mollie/utils/enums.py +74 -0
- mollie/utils/eventstreaming.py +248 -0
- mollie/utils/forms.py +223 -0
- mollie/utils/headers.py +136 -0
- mollie/utils/logger.py +27 -0
- mollie/utils/metadata.py +118 -0
- mollie/utils/queryparams.py +205 -0
- mollie/utils/requestbodies.py +66 -0
- mollie/utils/retries.py +217 -0
- mollie/utils/security.py +195 -0
- mollie/utils/serializers.py +249 -0
- mollie/utils/unmarshal_json_response.py +24 -0
- mollie/utils/url.py +155 -0
- mollie/utils/values.py +137 -0
- mollie/wallets.py +263 -0
- mollie/webhook_events.py +211 -0
- mollie/webhooks.py +1305 -0
- mollie_api_py-1.0.0.dist-info/METADATA +834 -0
- mollie_api_py-1.0.0.dist-info/RECORD +337 -0
- mollie_api_py-1.0.0.dist-info/WHEEL +4 -0
- mollie_api_py-1.0.0.dist-info/licenses/LICENSE.md +24 -0
|
@@ -0,0 +1,919 @@
|
|
|
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 .capture_mode import CaptureMode
|
|
6
|
+
from .entity_payment_route import EntityPaymentRoute, EntityPaymentRouteTypedDict
|
|
7
|
+
from .line_categories import LineCategories
|
|
8
|
+
from .locale import Locale
|
|
9
|
+
from .metadata import Metadata, MetadataTypedDict
|
|
10
|
+
from .method import Method
|
|
11
|
+
from .payment_address import PaymentAddress, PaymentAddressTypedDict
|
|
12
|
+
from .payment_line_type import PaymentLineType
|
|
13
|
+
from .recurring_line_item import RecurringLineItem, RecurringLineItemTypedDict
|
|
14
|
+
from .sequence_type import SequenceType
|
|
15
|
+
from datetime import date
|
|
16
|
+
from mollie.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
|
17
|
+
import pydantic
|
|
18
|
+
from pydantic import model_serializer
|
|
19
|
+
from typing import Any, Dict, List, Optional
|
|
20
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class PaymentRequestLineTypedDict(TypedDict):
|
|
24
|
+
description: str
|
|
25
|
+
r"""A description of the line item. For example *LEGO 4440 Forest Police Station*."""
|
|
26
|
+
quantity: int
|
|
27
|
+
r"""The number of items."""
|
|
28
|
+
unit_price: AmountTypedDict
|
|
29
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
30
|
+
total_amount: AmountTypedDict
|
|
31
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
32
|
+
type: NotRequired[PaymentLineType]
|
|
33
|
+
r"""The type of product purchased. For example, a physical or a digital product.
|
|
34
|
+
|
|
35
|
+
The `tip` payment line type is not available when creating a payment.
|
|
36
|
+
"""
|
|
37
|
+
quantity_unit: NotRequired[str]
|
|
38
|
+
r"""The unit for the quantity. For example *pcs*, *kg*, or *cm*."""
|
|
39
|
+
discount_amount: NotRequired[AmountTypedDict]
|
|
40
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
41
|
+
vat_rate: NotRequired[str]
|
|
42
|
+
r"""The VAT rate applied to the line, for example `21.00` for 21%. The vatRate should be passed as a string and
|
|
43
|
+
not as a float, to ensure the correct number of decimals are passed.
|
|
44
|
+
"""
|
|
45
|
+
vat_amount: NotRequired[AmountTypedDict]
|
|
46
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
47
|
+
sku: NotRequired[str]
|
|
48
|
+
r"""The SKU, EAN, ISBN or UPC of the product sold."""
|
|
49
|
+
categories: NotRequired[List[LineCategories]]
|
|
50
|
+
r"""An array with the voucher categories, in case of a line eligible for a voucher. See the
|
|
51
|
+
[Integrating Vouchers](https://docs.mollie.com/docs/integrating-vouchers/) guide for more information.
|
|
52
|
+
"""
|
|
53
|
+
image_url: NotRequired[str]
|
|
54
|
+
r"""A link pointing to an image of the product sold."""
|
|
55
|
+
product_url: NotRequired[str]
|
|
56
|
+
r"""A link pointing to the product page in your web shop of the product sold."""
|
|
57
|
+
recurring: NotRequired[RecurringLineItemTypedDict]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class PaymentRequestLine(BaseModel):
|
|
61
|
+
description: str
|
|
62
|
+
r"""A description of the line item. For example *LEGO 4440 Forest Police Station*."""
|
|
63
|
+
|
|
64
|
+
quantity: int
|
|
65
|
+
r"""The number of items."""
|
|
66
|
+
|
|
67
|
+
unit_price: Annotated[Amount, pydantic.Field(alias="unitPrice")]
|
|
68
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
69
|
+
|
|
70
|
+
total_amount: Annotated[Amount, pydantic.Field(alias="totalAmount")]
|
|
71
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
72
|
+
|
|
73
|
+
type: Optional[PaymentLineType] = None
|
|
74
|
+
r"""The type of product purchased. For example, a physical or a digital product.
|
|
75
|
+
|
|
76
|
+
The `tip` payment line type is not available when creating a payment.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
quantity_unit: Annotated[Optional[str], pydantic.Field(alias="quantityUnit")] = None
|
|
80
|
+
r"""The unit for the quantity. For example *pcs*, *kg*, or *cm*."""
|
|
81
|
+
|
|
82
|
+
discount_amount: Annotated[
|
|
83
|
+
Optional[Amount], pydantic.Field(alias="discountAmount")
|
|
84
|
+
] = None
|
|
85
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
86
|
+
|
|
87
|
+
vat_rate: Annotated[Optional[str], pydantic.Field(alias="vatRate")] = None
|
|
88
|
+
r"""The VAT rate applied to the line, for example `21.00` for 21%. The vatRate should be passed as a string and
|
|
89
|
+
not as a float, to ensure the correct number of decimals are passed.
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
vat_amount: Annotated[Optional[Amount], pydantic.Field(alias="vatAmount")] = None
|
|
93
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
94
|
+
|
|
95
|
+
sku: Optional[str] = None
|
|
96
|
+
r"""The SKU, EAN, ISBN or UPC of the product sold."""
|
|
97
|
+
|
|
98
|
+
categories: Optional[List[LineCategories]] = None
|
|
99
|
+
r"""An array with the voucher categories, in case of a line eligible for a voucher. See the
|
|
100
|
+
[Integrating Vouchers](https://docs.mollie.com/docs/integrating-vouchers/) guide for more information.
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
image_url: Annotated[Optional[str], pydantic.Field(alias="imageUrl")] = None
|
|
104
|
+
r"""A link pointing to an image of the product sold."""
|
|
105
|
+
|
|
106
|
+
product_url: Annotated[Optional[str], pydantic.Field(alias="productUrl")] = None
|
|
107
|
+
r"""A link pointing to the product page in your web shop of the product sold."""
|
|
108
|
+
|
|
109
|
+
recurring: Optional[RecurringLineItem] = None
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class PaymentRequestBillingAddressTypedDict(TypedDict):
|
|
113
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
114
|
+
conversion.
|
|
115
|
+
|
|
116
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
117
|
+
`country`.
|
|
118
|
+
|
|
119
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
title: NotRequired[str]
|
|
123
|
+
r"""The title of the person, for example *Mr.* or *Mrs.*."""
|
|
124
|
+
given_name: NotRequired[str]
|
|
125
|
+
r"""The given name (first name) of the person should be at least two characters and cannot contain only
|
|
126
|
+
numbers.
|
|
127
|
+
|
|
128
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
129
|
+
"""
|
|
130
|
+
family_name: NotRequired[str]
|
|
131
|
+
r"""The given family name (surname) of the person should be at least two characters and cannot contain only
|
|
132
|
+
numbers.
|
|
133
|
+
|
|
134
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
135
|
+
"""
|
|
136
|
+
organization_name: NotRequired[Any]
|
|
137
|
+
r"""The name of the organization, in case the addressee is an organization.
|
|
138
|
+
|
|
139
|
+
Required for payment method `billie`.
|
|
140
|
+
"""
|
|
141
|
+
street_and_number: NotRequired[str]
|
|
142
|
+
r"""A street and street number.
|
|
143
|
+
|
|
144
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
145
|
+
"""
|
|
146
|
+
street_additional: NotRequired[str]
|
|
147
|
+
r"""Any additional addressing details, for example an apartment number."""
|
|
148
|
+
postal_code: NotRequired[str]
|
|
149
|
+
r"""A postal code. This field may be required if the provided country has a postal code system.
|
|
150
|
+
|
|
151
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
152
|
+
"""
|
|
153
|
+
email: NotRequired[str]
|
|
154
|
+
r"""A valid e-mail address.
|
|
155
|
+
|
|
156
|
+
If you provide the email address for a `banktransfer` payment, we will automatically send the instructions
|
|
157
|
+
email upon payment creation. The language of the email will follow the locale parameter of the payment.
|
|
158
|
+
|
|
159
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
160
|
+
"""
|
|
161
|
+
phone: NotRequired[str]
|
|
162
|
+
r"""If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070."""
|
|
163
|
+
city: NotRequired[str]
|
|
164
|
+
r"""A city name.
|
|
165
|
+
|
|
166
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
167
|
+
"""
|
|
168
|
+
region: NotRequired[str]
|
|
169
|
+
r"""The top-level administrative subdivision of the country. For example: Noord-Holland."""
|
|
170
|
+
country: NotRequired[str]
|
|
171
|
+
r"""A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
172
|
+
|
|
173
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class PaymentRequestBillingAddress(BaseModel):
|
|
178
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
179
|
+
conversion.
|
|
180
|
+
|
|
181
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
182
|
+
`country`.
|
|
183
|
+
|
|
184
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
title: Optional[str] = None
|
|
188
|
+
r"""The title of the person, for example *Mr.* or *Mrs.*."""
|
|
189
|
+
|
|
190
|
+
given_name: Annotated[Optional[str], pydantic.Field(alias="givenName")] = None
|
|
191
|
+
r"""The given name (first name) of the person should be at least two characters and cannot contain only
|
|
192
|
+
numbers.
|
|
193
|
+
|
|
194
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
family_name: Annotated[Optional[str], pydantic.Field(alias="familyName")] = None
|
|
198
|
+
r"""The given family name (surname) of the person should be at least two characters and cannot contain only
|
|
199
|
+
numbers.
|
|
200
|
+
|
|
201
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
202
|
+
"""
|
|
203
|
+
|
|
204
|
+
organization_name: Annotated[
|
|
205
|
+
Optional[Any], pydantic.Field(alias="organizationName")
|
|
206
|
+
] = None
|
|
207
|
+
r"""The name of the organization, in case the addressee is an organization.
|
|
208
|
+
|
|
209
|
+
Required for payment method `billie`.
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
street_and_number: Annotated[
|
|
213
|
+
Optional[str], pydantic.Field(alias="streetAndNumber")
|
|
214
|
+
] = None
|
|
215
|
+
r"""A street and street number.
|
|
216
|
+
|
|
217
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
218
|
+
"""
|
|
219
|
+
|
|
220
|
+
street_additional: Annotated[
|
|
221
|
+
Optional[str], pydantic.Field(alias="streetAdditional")
|
|
222
|
+
] = None
|
|
223
|
+
r"""Any additional addressing details, for example an apartment number."""
|
|
224
|
+
|
|
225
|
+
postal_code: Annotated[Optional[str], pydantic.Field(alias="postalCode")] = None
|
|
226
|
+
r"""A postal code. This field may be required if the provided country has a postal code system.
|
|
227
|
+
|
|
228
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
email: Optional[str] = None
|
|
232
|
+
r"""A valid e-mail address.
|
|
233
|
+
|
|
234
|
+
If you provide the email address for a `banktransfer` payment, we will automatically send the instructions
|
|
235
|
+
email upon payment creation. The language of the email will follow the locale parameter of the payment.
|
|
236
|
+
|
|
237
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
phone: Optional[str] = None
|
|
241
|
+
r"""If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070."""
|
|
242
|
+
|
|
243
|
+
city: Optional[str] = None
|
|
244
|
+
r"""A city name.
|
|
245
|
+
|
|
246
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
247
|
+
"""
|
|
248
|
+
|
|
249
|
+
region: Optional[str] = None
|
|
250
|
+
r"""The top-level administrative subdivision of the country. For example: Noord-Holland."""
|
|
251
|
+
|
|
252
|
+
country: Optional[str] = None
|
|
253
|
+
r"""A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
254
|
+
|
|
255
|
+
Required for payment methods `billie`, `in3`, `klarna` and `riverty`.
|
|
256
|
+
"""
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class PaymentRequestApplicationFeeTypedDict(TypedDict):
|
|
260
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
261
|
+
merchants.
|
|
262
|
+
|
|
263
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
264
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
265
|
+
to your own account balance.
|
|
266
|
+
|
|
267
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
268
|
+
`routing` parameter.
|
|
269
|
+
"""
|
|
270
|
+
|
|
271
|
+
amount: NotRequired[AmountTypedDict]
|
|
272
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
273
|
+
description: NotRequired[str]
|
|
274
|
+
r"""The description of the application fee. This will appear on settlement reports towards both you and the
|
|
275
|
+
connected merchant.
|
|
276
|
+
"""
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
class PaymentRequestApplicationFee(BaseModel):
|
|
280
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
281
|
+
merchants.
|
|
282
|
+
|
|
283
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
284
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
285
|
+
to your own account balance.
|
|
286
|
+
|
|
287
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
288
|
+
`routing` parameter.
|
|
289
|
+
"""
|
|
290
|
+
|
|
291
|
+
amount: Optional[Amount] = None
|
|
292
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
293
|
+
|
|
294
|
+
description: Optional[str] = None
|
|
295
|
+
r"""The description of the application fee. This will appear on settlement reports towards both you and the
|
|
296
|
+
connected merchant.
|
|
297
|
+
"""
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
class CompanyTypedDict(TypedDict):
|
|
301
|
+
r"""Billie is a business-to-business (B2B) payment method. It requires extra information to identify the organization
|
|
302
|
+
that is completing the payment. It is recommended to include these parameters up front for a seamless flow.
|
|
303
|
+
Otherwise, Billie will ask the customer to complete the missing fields during checkout.
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
registration_number: NotRequired[str]
|
|
307
|
+
r"""The organization's registration number."""
|
|
308
|
+
vat_number: NotRequired[str]
|
|
309
|
+
r"""The organization's VAT number."""
|
|
310
|
+
entity_type: NotRequired[str]
|
|
311
|
+
r"""The organization's entity type."""
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
class Company(BaseModel):
|
|
315
|
+
r"""Billie is a business-to-business (B2B) payment method. It requires extra information to identify the organization
|
|
316
|
+
that is completing the payment. It is recommended to include these parameters up front for a seamless flow.
|
|
317
|
+
Otherwise, Billie will ask the customer to complete the missing fields during checkout.
|
|
318
|
+
"""
|
|
319
|
+
|
|
320
|
+
registration_number: Annotated[
|
|
321
|
+
Optional[str], pydantic.Field(alias="registrationNumber")
|
|
322
|
+
] = None
|
|
323
|
+
r"""The organization's registration number."""
|
|
324
|
+
|
|
325
|
+
vat_number: Annotated[Optional[str], pydantic.Field(alias="vatNumber")] = None
|
|
326
|
+
r"""The organization's VAT number."""
|
|
327
|
+
|
|
328
|
+
entity_type: Annotated[Optional[str], pydantic.Field(alias="entityType")] = None
|
|
329
|
+
r"""The organization's entity type."""
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
class PaymentRequestTypedDict(TypedDict):
|
|
333
|
+
description: str
|
|
334
|
+
r"""The description of the payment. This will be shown to your customer on their card or bank statement when possible.
|
|
335
|
+
We truncate the description automatically according to the limits of the used payment method. The description is
|
|
336
|
+
also visible in any exports you generate.
|
|
337
|
+
|
|
338
|
+
We recommend you use a unique identifier so that you can always link the payment to the order in your back office.
|
|
339
|
+
This is particularly useful for bookkeeping.
|
|
340
|
+
|
|
341
|
+
The maximum length of the description field differs per payment method, with the absolute maximum being 255
|
|
342
|
+
characters. The API will not reject strings longer than the maximum length but it will truncate them to fit.
|
|
343
|
+
"""
|
|
344
|
+
amount: AmountTypedDict
|
|
345
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
346
|
+
redirect_url: Nullable[str]
|
|
347
|
+
r"""The URL your customer will be redirected to after the payment process.
|
|
348
|
+
|
|
349
|
+
It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
|
|
350
|
+
right page referencing the order when your customer returns.
|
|
351
|
+
|
|
352
|
+
The parameter is normally required, but can be omitted for recurring payments (`sequenceType: recurring`) and for
|
|
353
|
+
Apple Pay payments with an `applePayPaymentToken`.
|
|
354
|
+
"""
|
|
355
|
+
cancel_url: NotRequired[Nullable[str]]
|
|
356
|
+
r"""The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not
|
|
357
|
+
provided, the customer will be redirected to the `redirectUrl` instead — see above.
|
|
358
|
+
|
|
359
|
+
Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is
|
|
360
|
+
therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle
|
|
361
|
+
payment cancellations.
|
|
362
|
+
"""
|
|
363
|
+
webhook_url: NotRequired[Nullable[str]]
|
|
364
|
+
r"""The webhook URL where we will send payment status updates to.
|
|
365
|
+
|
|
366
|
+
The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment.
|
|
367
|
+
|
|
368
|
+
The webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use
|
|
369
|
+
webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your
|
|
370
|
+
local machine.
|
|
371
|
+
"""
|
|
372
|
+
lines: NotRequired[Nullable[List[PaymentRequestLineTypedDict]]]
|
|
373
|
+
r"""Optionally provide the order lines for the payment. Each line contains details such as a description of the item
|
|
374
|
+
ordered and its price.
|
|
375
|
+
|
|
376
|
+
All lines must have the same currency as the payment.
|
|
377
|
+
|
|
378
|
+
Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
|
|
379
|
+
"""
|
|
380
|
+
billing_address: NotRequired[PaymentRequestBillingAddressTypedDict]
|
|
381
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
382
|
+
conversion.
|
|
383
|
+
|
|
384
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
385
|
+
`country`.
|
|
386
|
+
|
|
387
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
388
|
+
"""
|
|
389
|
+
shipping_address: NotRequired[PaymentAddressTypedDict]
|
|
390
|
+
locale: NotRequired[Nullable[Locale]]
|
|
391
|
+
r"""Allows you to preset the language to be used."""
|
|
392
|
+
method: NotRequired[Nullable[Method]]
|
|
393
|
+
r"""Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment
|
|
394
|
+
method and your customer will skip the selection screen and is sent directly to the chosen payment method. The
|
|
395
|
+
parameter enables you to fully integrate the payment method selection into your website.
|
|
396
|
+
|
|
397
|
+
You can also specify the methods in an array. By doing so we will still show the payment method selection screen
|
|
398
|
+
but will only show the methods specified in the array. For example, you can use this functionality to only show
|
|
399
|
+
payment methods from a specific country to your customer `['bancontact', 'belfius']`.
|
|
400
|
+
"""
|
|
401
|
+
issuer: NotRequired[Nullable[str]]
|
|
402
|
+
r"""**Only relevant for iDEAL, KBC/CBC, gift card, and voucher payments.**
|
|
403
|
+
|
|
404
|
+
**⚠️ With the introduction of iDEAL 2 in 2025, this field will be ignored for iDEAL payments. For more information
|
|
405
|
+
on the migration, refer to our [help center](https://help.mollie.com/hc/articles/19100313768338-iDEAL-2-0).**
|
|
406
|
+
|
|
407
|
+
Some payment methods are a network of connected banks or card issuers. In these cases, after selecting the payment
|
|
408
|
+
method, the customer may still need to select the appropriate issuer before the payment can proceed.
|
|
409
|
+
|
|
410
|
+
We provide hosted issuer selection screens, but these screens can be skipped by providing the `issuer` via the API
|
|
411
|
+
up front.
|
|
412
|
+
|
|
413
|
+
The full list of issuers for a specific method can be retrieved via the Methods API by using the optional
|
|
414
|
+
`issuers` include.
|
|
415
|
+
|
|
416
|
+
A valid issuer for iDEAL is for example `ideal_INGBNL2A` (for ING Bank).
|
|
417
|
+
"""
|
|
418
|
+
restrict_payment_methods_to_country: NotRequired[Nullable[str]]
|
|
419
|
+
r"""For digital goods in most jurisdictions, you must apply the VAT rate from your customer's country. Choose the VAT
|
|
420
|
+
rates you have used for the order to ensure your customer's country matches the VAT country.
|
|
421
|
+
|
|
422
|
+
Use this parameter to restrict the payment methods available to your customer to those from a single country.
|
|
423
|
+
|
|
424
|
+
If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
|
|
425
|
+
|
|
426
|
+
The field expects a country code in ISO 3166-1 alpha-2 format, for example `NL`.
|
|
427
|
+
"""
|
|
428
|
+
metadata: NotRequired[Nullable[MetadataTypedDict]]
|
|
429
|
+
r"""Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever
|
|
430
|
+
you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
|
|
431
|
+
"""
|
|
432
|
+
capture_mode: NotRequired[Nullable[CaptureMode]]
|
|
433
|
+
r"""Indicate if the funds should be captured immediately or if you want to [place a hold](https://docs.mollie.com/docs/place-a-hold-for-a-payment#/)
|
|
434
|
+
and capture at a later time.
|
|
435
|
+
|
|
436
|
+
This field needs to be set to `manual` for method `riverty`.
|
|
437
|
+
"""
|
|
438
|
+
capture_delay: NotRequired[Nullable[str]]
|
|
439
|
+
r"""**Only relevant if you wish to manage authorization and capturing separately.**
|
|
440
|
+
|
|
441
|
+
Some payment methods allow placing a hold on the card or bank account. This hold or 'authorization' can then at a
|
|
442
|
+
later point either be 'captured' or canceled.
|
|
443
|
+
|
|
444
|
+
By default, we charge the customer's card or bank account immediately when they complete the payment. If you set a
|
|
445
|
+
capture delay however, we will delay the automatic capturing of the payment for the specified amount of time. For
|
|
446
|
+
example `8 hours` or `2 days`.
|
|
447
|
+
|
|
448
|
+
To schedule an automatic capture, the `captureMode` must be set to `automatic`.
|
|
449
|
+
|
|
450
|
+
The maximum delay is 7 days (168 hours).
|
|
451
|
+
|
|
452
|
+
Possible values: `... hours` `... days`
|
|
453
|
+
"""
|
|
454
|
+
application_fee: NotRequired[Nullable[PaymentRequestApplicationFeeTypedDict]]
|
|
455
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
456
|
+
merchants.
|
|
457
|
+
|
|
458
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
459
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
460
|
+
to your own account balance.
|
|
461
|
+
|
|
462
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
463
|
+
`routing` parameter.
|
|
464
|
+
"""
|
|
465
|
+
routing: NotRequired[Nullable[List[EntityPaymentRouteTypedDict]]]
|
|
466
|
+
r"""*This functionality is not enabled by default. Reach out to our partner management team if you wish to use it.*
|
|
467
|
+
|
|
468
|
+
With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
469
|
+
merchants.
|
|
470
|
+
|
|
471
|
+
If you create payments on your own account that you want to split between yourself and one or more connected
|
|
472
|
+
merchants, you can use this `routing` parameter to route the payment accordingly.
|
|
473
|
+
|
|
474
|
+
The `routing` parameter should contain an array of objects, with each object describing the destination for a
|
|
475
|
+
specific portion of the payment.
|
|
476
|
+
|
|
477
|
+
It is not necessary to indicate in the array which portion goes to yourself. After all portions of the total
|
|
478
|
+
payment amount have been routed, the amount left will be routed to the current organization automatically.
|
|
479
|
+
|
|
480
|
+
If instead you use OAuth to create payments on a connected merchant's account, refer to the `applicationFee`
|
|
481
|
+
parameter.
|
|
482
|
+
"""
|
|
483
|
+
sequence_type: NotRequired[SequenceType]
|
|
484
|
+
mandate_id: NotRequired[Nullable[str]]
|
|
485
|
+
r"""**Only relevant for recurring payments.**
|
|
486
|
+
|
|
487
|
+
When creating recurring payments, the ID of a specific [mandate](get-mandate) can be supplied to indicate which of
|
|
488
|
+
the customer's accounts should be credited.
|
|
489
|
+
"""
|
|
490
|
+
customer_id: NotRequired[str]
|
|
491
|
+
profile_id: NotRequired[str]
|
|
492
|
+
r"""The identifier referring to the [profile](get-profile) this entity belongs to.
|
|
493
|
+
|
|
494
|
+
Most API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation
|
|
495
|
+
request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is
|
|
496
|
+
required.
|
|
497
|
+
"""
|
|
498
|
+
due_date: NotRequired[str]
|
|
499
|
+
r"""The date by which the payment should be completed in `YYYY-MM-DD` format"""
|
|
500
|
+
testmode: NotRequired[Nullable[bool]]
|
|
501
|
+
r"""Whether to create the entity in test mode or live mode.
|
|
502
|
+
|
|
503
|
+
Most API credentials are specifically created for either live mode or test mode, in which case this parameter can be
|
|
504
|
+
omitted. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting
|
|
505
|
+
`testmode` to `true`.
|
|
506
|
+
"""
|
|
507
|
+
apple_pay_payment_token: NotRequired[str]
|
|
508
|
+
r"""The Apple Pay Payment token object (encoded as JSON) that is part of the result of authorizing a payment request.
|
|
509
|
+
The token contains the payment information needed to authorize the payment.
|
|
510
|
+
|
|
511
|
+
The object should be passed encoded in a JSON string.
|
|
512
|
+
"""
|
|
513
|
+
company: NotRequired[CompanyTypedDict]
|
|
514
|
+
r"""Billie is a business-to-business (B2B) payment method. It requires extra information to identify the organization
|
|
515
|
+
that is completing the payment. It is recommended to include these parameters up front for a seamless flow.
|
|
516
|
+
Otherwise, Billie will ask the customer to complete the missing fields during checkout.
|
|
517
|
+
"""
|
|
518
|
+
card_token: NotRequired[str]
|
|
519
|
+
r"""When creating credit card payments using Mollie Components, you need to provide the card token you received from
|
|
520
|
+
the card component in this field. The token represents the customer's card information needed to complete the
|
|
521
|
+
payment. Note: field only valid for oneoff and first payments. For recurring payments, the customerId alone is
|
|
522
|
+
enough.
|
|
523
|
+
"""
|
|
524
|
+
voucher_number: NotRequired[str]
|
|
525
|
+
r"""The card token you received from the card component of Mollie Components. The token represents the customer's card
|
|
526
|
+
information needed to complete the payment.
|
|
527
|
+
"""
|
|
528
|
+
voucher_pin: NotRequired[str]
|
|
529
|
+
r"""The PIN on the gift card. You can supply this to prefill the PIN, if the card has any."""
|
|
530
|
+
consumer_date_of_birth: NotRequired[date]
|
|
531
|
+
r"""The customer's date of birth. If not provided via the API, iDeal in3 will ask the customer to provide it during
|
|
532
|
+
the payment process.
|
|
533
|
+
"""
|
|
534
|
+
extra_merchant_data: NotRequired[Dict[str, Any]]
|
|
535
|
+
r"""For some industries, additional purchase information can be sent to Klarna to increase the authorization rate.
|
|
536
|
+
You can submit your extra data in this field if you have agreed upon this with Klarna. This field should be an
|
|
537
|
+
object containing any of the allowed keys and sub-objects described at the Klarna Developer Documentation.
|
|
538
|
+
"""
|
|
539
|
+
session_id: NotRequired[str]
|
|
540
|
+
r"""The unique ID you have used for the PayPal fraud library. You should include this if you use PayPal for an
|
|
541
|
+
on-demand payment.
|
|
542
|
+
"""
|
|
543
|
+
digital_goods: NotRequired[bool]
|
|
544
|
+
r"""Indicate if you are about to deliver digital goods, such as for example a software license. Setting this parameter
|
|
545
|
+
can have consequences for your PayPal Seller Protection. Refer to PayPal's documentation for more information.
|
|
546
|
+
"""
|
|
547
|
+
customer_reference: NotRequired[str]
|
|
548
|
+
r"""Used by paysafecard for customer identification across payments. When you generate a customer reference yourself,
|
|
549
|
+
make sure not to put personal identifiable information or IP addresses in the customer reference directly.
|
|
550
|
+
"""
|
|
551
|
+
terminal_id: NotRequired[str]
|
|
552
|
+
r"""The ID of the terminal device where you want to initiate the payment on."""
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
class PaymentRequest(BaseModel):
|
|
556
|
+
description: str
|
|
557
|
+
r"""The description of the payment. This will be shown to your customer on their card or bank statement when possible.
|
|
558
|
+
We truncate the description automatically according to the limits of the used payment method. The description is
|
|
559
|
+
also visible in any exports you generate.
|
|
560
|
+
|
|
561
|
+
We recommend you use a unique identifier so that you can always link the payment to the order in your back office.
|
|
562
|
+
This is particularly useful for bookkeeping.
|
|
563
|
+
|
|
564
|
+
The maximum length of the description field differs per payment method, with the absolute maximum being 255
|
|
565
|
+
characters. The API will not reject strings longer than the maximum length but it will truncate them to fit.
|
|
566
|
+
"""
|
|
567
|
+
|
|
568
|
+
amount: Amount
|
|
569
|
+
r"""In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field."""
|
|
570
|
+
|
|
571
|
+
redirect_url: Annotated[Nullable[str], pydantic.Field(alias="redirectUrl")]
|
|
572
|
+
r"""The URL your customer will be redirected to after the payment process.
|
|
573
|
+
|
|
574
|
+
It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
|
|
575
|
+
right page referencing the order when your customer returns.
|
|
576
|
+
|
|
577
|
+
The parameter is normally required, but can be omitted for recurring payments (`sequenceType: recurring`) and for
|
|
578
|
+
Apple Pay payments with an `applePayPaymentToken`.
|
|
579
|
+
"""
|
|
580
|
+
|
|
581
|
+
cancel_url: Annotated[OptionalNullable[str], pydantic.Field(alias="cancelUrl")] = (
|
|
582
|
+
UNSET
|
|
583
|
+
)
|
|
584
|
+
r"""The URL your customer will be redirected to when the customer explicitly cancels the payment. If this URL is not
|
|
585
|
+
provided, the customer will be redirected to the `redirectUrl` instead — see above.
|
|
586
|
+
|
|
587
|
+
Mollie will always give you status updates via webhooks, including for the canceled status. This parameter is
|
|
588
|
+
therefore entirely optional, but can be useful when implementing a dedicated customer-facing flow to handle
|
|
589
|
+
payment cancellations.
|
|
590
|
+
"""
|
|
591
|
+
|
|
592
|
+
webhook_url: Annotated[
|
|
593
|
+
OptionalNullable[str], pydantic.Field(alias="webhookUrl")
|
|
594
|
+
] = UNSET
|
|
595
|
+
r"""The webhook URL where we will send payment status updates to.
|
|
596
|
+
|
|
597
|
+
The webhookUrl is optional, but without a webhook you will miss out on important status changes to your payment.
|
|
598
|
+
|
|
599
|
+
The webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use
|
|
600
|
+
webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your
|
|
601
|
+
local machine.
|
|
602
|
+
"""
|
|
603
|
+
|
|
604
|
+
lines: OptionalNullable[List[PaymentRequestLine]] = UNSET
|
|
605
|
+
r"""Optionally provide the order lines for the payment. Each line contains details such as a description of the item
|
|
606
|
+
ordered and its price.
|
|
607
|
+
|
|
608
|
+
All lines must have the same currency as the payment.
|
|
609
|
+
|
|
610
|
+
Required for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.
|
|
611
|
+
"""
|
|
612
|
+
|
|
613
|
+
billing_address: Annotated[
|
|
614
|
+
Optional[PaymentRequestBillingAddress], pydantic.Field(alias="billingAddress")
|
|
615
|
+
] = None
|
|
616
|
+
r"""The customer's billing address details. We advise to provide these details to improve fraud protection and
|
|
617
|
+
conversion.
|
|
618
|
+
|
|
619
|
+
Should include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and
|
|
620
|
+
`country`.
|
|
621
|
+
|
|
622
|
+
Required for payment method `in3`, `klarna`, `billie` and `riverty`.
|
|
623
|
+
"""
|
|
624
|
+
|
|
625
|
+
shipping_address: Annotated[
|
|
626
|
+
Optional[PaymentAddress], pydantic.Field(alias="shippingAddress")
|
|
627
|
+
] = None
|
|
628
|
+
|
|
629
|
+
locale: OptionalNullable[Locale] = UNSET
|
|
630
|
+
r"""Allows you to preset the language to be used."""
|
|
631
|
+
|
|
632
|
+
method: OptionalNullable[Method] = UNSET
|
|
633
|
+
r"""Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment
|
|
634
|
+
method and your customer will skip the selection screen and is sent directly to the chosen payment method. The
|
|
635
|
+
parameter enables you to fully integrate the payment method selection into your website.
|
|
636
|
+
|
|
637
|
+
You can also specify the methods in an array. By doing so we will still show the payment method selection screen
|
|
638
|
+
but will only show the methods specified in the array. For example, you can use this functionality to only show
|
|
639
|
+
payment methods from a specific country to your customer `['bancontact', 'belfius']`.
|
|
640
|
+
"""
|
|
641
|
+
|
|
642
|
+
issuer: OptionalNullable[str] = UNSET
|
|
643
|
+
r"""**Only relevant for iDEAL, KBC/CBC, gift card, and voucher payments.**
|
|
644
|
+
|
|
645
|
+
**⚠️ With the introduction of iDEAL 2 in 2025, this field will be ignored for iDEAL payments. For more information
|
|
646
|
+
on the migration, refer to our [help center](https://help.mollie.com/hc/articles/19100313768338-iDEAL-2-0).**
|
|
647
|
+
|
|
648
|
+
Some payment methods are a network of connected banks or card issuers. In these cases, after selecting the payment
|
|
649
|
+
method, the customer may still need to select the appropriate issuer before the payment can proceed.
|
|
650
|
+
|
|
651
|
+
We provide hosted issuer selection screens, but these screens can be skipped by providing the `issuer` via the API
|
|
652
|
+
up front.
|
|
653
|
+
|
|
654
|
+
The full list of issuers for a specific method can be retrieved via the Methods API by using the optional
|
|
655
|
+
`issuers` include.
|
|
656
|
+
|
|
657
|
+
A valid issuer for iDEAL is for example `ideal_INGBNL2A` (for ING Bank).
|
|
658
|
+
"""
|
|
659
|
+
|
|
660
|
+
restrict_payment_methods_to_country: Annotated[
|
|
661
|
+
OptionalNullable[str], pydantic.Field(alias="restrictPaymentMethodsToCountry")
|
|
662
|
+
] = UNSET
|
|
663
|
+
r"""For digital goods in most jurisdictions, you must apply the VAT rate from your customer's country. Choose the VAT
|
|
664
|
+
rates you have used for the order to ensure your customer's country matches the VAT country.
|
|
665
|
+
|
|
666
|
+
Use this parameter to restrict the payment methods available to your customer to those from a single country.
|
|
667
|
+
|
|
668
|
+
If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
|
|
669
|
+
|
|
670
|
+
The field expects a country code in ISO 3166-1 alpha-2 format, for example `NL`.
|
|
671
|
+
"""
|
|
672
|
+
|
|
673
|
+
metadata: OptionalNullable[Metadata] = UNSET
|
|
674
|
+
r"""Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever
|
|
675
|
+
you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
|
|
676
|
+
"""
|
|
677
|
+
|
|
678
|
+
capture_mode: Annotated[
|
|
679
|
+
OptionalNullable[CaptureMode], pydantic.Field(alias="captureMode")
|
|
680
|
+
] = UNSET
|
|
681
|
+
r"""Indicate if the funds should be captured immediately or if you want to [place a hold](https://docs.mollie.com/docs/place-a-hold-for-a-payment#/)
|
|
682
|
+
and capture at a later time.
|
|
683
|
+
|
|
684
|
+
This field needs to be set to `manual` for method `riverty`.
|
|
685
|
+
"""
|
|
686
|
+
|
|
687
|
+
capture_delay: Annotated[
|
|
688
|
+
OptionalNullable[str], pydantic.Field(alias="captureDelay")
|
|
689
|
+
] = UNSET
|
|
690
|
+
r"""**Only relevant if you wish to manage authorization and capturing separately.**
|
|
691
|
+
|
|
692
|
+
Some payment methods allow placing a hold on the card or bank account. This hold or 'authorization' can then at a
|
|
693
|
+
later point either be 'captured' or canceled.
|
|
694
|
+
|
|
695
|
+
By default, we charge the customer's card or bank account immediately when they complete the payment. If you set a
|
|
696
|
+
capture delay however, we will delay the automatic capturing of the payment for the specified amount of time. For
|
|
697
|
+
example `8 hours` or `2 days`.
|
|
698
|
+
|
|
699
|
+
To schedule an automatic capture, the `captureMode` must be set to `automatic`.
|
|
700
|
+
|
|
701
|
+
The maximum delay is 7 days (168 hours).
|
|
702
|
+
|
|
703
|
+
Possible values: `... hours` `... days`
|
|
704
|
+
"""
|
|
705
|
+
|
|
706
|
+
application_fee: Annotated[
|
|
707
|
+
OptionalNullable[PaymentRequestApplicationFee],
|
|
708
|
+
pydantic.Field(alias="applicationFee"),
|
|
709
|
+
] = UNSET
|
|
710
|
+
r"""With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
711
|
+
merchants.
|
|
712
|
+
|
|
713
|
+
If you use OAuth to create payments on a connected merchant's account, you can charge a fee using this
|
|
714
|
+
`applicationFee` parameter. If the payment succeeds, the fee will be deducted from the merchant's balance and sent
|
|
715
|
+
to your own account balance.
|
|
716
|
+
|
|
717
|
+
If instead you want to split a payment on your own account between yourself and a connected merchant, refer to the
|
|
718
|
+
`routing` parameter.
|
|
719
|
+
"""
|
|
720
|
+
|
|
721
|
+
routing: OptionalNullable[List[EntityPaymentRoute]] = UNSET
|
|
722
|
+
r"""*This functionality is not enabled by default. Reach out to our partner management team if you wish to use it.*
|
|
723
|
+
|
|
724
|
+
With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
|
|
725
|
+
merchants.
|
|
726
|
+
|
|
727
|
+
If you create payments on your own account that you want to split between yourself and one or more connected
|
|
728
|
+
merchants, you can use this `routing` parameter to route the payment accordingly.
|
|
729
|
+
|
|
730
|
+
The `routing` parameter should contain an array of objects, with each object describing the destination for a
|
|
731
|
+
specific portion of the payment.
|
|
732
|
+
|
|
733
|
+
It is not necessary to indicate in the array which portion goes to yourself. After all portions of the total
|
|
734
|
+
payment amount have been routed, the amount left will be routed to the current organization automatically.
|
|
735
|
+
|
|
736
|
+
If instead you use OAuth to create payments on a connected merchant's account, refer to the `applicationFee`
|
|
737
|
+
parameter.
|
|
738
|
+
"""
|
|
739
|
+
|
|
740
|
+
sequence_type: Annotated[
|
|
741
|
+
Optional[SequenceType], pydantic.Field(alias="sequenceType")
|
|
742
|
+
] = None
|
|
743
|
+
|
|
744
|
+
mandate_id: Annotated[OptionalNullable[str], pydantic.Field(alias="mandateId")] = (
|
|
745
|
+
UNSET
|
|
746
|
+
)
|
|
747
|
+
r"""**Only relevant for recurring payments.**
|
|
748
|
+
|
|
749
|
+
When creating recurring payments, the ID of a specific [mandate](get-mandate) can be supplied to indicate which of
|
|
750
|
+
the customer's accounts should be credited.
|
|
751
|
+
"""
|
|
752
|
+
|
|
753
|
+
customer_id: Annotated[Optional[str], pydantic.Field(alias="customerId")] = None
|
|
754
|
+
|
|
755
|
+
profile_id: Annotated[Optional[str], pydantic.Field(alias="profileId")] = None
|
|
756
|
+
r"""The identifier referring to the [profile](get-profile) this entity belongs to.
|
|
757
|
+
|
|
758
|
+
Most API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation
|
|
759
|
+
request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is
|
|
760
|
+
required.
|
|
761
|
+
"""
|
|
762
|
+
|
|
763
|
+
due_date: Annotated[Optional[str], pydantic.Field(alias="dueDate")] = None
|
|
764
|
+
r"""The date by which the payment should be completed in `YYYY-MM-DD` format"""
|
|
765
|
+
|
|
766
|
+
testmode: OptionalNullable[bool] = UNSET
|
|
767
|
+
r"""Whether to create the entity in test mode or live mode.
|
|
768
|
+
|
|
769
|
+
Most API credentials are specifically created for either live mode or test mode, in which case this parameter can be
|
|
770
|
+
omitted. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting
|
|
771
|
+
`testmode` to `true`.
|
|
772
|
+
"""
|
|
773
|
+
|
|
774
|
+
apple_pay_payment_token: Annotated[
|
|
775
|
+
Optional[str], pydantic.Field(alias="applePayPaymentToken")
|
|
776
|
+
] = None
|
|
777
|
+
r"""The Apple Pay Payment token object (encoded as JSON) that is part of the result of authorizing a payment request.
|
|
778
|
+
The token contains the payment information needed to authorize the payment.
|
|
779
|
+
|
|
780
|
+
The object should be passed encoded in a JSON string.
|
|
781
|
+
"""
|
|
782
|
+
|
|
783
|
+
company: Optional[Company] = None
|
|
784
|
+
r"""Billie is a business-to-business (B2B) payment method. It requires extra information to identify the organization
|
|
785
|
+
that is completing the payment. It is recommended to include these parameters up front for a seamless flow.
|
|
786
|
+
Otherwise, Billie will ask the customer to complete the missing fields during checkout.
|
|
787
|
+
"""
|
|
788
|
+
|
|
789
|
+
card_token: Annotated[Optional[str], pydantic.Field(alias="cardToken")] = None
|
|
790
|
+
r"""When creating credit card payments using Mollie Components, you need to provide the card token you received from
|
|
791
|
+
the card component in this field. The token represents the customer's card information needed to complete the
|
|
792
|
+
payment. Note: field only valid for oneoff and first payments. For recurring payments, the customerId alone is
|
|
793
|
+
enough.
|
|
794
|
+
"""
|
|
795
|
+
|
|
796
|
+
voucher_number: Annotated[Optional[str], pydantic.Field(alias="voucherNumber")] = (
|
|
797
|
+
None
|
|
798
|
+
)
|
|
799
|
+
r"""The card token you received from the card component of Mollie Components. The token represents the customer's card
|
|
800
|
+
information needed to complete the payment.
|
|
801
|
+
"""
|
|
802
|
+
|
|
803
|
+
voucher_pin: Annotated[Optional[str], pydantic.Field(alias="voucherPin")] = None
|
|
804
|
+
r"""The PIN on the gift card. You can supply this to prefill the PIN, if the card has any."""
|
|
805
|
+
|
|
806
|
+
consumer_date_of_birth: Annotated[
|
|
807
|
+
Optional[date], pydantic.Field(alias="consumerDateOfBirth")
|
|
808
|
+
] = None
|
|
809
|
+
r"""The customer's date of birth. If not provided via the API, iDeal in3 will ask the customer to provide it during
|
|
810
|
+
the payment process.
|
|
811
|
+
"""
|
|
812
|
+
|
|
813
|
+
extra_merchant_data: Annotated[
|
|
814
|
+
Optional[Dict[str, Any]], pydantic.Field(alias="extraMerchantData")
|
|
815
|
+
] = None
|
|
816
|
+
r"""For some industries, additional purchase information can be sent to Klarna to increase the authorization rate.
|
|
817
|
+
You can submit your extra data in this field if you have agreed upon this with Klarna. This field should be an
|
|
818
|
+
object containing any of the allowed keys and sub-objects described at the Klarna Developer Documentation.
|
|
819
|
+
"""
|
|
820
|
+
|
|
821
|
+
session_id: Annotated[Optional[str], pydantic.Field(alias="sessionId")] = None
|
|
822
|
+
r"""The unique ID you have used for the PayPal fraud library. You should include this if you use PayPal for an
|
|
823
|
+
on-demand payment.
|
|
824
|
+
"""
|
|
825
|
+
|
|
826
|
+
digital_goods: Annotated[Optional[bool], pydantic.Field(alias="digitalGoods")] = (
|
|
827
|
+
None
|
|
828
|
+
)
|
|
829
|
+
r"""Indicate if you are about to deliver digital goods, such as for example a software license. Setting this parameter
|
|
830
|
+
can have consequences for your PayPal Seller Protection. Refer to PayPal's documentation for more information.
|
|
831
|
+
"""
|
|
832
|
+
|
|
833
|
+
customer_reference: Annotated[
|
|
834
|
+
Optional[str], pydantic.Field(alias="customerReference")
|
|
835
|
+
] = None
|
|
836
|
+
r"""Used by paysafecard for customer identification across payments. When you generate a customer reference yourself,
|
|
837
|
+
make sure not to put personal identifiable information or IP addresses in the customer reference directly.
|
|
838
|
+
"""
|
|
839
|
+
|
|
840
|
+
terminal_id: Annotated[Optional[str], pydantic.Field(alias="terminalId")] = None
|
|
841
|
+
r"""The ID of the terminal device where you want to initiate the payment on."""
|
|
842
|
+
|
|
843
|
+
@model_serializer(mode="wrap")
|
|
844
|
+
def serialize_model(self, handler):
|
|
845
|
+
optional_fields = [
|
|
846
|
+
"cancelUrl",
|
|
847
|
+
"webhookUrl",
|
|
848
|
+
"lines",
|
|
849
|
+
"billingAddress",
|
|
850
|
+
"shippingAddress",
|
|
851
|
+
"locale",
|
|
852
|
+
"method",
|
|
853
|
+
"issuer",
|
|
854
|
+
"restrictPaymentMethodsToCountry",
|
|
855
|
+
"metadata",
|
|
856
|
+
"captureMode",
|
|
857
|
+
"captureDelay",
|
|
858
|
+
"applicationFee",
|
|
859
|
+
"routing",
|
|
860
|
+
"sequenceType",
|
|
861
|
+
"mandateId",
|
|
862
|
+
"customerId",
|
|
863
|
+
"profileId",
|
|
864
|
+
"dueDate",
|
|
865
|
+
"testmode",
|
|
866
|
+
"applePayPaymentToken",
|
|
867
|
+
"company",
|
|
868
|
+
"cardToken",
|
|
869
|
+
"voucherNumber",
|
|
870
|
+
"voucherPin",
|
|
871
|
+
"consumerDateOfBirth",
|
|
872
|
+
"extraMerchantData",
|
|
873
|
+
"sessionId",
|
|
874
|
+
"digitalGoods",
|
|
875
|
+
"customerReference",
|
|
876
|
+
"terminalId",
|
|
877
|
+
]
|
|
878
|
+
nullable_fields = [
|
|
879
|
+
"redirectUrl",
|
|
880
|
+
"cancelUrl",
|
|
881
|
+
"webhookUrl",
|
|
882
|
+
"lines",
|
|
883
|
+
"locale",
|
|
884
|
+
"method",
|
|
885
|
+
"issuer",
|
|
886
|
+
"restrictPaymentMethodsToCountry",
|
|
887
|
+
"metadata",
|
|
888
|
+
"captureMode",
|
|
889
|
+
"captureDelay",
|
|
890
|
+
"applicationFee",
|
|
891
|
+
"routing",
|
|
892
|
+
"mandateId",
|
|
893
|
+
"testmode",
|
|
894
|
+
]
|
|
895
|
+
null_default_fields = []
|
|
896
|
+
|
|
897
|
+
serialized = handler(self)
|
|
898
|
+
|
|
899
|
+
m = {}
|
|
900
|
+
|
|
901
|
+
for n, f in type(self).model_fields.items():
|
|
902
|
+
k = f.alias or n
|
|
903
|
+
val = serialized.get(k)
|
|
904
|
+
serialized.pop(k, None)
|
|
905
|
+
|
|
906
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
907
|
+
is_set = (
|
|
908
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
909
|
+
or k in null_default_fields
|
|
910
|
+
) # pylint: disable=no-member
|
|
911
|
+
|
|
912
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
913
|
+
m[k] = val
|
|
914
|
+
elif val != UNSET_SENTINEL and (
|
|
915
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
916
|
+
):
|
|
917
|
+
m[k] = val
|
|
918
|
+
|
|
919
|
+
return m
|