File Coverage

blib/lib/WebService/Xero.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1             package WebService::Xero;
2              
3 1     1   16278 use 5.006;
  1         4  
4 1     1   5 use strict;
  1         0  
  1         19  
5 1     1   3 use warnings;
  1         11  
  1         66  
6              
7             =head1 NAME
8              
9             WebService::Xero - Access Xero Accounting Package Public and Private Application API
10              
11             =head1 VERSION
12              
13             Version 0.11
14              
15             =cut
16              
17             our $VERSION = '0.11';
18              
19              
20             =head1 SYNOPSIS
21              
22              
23             The Xero API is a RESTful web service and uses the OAuth (v1.0a) L protocol to authenticate 3rd party applications.
24              
25             WebService::Xero aims primarily to simplify the authenticated access to Xero API service end-point by encapuslating the OAuth requirements.
26              
27             To enable API access see the Xero Getting started guide
28              
29             L
30              
31             and with the Configured Application Authentication Credentials from L
32              
33             this module will allow to to access the API Services.
34              
35             Xero provides Private, Public and Partner Applications. This module currently supports the Private and Public Application types.
36              
37             The simplest implementation uses a Private Application as follows:
38              
39             use WebService::Xero::Agent::PrivateApplication;
40             use Data::Dumper;
41              
42             my $xero = WebService::Xero::Agent::PrivateApplication->new( CONSUMER_KEY => 'YOUR_OAUTH_CONSUMER_KEY',
43             CONSUMER_SECRET => 'YOUR_OAUTH_CONSUMER_SECRET',
44             PRIVATE_KEY => "-----BEGIN RSA PRIVATE KEY-----.........."
45             );
46             ## AND THEN ACCESS THE API POINTS
47              
48             my $contact_struct = $xero->do_xero_api_call( 'https://api.xero.com/api.xro/2.0/Contacts' );
49              
50             print Dumper $contact_struct; ## should contain an array of hashes containing contact data.
51              
52              
53             =head2 Limits
54              
55             Xero API call limits are 1,000/day and 60/minute request per organisation limit as described at L.
56              
57             I have started to work at encpsulating the Xero data objects (Contact, Item, Invoice etc ) and will refine for the next release.
58              
59             =head1 AUTHOR
60              
61             Peter Scott, C<< >>
62              
63             =head1 BUGS
64              
65             Please report any bugs or feature requests to C, or through
66             the web interface at L. I will be notified, and then you'll
67             automatically be notified of progress on your bug as I make changes.
68              
69              
70              
71              
72             =head1 SUPPORT
73              
74             You can find documentation for this module with the perldoc command.
75              
76              
77              
78              
79             You can also look for information at:
80              
81             =over 4
82              
83             =item * Xero Developer Documentation
84              
85             L
86              
87             =item * Xero API DTD Schemas
88              
89             L
90              
91             =item * RT: CPAN's request tracker (report bugs here)
92              
93             L
94              
95             =item * AnnoCPAN: Annotated CPAN documentation
96              
97             L
98              
99             =item * CPAN Ratings
100              
101             L
102              
103             =item * Search CPAN
104              
105             L
106              
107             =back
108              
109              
110             =head1 ACKNOWLEDGEMENTS
111              
112             =over 4
113              
114             =item * Net::Xero for the OAUTH Code
115              
116             L
117              
118              
119             =item * Steve Bertrand for advice on Perlmonks
120              
121             L
122              
123             =back
124              
125              
126             =head1 LICENSE AND COPYRIGHT
127              
128             Copyright 2016 Peter Scott.
129              
130             This program is free software; you can redistribute it and/or modify it
131             under the terms of the the Artistic License (2.0). You may obtain a
132             copy of the full license at:
133              
134             L
135              
136             Any use, modification, and distribution of the Standard or Modified
137             Versions is governed by this Artistic License. By using, modifying or
138             distributing the Package, you accept this license. Do not use, modify,
139             or distribute the Package, if you do not accept this license.
140              
141             If your Modified Version has been derived from a Modified Version made
142             by someone other than you, you are nevertheless required to ensure that
143             your Modified Version complies with the requirements of this license.
144              
145             This license does not grant you the right to use any trademark, service
146             mark, tradename, or logo of the Copyright Holder.
147              
148             This license includes the non-exclusive, worldwide, free-of-charge
149             patent license to make, have made, use, offer to sell, sell, import and
150             otherwise transfer the Package with respect to any patent claims
151             licensable by the Copyright Holder that are necessarily infringed by the
152             Package. If you institute patent litigation (including a cross-claim or
153             counterclaim) against any party alleging that the Package constitutes
154             direct or contributory patent infringement, then this Artistic License
155             to you shall terminate on the date that such litigation is filed.
156              
157             Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
158             AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
159             THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
160             PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
161             YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
162             CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
163             CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
164             EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
165              
166              
167             =cut
168              
169             1; # End of WebService::Xero