Webservice::OVH::Order::Cart
use Webservice::OVH; my $ovh = Webservice::OVH->new_from_json("credentials.json"); my $cart = $ovh->order->new_cart(ovh_subsidiary => 'DE'); $cart->add_domain('www.domain.com'); $cart->delete;
Provides methods to manage shopping carts.
Internal Method to create the Cart object. This method is not ment to be called directly.
Parameter: $api_wrapper - ovh api wrapper object, $module - root object, $cart_id - api id
Return: Webservice::OVH::Order::Cart
Synopsis: Webservice::OVH::Order::Cart->_new($ovh_api_wrapper, $cart_id, $module);
Parameter: $api_wrapper - ovh api wrapper object, $module - root object - api id
Synopsis: Webservice::OVH::Order::Cart->_new($ovh_api_wrapper, $module, ovhSubsidiary => 'DE', decription => 'Shopping');
Retrieves properties. This method updates the intern property variable.
Return: HASH
Synopsis: my $properties = $cart->properties;
Exposed property value.
Return: VALUE
Synopsis: my $description = $cart->description;
Synopsis: my $expire = $cart->expire;
Synopsis: my $read_only = $cart->read_only;
Parameter: %params - key => value description expire
Synopsis: my $change = $cart->change(description => 'Shopping!');
When this cart is deleted on the api side, this method returns 0.
Synopsis: print "Valid" if $cart->is_valid;
Intern method to check validity. Difference is that this method carps an error.
Synopsis: $cart->_is_valid;
Deletes the cart api sided and sets this object invalid.
Synopsis: $cart->delete;
Returns the api id.
Synopsis: my $id = $cart->id;
Returns an Array of hashs with offers.
Parameter: $domain - domain name
Return: ARRAY
Synopsis: my $offers = $cart->offers_domain('mydomain.de');
Adds a domain request to a cart.
Parameter: $domain - domain name, %params - key => value duration offer_id quantity
Return: Webservice::OVH::Order::Cart::Item
Synopsis: my $item = $cart->add_domain('mydomain.de');
Returns an Hash with information for dns Zone pricing A Domain must be added before requestion info
Parameter: $dns - domain name
Return: HASHREF
Synopsis: my $offer = $cart->offers_dns;
Adds a dns Zone to a cart.
Synopsis: my $item = $cart->add_dns;
Returns an Array of hashes with offers.
Synopsis: my $offers = $cart->offers_domain_transfer('mydomain.de');
Adds a domain transfer request to a cart.
Synopsis: my $item = $cart->add_transfer('mydomain.de');
Returns checkout without generating an order.
Synopsis: my $checkout = $cart->info_checkout;
Generates an order. Makes the cart invalid. Returns the order.
Return: Webservice::OVH::Me::Order
Synopsis: my $order = $cart->checkout;
Produces an Array of Item Objects.
Synopsis: my $items = $cart->items;
Returns a single item by id
Parameter: $item_id - api id
Synopsis: my $item = $ovh->order->cart->item(123456);
Deletes all items from the cart.
Synopsis: $cart->clear;
To install Webservice::OVH, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Webservice::OVH
CPAN shell
perl -MCPAN -e shell install Webservice::OVH
For more information on module installation, please visit the detailed CPAN module installation guide.