Enhancement in the to and add methods in Airtime
The to and add methods in the Airtime function have been updated to now accept a currencyCode argument. This allows it to consider the currency type using either a string or a Currency object.
Removal of currencyIsInvalid method
The currencyIsInvalid method was deemed unnecessary and thus removed from the codebase to simplify the process.
Updating the lessThanMinimumAmount method
To offer more flexibility, the lessThanMinimumAmount method now accepts a traditional string as the currency code instead of rigidly requiring a Currency object.
Modification in AirtimeTransaction property initialization
The initialization of the phoneNumber property in AirtimeTransaction has been revised to utilise PhoneNumber::make() instead of a direct string. This promotes more effective and correct phone number handling.
Incorporation of new test case in AirtimeTest
A new test case has been added in tests/AirtimeTest.php to examine the functionality of adding a recipient using a Currency enum object. This ensures the robustness of the updated code.
Conservation of existing multiple recipient tests
The previous test case for adding multiple recipients will remain intact and untouched, emphasizing that these new changes will have no effect on the already established functionalities.
PR Summary
Enhancement in the
to
andadd
methods in Airtime Theto
andadd
methods in the Airtime function have been updated to now accept acurrencyCode
argument. This allows it to consider the currency type using either a string or aCurrency
object.Removal of
currencyIsInvalid
method ThecurrencyIsInvalid
method was deemed unnecessary and thus removed from the codebase to simplify the process.Updating the
lessThanMinimumAmount
method To offer more flexibility, thelessThanMinimumAmount
method now accepts a traditional string as the currency code instead of rigidly requiring aCurrency
object.Modification in
AirtimeTransaction
property initialization The initialization of thephoneNumber
property inAirtimeTransaction
has been revised to utilisePhoneNumber::make()
instead of a direct string. This promotes more effective and correct phone number handling.Incorporation of new test case in
AirtimeTest
A new test case has been added intests/AirtimeTest.php
to examine the functionality of adding a recipient using aCurrency
enum object. This ensures the robustness of the updated code.Conservation of existing multiple recipient tests The previous test case for adding multiple recipients will remain intact and untouched, emphasizing that these new changes will have no effect on the already established functionalities.