Alex Peters > Finance-Bank-Bankwest-1.2.1 > Finance::Bank::Bankwest::Transaction

Download:
Finance-Bank-Bankwest-1.2.1.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  1
View/Report Bugs
Module Version: v1.2.1   Source   Latest Release: Finance-Bank-Bankwest-1.2.8

NAME ^

Finance::Bank::Bankwest::Transaction - representation of an account transaction

VERSION ^

This module is part of distribution Finance-Bank-Bankwest v1.2.1.

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

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." May be one of the following values (or even something else):

CHQ

Debit via cheque.

DAU

Authorisation only.

DEP

Non-salary deposit or EFTPOS refund.

DFD

Deposit via a Fast Deposit box.

DID

Dishonoured debit, e.g. bounced cheque.

DRI

Debit interest.

ENQ

Declined transaction.

FEE

Bank fee, e.g. bank cheque fee.

NAR

Information-only transaction without a credit or debit, such as notification of an ATM fee being paid by Bankwest or a breakdown of fees included in another transaction (such as foreign currency conversion).

PAY

Salary deposit.

TFC

Internal credit from another Bankwest account.

TFD

BPAY or internal debit to another Bankwest account.

WDC

Credit withdrawal.

WDI

Credit withdrawal by an international merchant.

WDL

ATM, EFTPOS or "pay anyone" withdrawal, or direct debit.

METHODS ^

equals

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

syntax highlighting: