def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option(all_option) ShareLib.print_header() bunq = BunqLib(environment_type) callback_url = ShareLib.determine_callback_url_from_all_option_or_std_in(all_option) print(f''' | Adding Callback URL: {callback_url} ... ''') bunq.add_callback_url(callback_url) print(''' | ✅ Callback URL added | ▶ Check your changed overview ''') bunq.update_context()
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option( all_option) ShareLib.print_header() bunq = BunqLib(environment_type) user = bunq.get_current_user() user_discounts = UserDiscounts() discounts = user_discounts.get_discounts() database = DbHelper() Thread(target=refresh_database, args=(bunq, discounts)).start() # all_request = bunq.get_all_request(1) # ShareLib.print_all_request(all_request) # # all_card = bunq.get_all_card(1) # ShareLib.print_all_card(all_card, all_monetary_account_bank_active) # # if environment_type is ApiEnvironmentType.SANDBOX: # all_alias = bunq.get_all_user_alias() # ShareLib.print_all_user_alias(all_alias) # # bunq.update_context() socketio.run(app, debug=True, port=5000)
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option(all_option) ShareLib.print_header() bunq = BunqLib(environment_type) for i in range(1): amount, description, geolocation = generate_random_entry() print(amount, description, geolocation) recipient = "*****@*****.**" bunq.make_payment(str(amount), description, recipient, geolocation=geolocation) time.sleep(1)
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option( all_option) ShareLib.print_header() bunq = BunqLib(environment_type) amount = ShareLib.determine_amount_from_all_option_or_std_in(all_option) description = ShareLib.determine_description_from_all_option_or_std_in( all_option) recipient = ShareLib.determine_recipient_from_all_option_or_std_in( all_option) print(f''' | Requesting: € {amount} | From: {recipient} | Description: {description} ... ''') bunq.make_request(amount, description, recipient) print(''' | ✅ Request sent | ▶ Check your changed overview ''') bunq.update_context()
def make_payment_w_discount(amount, description, recipient, discounts): """ Wrapper around bunq `make_payment` function. Calculates the discount specific to a user. """ all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option( all_option) ShareLib.print_header() bunq = BunqLib(environment_type) shop, user_discount = determine_discount(description, discounts) * amount # Request data from sugar daddy (advance payment) bunq.make_request(user_discount, "-".join("ADVANCE", shop, user_discount), "*****@*****.**") # Make actual payment to the shop bunq.make_payment(amount - user_discount, description, recipient)
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option(all_option) ShareLib.print_header() bunq = BunqLib(environment_type) account_id = ShareLib.determine_account_id_from_all_option_or_std_in(all_option) name = ShareLib.determine_name_from_all_option_or_std_in(all_option) print(f''' | Updating Name: {name} | of Account: {account_id} ... ''') bunq.update_account(name, account_id) print(''' | ✅ Account updated | ▶ Check your changed overview ''') bunq.update_context()
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option(all_option) ShareLib.print_header() bunq = BunqLib(environment_type) card_id = ShareLib.determine_card_id_from_all_option_or_std_in(all_option) account_id = ShareLib.determine_account_id_from_all_option_or_std_in(all_option) print(f''' | Link Card: {card_id} | To Account: {account_id} ... ''') bunq.link_card(card_id, account_id) print(''' | ✅ Account switched | ▶ Check your changed overview ''') bunq.update_context()
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option(all_option) ShareLib.print_header() bunq = BunqLib(environment_type) bunq.make_request("500", "none", "*****@*****.**") all_request = bunq.get_all_request(10) ShareLib.print_all_request(all_request) bunq.update_context()
def main(): all_option = ShareLib.parse_all_option() environment_type = ShareLib.determine_environment_type_from_all_option( all_option) ShareLib.print_header() bunq = BunqLib(environment_type) user = bunq.get_current_user() ShareLib.print_user(user) all_monetary_account_bank_active = bunq.get_all_monetary_account_active(1) ShareLib.print_all_monetary_account_bank(all_monetary_account_bank_active) all_payment = bunq.get_all_payment(10) ShareLib.print_all_payment(all_payment) all_request = bunq.get_all_request(1) ShareLib.print_all_request(all_request) all_card = bunq.get_all_card(1) ShareLib.print_all_card(all_card, all_monetary_account_bank_active) if environment_type is ApiEnvironmentType.SANDBOX: all_alias = bunq.get_all_user_alias() ShareLib.print_all_user_alias(all_alias) bunq.update_context() print(""" Want to see more monetary accounts, payments, requests or even cards? Adjust this file. """)