Closed CharlPels closed 6 years ago
I think this says enough ? :)
Closing as this is not a bug or feature request. Feel free to continue commenting.
Thanks Kevin,
issue solved, and for others this may help them
for the core part i added this
from bunq.sdk.model import core
then 2 classes
class Pointer(core.BunqModel):
"""
:param type_: The alias type, can be: EMAIL|PHONE_NUMBER|IBAN.
:type type_: str
:param value: The alias value.
:type value: str
:param name: The alias name.
:type name: str
"""
def __init__(self, type_=None, value=None, name=None):
"""
:param type_: The alias type, can be: EMAIL|PHONE_NUMBER|IBAN.
:type type_: str
:param value: The alias value. Phone number are formatted conform E.123
without spaces (e.g., +314211234567).
:type value: str
:param name: The alias name. Only required for IBANs.
:type name: str
"""
self.type_ = type_
self.value = value
self.name = name
class Amount(core.BunqModel):
def __init__(self, value=None, currency=None):
self.value = value
self.currency = currency
Here is my payment function
def Payment(_PAYMENT_AMOUNT,_COUNTERPARTY_IBAN,_COUNTERPARTY_NAME,_PAYMENT_DESCRIPTION,_MONETARY_ACCOUNT_ITEM_ID):
endpoint.Payment.create(
amount=Amount(_PAYMENT_AMOUNT, "EUR"),
counterparty_alias=Pointer("IBAN",_COUNTERPARTY_IBAN,_COUNTERPARTY_NAME),
description=_PAYMENT_DESCRIPTION,
monetary_account_id=_MONETARY_ACCOUNT_ITEM_ID
)
In issue #12 a solution was given for sending money to IBAN numbers, this is no longer working for the new SDK. Would love to know how to do the same in the with the new sdk,
thinker sample is only for sending to email