Bastiaan Sure thing! FYI: I'm toggling the all_option.production boolean... to switch between sandbox and production. I only wrote the function add_note_text_payment myself, the rest is from Tinker.
def main(line_items=None):
"""Initialization"""
all_option = ShareLib.parse_all_option()
all_option.production = False
environment_type = ShareLib.determine_environment_type_from_all_option(all_option)
bunq = BunqLib(environment_type)
"""Get latest payment"""
all_payment = bunq.get_all_payment(1)
latest_payment = all_payment[0]
payment_id = latest_payment.id_
"""Add text note to payment"""
description = ("Description")
bunq.add_note_text_payment(payment_id,description)
bunq.update_context()
def add_note_text_payment(self, payment_id, content):
endpoint.NoteTextPayment.create(
payment_id=payment_id,
content=content
)