WebshopApi: ShopConnector Base und ALL
authorWerner Hahn <wh@futureworldsearch.net>
Fri, 22 Sep 2017 00:40:35 +0000 (02:40 +0200)
committerWerner Hahn <wh@futureworldsearch.net>
Tue, 26 Sep 2017 10:25:02 +0000 (12:25 +0200)
SL/ShopConnector/ALL.pm [new file with mode: 0644]
SL/ShopConnector/Base.pm [new file with mode: 0644]

diff --git a/SL/ShopConnector/ALL.pm b/SL/ShopConnector/ALL.pm
new file mode 100644 (file)
index 0000000..809f74a
--- /dev/null
@@ -0,0 +1,34 @@
+package SL::ShopConnector::ALL;
+
+use strict;
+
+my %shop_connector_by_name = (
+);
+
+my %shop_connector_by_connector = (
+);
+
+my @shop_connector_order = qw(
+  shopware
+);
+
+my @shop_connectors = (
+);
+
+
+sub all_shop_connectors {
+  map { $shop_connector_by_name{$_} } @shop_connector_order;
+}
+
+sub shop_connector_class_by_name {
+  $shop_connector_by_name{$_[1]};
+}
+
+sub shop_connector_class_by_connector {
+  $shop_connector_by_connector{$_[1]};
+}
+
+sub connectors {
+  \@shop_connectors;
+}
+1;
diff --git a/SL/ShopConnector/Base.pm b/SL/ShopConnector/Base.pm
new file mode 100644 (file)
index 0000000..19a712f
--- /dev/null
@@ -0,0 +1,68 @@
+package SL::ShopConnector::Base;
+
+use strict;
+
+use parent qw(SL::DB::Object);
+use Rose::Object::MakeMethods::Generic (
+  scalar => [ qw(config) ],
+);
+
+sub get_order      { die 'get_order needs to be implemented' }
+
+sub get_new_orders { die 'get_order needs to be implemented' }
+
+sub update_part    { die 'update_part needs to be implemented' }
+
+sub get_article    { die 'get_article needs to be implemented' }
+
+sub get_categories { die 'get_order needs to be implemented' }
+
+sub get_version    { die 'get_order needs to be implemented' }
+
+1;
+
+__END__
+
+=encoding utf-8
+
+=head1 NAME
+
+  SL::ShopConnectorBase - this is the base class for shop connectors
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+=head1 AVAILABLE METHODS
+
+=over 4
+
+=item C<get_order>
+
+=item C<get_new_orders>
+
+=item C<update_part>
+
+=item C<get_article>
+
+=item C<get_categories>
+
+=item C<get_version>
+
+=back
+
+=head1 SEE ALSO
+
+L<SL::ShopConnector::ALL>
+
+=head1 BUGS
+
+None yet. :)
+
+=head1 AUTHOR
+
+G. Richardson <lt>information@kivitendo-premium.deE<gt>
+W. Hahn E<lt>wh@futureworldsearch.netE<gt>
+
+=cut