NAME

Item - Main superclass for all the shopify objects.

DESCRIPTION

Class that basically holds a bunch of convenience methods that provide. All items, with the exception of WWW::Shopify::Model::Shop work pretty much in the same way,as detailed below.

METHODS

stats()

Returns a hash of all variables and their types that are given by shopify, and should not be modified. Stuff like created_at, etc..

mods()

Returns a hash of all variables and their types that are given by shopify, that can be modified, and will be passed in any update request.

minimal()

Returns an array of variables that must be passed in during the creation of the object.

USAGE

When you have a top level class (see the list in the SEE ALSO section below), you can perform the following operations on it, via a WWW::Shopify object.

getAll - Gets all objects of this type in the store.

my @Products = $SA->getAll('Product');

get - Gets an object with the specified ID.

my $Product = $SA->get('Product', 324234);

create - Creates the object that's passed in, on the Shopify store. Note that we pass in the hash all the necessary fields as required by WWW::Shopify::Model::Product's minimal() method.

my $Product = $SA->create(new WWW::Shopify::Model::Product({title => "My new Product", product_type => "Nice Product", vendor => "Our Shopify Store"}));

delete - Deletes the shopify object that's passed in.

my $Product = $SA->get('Product', 312443);
$SA->delete($Product);

update - Updates the shopify object that's pass in.

my $Product = $SA->get('Product', 312443);
$Product->vendor("A new vendor");
$SA->update($Product);

SEE ALSO

WWW::Shopify::Model::Product, WWW::Shopify::Model::Webhook, WWW::Shopify::Model::Product::Variant

AUTHOR

Adam Harrison

LICENSE

See LICENSE in the main directory.