NAME
Finance::Bank::Bankwest::Transaction - representation of an account transaction
VERSION
This module is part of distribution Finance-Bank-Bankwest v1.2.8.
This distribution's version numbering follows the conventions defined at semver.org.
SYNOPSIS
$transaction->date; # '31/12/2012'
$transaction->date_dt; # a DateTime instance
$transaction->narrative; # '1 BANK CHEQUE FEE - BWA CUSTOMER'
$transaction->cheque_num; # undef
$transaction->amount; # -10.00
$transaction->type; # 'FEE'
SAME_TRANSACTION if $this_txn->equals($other_txn);
SAME_TRANSACTION if $this_txn eq $other_txn;
DIFFERENT_TRANSACTION if $this_txn ne $other_txn;
DESCRIPTION
Instances of this module are returned by "transactions" in Finance::Bank::Bankwest::Session.
ATTRIBUTES
date
A string in DD/MM/YYYY
format representing the date of the transaction.
date_dt
Added in v1.2.0.
The "date" as a DateTime instance with a floating time zone.
require-s the DateTime module when used. use DateTime
in any code that relies on this attribute to prevent runtime failures caused by the DateTime module not being installed.
narrative
A description of the transaction.
cheque_num
The cheque number for cheque withdrawals, or undef
if not applicable.
amount
A positive or negative value representing the credit or debit value of the transaction respectively, or undef
if not applicable (such as for fee notices or declined transactions).
type
The transaction "type." Defined for every transaction in savings accounts (e.g. Zero Transaction). Not defined for every transaction in credit card accounts.
If defined, may be one of the following values (although Bankwest may not always assign the most relevant code to a particular transaction):
- CHQ
-
withdrawal (cheque)
- CRI
-
credit interest
- DAT
-
ATM deposit
- DAU
-
debit authorisation (i.e. "Authorisation Only" transactions)
- DEC
-
Express Commercial Deposit
- DEP
-
deposit (includes EFTPOS refunds)
- DFD
-
Fast Deposit Box deposit
- DIC
-
dishonoured credit
- DID
-
dishonoured debit (e.g. bounced cheques)
- DRI
-
debit interest
- DRR
-
debit reversal
- ENQ
-
balance enquiry (includes declined transactions)
- FEE
-
fee raising (e.g. bank cheque fees)
- FER
-
fee refund
- NAR
-
narrative (information only, e.g. notification of ATM fees paid by Bankwest, breakdown of foreign currency conversion fees included in another transaction)
- PAD
-
ATM deposit
- PAY
-
payroll (i.e. salary deposits)
- PEN
-
pension
- PPA
-
POS payment authorisation
- TAC
-
government tax adjustment (credit)
- TAX
-
government tax raising
- TFC
-
transfer (credit)
- TFD
-
transfer (debit) (includes BPAY payments)
- TFN
-
TFN raising
- WDC
-
Debit MasterCard withdrawal (Australia)
- WDI
-
Debit MasterCard withdrawal (international)
- WDL
-
withdrawal (includes direct debits and ATM, EFTPOS and "pay anyone" withdrawals)
METHODS
equals
Added in v1.1.0.
if ($this_txn->equals($other_txn)) {
# $this_txn and $other_txn represent the exact same transaction
...
}
True if both this transaction and the specified one represent an identical transaction; false otherwise.
Perl's eq
and ne
operators are also overload-ed for Transaction objects, allowing the following code to work as expected:
if ($this_txn eq $other_txn) {
# $this_txn and $other_txn represent the exact same transaction
...
}
if ($this_txn ne $other_txn) {
# $this_txn and $other_txn DO NOT represent the exact same transaction
...
}
SEE ALSO
AUTHOR
Alex Peters <lxp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Alex Peters.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution.