Akado-Account

 view release on metacpan or  search on metacpan

lib/Akado/Account.pm  view on Meta::CPAN


Akado::Account - get internet provider Akado account info

=head1 VERSION

version 1.2.0

=head1 SYNOPSIS

Akado is the internet provider that works in Moscow, Russia.
L<http://www.akado.ru/>

Every Akado customer has access to the site L<https://office.akado.ru/> where
he can see his account info. This module creates Perl object that gets account
info from that site.

Unfortunately Akdado account site has no API, so this module acts as a browser
to get needed info.

Every module method dies in case of error.

=head1 DESCRIPTION

Akado::Account version numbers uses Semantic Versioning standart.
Please visit L<http://semver.org/> to find out all about this great thing.

=head1 METHODS

=head2 new

This a constuctor. It creates object. The constractor will not access the
account site. All network interaction is made in the methods that return data.

    my $aa = Akado::Account->new({
        login => $login,

lib/Akado/Account.pm  view on Meta::CPAN

    });

=head2 get_balance

It will return number. The number is the sum of money that is left on the
user account. The currencty is RUB (Russian rouble).

    say $aa->get_balance();     # will print '749.82', or something like this

If the object hasn't accessed the Akado account site
L<https://office.akado.ru/> since the object was created, the method will
access site, get data from it and store it in the object. The object will
access Akado site only once, after saving data in the object all methods use
that cached data.

=head2 get_next_month_payment

It will return number. The number is the sum of money that the user will have
to pay for the next month. The currencty is RUB (Russian rouble).

    say $aa->get_next_month_payment();

If the object hasn't accessed the Akado account site
L<https://office.akado.ru/> since the object was created, the method will
access site, get data from it and store it in the object. The object will
access Akado site only once, after saving data in the object all methods use
that cached data.

=begin comment _get_cached_parsed_data

B<Get:> 1) $self

B<Return:> 1) $parsed_data

t/_parse_xml.t  view on Meta::CPAN

    );
}

main();
__END__
<?xml version="1.0" encoding="UTF-8"?>
<?akado-request A1-B2?>
<?xml-stylesheet type="text/xsl" href="/interface/templates/finance.xsl?C3-D4"?>
<main responseType="accepted" crc="40252555">
  <billing income-monthly="0" expense-monthly="484" balance-begin="1936" balance-end="1452" last-day="06.05.2014" request-date="06.05.2014">
    <income id="383554863" amount="0" type="1" comment="Датой платежа считается дата зачисления средств на Ваш лицевой счет в АКАДО." description="Поступления на счет в...
    <expense id="383554875" amount="484" type="2" description="Стоимость услуг в мае 2014">
      <bill id="383554876" parent="383554875" amount="4" description="Аренда кабельного модема"/>
      <bill id="383554877" parent="383554875" amount="480" description="Услуги интернет">
        <bill id="383554878" parent="383554877" amount="390" description="АКАДО Интернет 15 (Абонентская плата - av12345)"/>
        <bill id="383554879" parent="383554877" amount="90" description="АКАДО Интернет 15 (Поддержка внешнего IP-адреса - av12345)"/>
      </bill>
    </expense>
    <bill id="383554877" parent="383554875" amount="480" description="Услуги интернет">
      <bill id="383554878" parent="383554877" amount="390" description="АКАДО Интернет 15 (Абонентская плата - av12345)"/>
      <bill id="383554879" parent="383554877" amount="90" description="АКАДО Интернет 15 (Поддержка внешнего IP-адреса - av12345)"/>
    </bill>
    <bill id="383554886" amount="0" type="5" comment="Рекомендуемая сумма оплаты не включает доплату за услуги в текущем месяце." description="Рекомендуемая сумма для...
      <bill id="383554887" parent="383554886" amount="1452" description="Остаток на счете на 31.05.2014"/>
      <bill id="383554888" parent="383554886" amount="484" description="Стоимость услуг в следующем календарном месяце">
        <bill id="383554889" parent="383554888" amount="480" description="УСЛУГИ ИНТЕРНЕТ"/>
        <bill id="383554890" parent="383554888" amount="4" description="Аренда кабельного модема"/>
      </bill>
    </bill>
    <bill id="383554888" parent="383554886" amount="484" description="Стоимость услуг в следующем календарном месяце">
      <bill id="383554889" parent="383554888" amount="480" description="УСЛУГИ ИНТЕРНЕТ"/>
      <bill id="383554890" parent="383554888" amount="4" description="Аренда кабельного модема"/>
    </bill>
    <prepay/>
  </billing>
</main>



( run in 0.621 second using v1.01-cache-2.11-cpan-df04353d9ac )