ConsoleUser
Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com
This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.
All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.
- class PaymentsImpl.PaymentsImpl(system, config)¶
This class is the parent for classes that interact with digital payments.
Parameters:
system: a <no title> object to communicate with the target system
config: a <no title> object defining this user
- check_balance()¶
Have the user check their current balance. This may return the balance if it is available, or None if it is not known.
Return: a float representing the current balance if it can be determined or None if it cannot be determined
- request_payment(recip, amount)¶
request a new payment of the given amount to the identified recipient.
Parameters:
recip: the string to enter as the recipient of the payment request
amount: the string to enter as the amount
- send_payment(recip, amount)¶
Send a new payment of the given amount to the identified recipient.
Parameters:
recip: the string to enter as the recipient of the payment
amount: the string to enter as the amount
- PaymentsImpl.get_payment_client(system, config, payment_type=None)¶
This is the Factory_ method which creates concrete instance of PaymentsImpl to control an actual method of managing digital payments.
Parameters:
system: a <no title> object which connects to the system on which the client runs
config: a <no title> object containing this ConsoleUser’s config info
payment_type: optionally the type of the client to create, overriding anything in config
Return: an instance of a class that implements the PaymentsImpl interface or None if there is no known type matching the desired type