The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

PagSeguro::API::Notification - Notification Class for PagSeguro::API module

SYNOPSIS

    use PagSeguro::API;

    # new instance
    my $ps = PagSeguro::API->new(
        email=> 'foo@bar.com', token=>'95112EE828D94278BD394E91C4388F20'
    );


    # notification obj
    my $t = $ps->notification;

    # load notification by code
    my $notification = $t->load('766B9C-AD4B044B04DA-77742F5FA653-E1AB24');
    

    # notification returns perl hash
    say $notification->{code}; # 00000000-0000-0000-0000-000000000000

DESCRIPTION

PagSeguro::API::Notification is a class that provide access to transaction api search methods.

ACCESSORS

Public properties and their accessors

resource

    my $t = $ps->notification;
    say $t->resource('BASE_URI');

PagSeguro::API::Resource is a container that store all connectoin url parts and some other things;

METHODS

new

    # new instance
    my $ps = PagSeguro::API::Notification->new(
        email => 'foo@bar.com', token => '95112EE828D94278BD394E91C4388F20'
    );

load

    # getting notification class instance
    my $t = $ps->notification;

    # load notification by code
    my $notification = $t->load('00000000-0000-0000-0000-000000000000');

    say $notification->{code};

This method will load a notification by code and returns a perl hash as success result or undef as error or not found;

AUTHOR

2013 (c) Bivee http://bivee.com.br

Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Bivee.

This is a free software; you can redistribute it and/or modify it under the same terms of Perl 5 programming languagem system itself.