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

WebService::Eulerian::Analytics::Website::Order - access to the Order service for a given website

DESCRIPTION

This module allow you to access the Order service holding information about all the orders generated by the given website.

SYNOPSIS

        use WebService::Eulerian::Analytics::Website::Order;
        #
        my $api = new WebService::Eulerian::Analytics::Website::Order(
         apikey => 'THE KEY PROVIDED BY YOUR ACCOUNT MANAGER FOR API ACCESS',
         host   => 'THE HOST ON WHICH THE API IS HOSTED'
        );

METHODS

replay : replay an order at a given time and inject it in Eulerian Analytics (in direct access channel) with detailled information.

input

  • hash reference with the following parameters :

    o reference : order reference, mandatory and must be unique for the website

    o amount : amount of the order, mandatory and must be a number

    o epoch : date at which the order was made, mandatory and the format muse be epoch time

    o type : type of the order, it's a string describing the type of the order, it's optionnal (retail, holiday, flight, vacation, etc ...)

    o payment : type of the order, it's a string describing the type of the payment, it's optionnal (creditcard, check, wire, etc ...)

output

  • $order_id if everything is fine, otherwise 0 and check fault method

sample

        my $order_id = $api->replay( $my_website_id, {
         reference      => 'ORDER_REFERENCE_TO_REPLAYED',
         amount         => 'ORDER_AMOUNT',
         epoch          => 'ORDER_DATE_IN_EPOCH_FORMAT',
         type           => 'ORDER_TYPE',
         payment        => 'ORDER_PAYMENT',
        });
        #
        if ( $api->fault ) {
         die $api->faultstring();
        }
        #
        print "Order id following successfull replay : $order_id\n";

SEE ALSO

WebService::Eulerian::Analytics

AUTHOR

Mathieu Jondet <mathieu@eulerian.com>

COPYRIGHT

Copyright (c) 2008 Eulerian Technologies Ltd http://www.eulerian.com

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA