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 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 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)