ShopConnector::Base POD Doku was die Schnittstelle erwartet
[kivitendo-erp.git] / SL / ShopConnector / Base.pm
1 package SL::ShopConnector::Base;
2
3 use strict;
4
5 use parent qw(SL::DB::Object);
6 use Rose::Object::MakeMethods::Generic (
7   scalar => [ qw(config) ],
8 );
9
10 sub get_one_order  { die 'get_one_order needs to be implemented' }
11
12 sub get_new_orders { die 'get_order needs to be implemented' }
13
14 sub update_part    { die 'update_part needs to be implemented' }
15
16 sub get_article    { die 'get_article needs to be implemented' }
17
18 sub get_categories { die 'get_categories needs to be implemented' }
19
20 sub get_version    {
21
22   die 'get_version needs to be implemented';
23   # has to return a hashref with this structure:
24   # version has to return the connection error message
25   my $connect = {};
26   $connect->{success}         = 0 || 1;
27   $connect->{data}->{version} = '1234';
28   return $connect;
29 }
30
31 sub set_orderstatus { die 'set_orderstatus needs to be implemented' }
32
33 1;
34
35 __END__
36
37 =encoding utf-8
38
39 =head1 NAME
40
41   SL::ShopConnectorBase - this is the base class for shop connectors
42
43 =head1 SYNOPSIS
44
45
46 =head1 DESCRIPTION
47
48 =head1 AVAILABLE METHODS
49
50 =over 4
51
52 =item C<get_one_order>
53
54 =item C<get_new_orders>
55
56 =item C<update_part>
57
58 =item C<get_article>
59
60 =item C<get_categories>
61
62 =item C<get_version>
63
64 IMPORTANT: This call is used to test the connection and if succesful
65 it returns the version number of the shop. If not succesful the
66 returning function has to make sure a error string is returned in
67 the same data structure. Details of the returning hashref:
68
69  my $connect = {};
70  $connect->{success}         = 0 || 1;
71  $connect->{data}->{version} = '1234';
72  return $connect;
73
74 =item C<set_orderstatus>
75
76 =back
77
78 =head1 SEE ALSO
79
80 L<SL::ShopConnector::ALL>
81
82 =head1 BUGS
83
84 None yet. :)
85
86 =head1 AUTHOR
87
88 G. Richardson <lt>information@kivitendo-premium.deE<gt>
89 W. Hahn E<lt>wh@futureworldsearch.netE<gt>
90
91 =cut