Package co.dapi
Class Payment.Transfer
java.lang.Object
co.dapi.Payment.Transfer
- Enclosing class:
- Payment
public static class Payment.Transfer
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Transfer(java.lang.String senderID, float amount, java.lang.String receiverID)Create an object that holds the info for a transfer from a bank that requires the receiver to be already registered as a beneficiary to perform a transaction.Transfer(java.lang.String senderID, float amount, java.lang.String name, java.lang.String iban, java.lang.String accountNumber)Create an object that holds the info for a transfer from a bank that handles the creation of beneficiaries on its own, internally, and doesn't require the receiver to be already registered as a beneficiary to perform a transaction. -
Method Summary
Modifier and Type Method Description java.util.Optional<java.lang.String>getAccountNumber()floatgetAmount()java.util.Optional<java.lang.String>getIban()java.util.Optional<java.lang.String>getName()java.util.Optional<java.lang.String>getReceiverID()java.lang.StringgetSenderID()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Transfer
public Transfer(java.lang.String senderID, float amount, java.lang.String receiverID)Create an object that holds the info for a transfer from a bank that requires the receiver to be already registered as a beneficiary to perform a transaction.- Parameters:
senderID- the id of the account which the money should be sent from. retrieved from one of the accounts array returned from the getAccounts method.amount- the amount of money which should be sent.receiverID- the id of the beneficiary which the money should be sent to. retrieved from one of the beneficiaries array returned from the getBeneficiaries method.
-
Transfer
public Transfer(java.lang.String senderID, float amount, java.lang.String name, java.lang.String iban, java.lang.String accountNumber)Create an object that holds the info for a transfer from a bank that handles the creation of beneficiaries on its own, internally, and doesn't require the receiver to be already registered as a beneficiary to perform a transaction.- Parameters:
senderID- the id of the account which the money should be sent from. retrieved from one of the accounts array returned from the getAccounts method.amount- the amount of money which should be sent.name- the name of receiver.iban- the IBAN of the receiver's account.accountNumber- the Account Number of the receiver's account.
-
-
Method Details
-
getSenderID
public java.lang.String getSenderID() -
getAmount
public float getAmount() -
getReceiverID
public java.util.Optional<java.lang.String> getReceiverID() -
getName
public java.util.Optional<java.lang.String> getName() -
getIban
public java.util.Optional<java.lang.String> getIban() -
getAccountNumber
public java.util.Optional<java.lang.String> getAccountNumber()
-