Flash-FLAP

 view release on metacpan or  search on metacpan

doc/examples/petmarket/petmarket/api/cartservice.pm  view on Meta::CPAN

package petmarket::api::cartservice;


# Copyright (c) 2003 by Vsevolod (Simon) Ilyushchenko. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.

#This is server side for the Macromedia's Petmarket example.
#See http://www.simonf.com/flap for more information.

use warnings;
no warnings "uninitialized";
use strict;

use petmarket::api::dbConn;
use vars qw/@ISA/;
@ISA=("petmarket::api::dbConn");

use Flash::FLAP::Util::Object;

sub methodTable
{
    return {
        "getStatesAndCountries" => {
            "description" => "Returns list of states and countries.",
            "access" => "remote", 
        },
        "getCreditCards" => {
            "description" => "Returns list of allowed credit cards.",
            "access" => "remote", 
        },
        "getShippingMethods" => {
            "description" => "Returns list of shipping methods.",
            "access" => "remote", 
			"returns" => "AMFObject"
        },
        "validateCartOID" => {
            "description" => "Validate that the supplied rat OID is good.",
            "access" => "remote", 
        },
        "getCartItems" => {
            "description" => "List the items in the cart with the given ID",
            "access" => "remote", 
			"returns" => "AMFObject"
        },
        "getCartTotal" => {
            "description" => "Return the total number of items and total cost of the cart with the given ID",
            "access" => "remote", 
        },
        "newCart" => {
            "description" => "Returns id of a new Cart object.",
            "access" => "remote", 
        },
        "addCartItem" => {
            "description" => "Adds the given item to the given cart and returns the new totals",
            "access" => "remote", 
        },
        "updateCartItem" => {
            "description" => "Updates the given item in the given cart and returns the new totals",
            "access" => "remote", 
        },
        "deleteCartItem" => {
            "description" => "Deletes the given item from the given cart and returns the new totals",
            "access" => "remote", 
        },
    };
    
}



( run in 0.895 second using v1.01-cache-2.11-cpan-5511b514fd6 )