- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
  - _new
  - new_cart
  - carts
  - cart
  - hosting
  - email
  - domain

# NAME

Webservice::OVH::Order

# SYNOPSIS

use Webservice::OVH;

my $ovh = Webservice::OVH->new_from_json("credentials.json");

my $carts = $ovh->order->carts; my $cart_id = $carts->[0]->id; my $cart = $ovh->order->cart($cart_id);

my $new_cart = $ovh->order->new_cart(ovh_subsidiary => 'DE');

$ovh->order->hosting->web; $ovh->order->email->domain; $ovh->order->domain->zone;

# DESCRIPTION

Module that support carts and domain/transfer orders at the moment

# METHODS

## _new

Internal Method to create the order object. This method is not ment to be called external.

- Parameter: $api_wrapper - ovh api wrapper object, $module - root object

- Return: Webservice::OVH::Order

- Synopsis: Webservice::OVH::Order->_new($ovh_api_wrapper, $self);

## new_cart

Creates a new 'shopping' cart. Items can be put into it, to create orders.

- Parameter: %params - ovh_subsidiary => 'DE' (required) expire => DateTime-str (optional) description => "shopping" (optional)

- Return: Webservice::OVH::Order::Cart

- Synopsis: my $cart = $ovh->order->new_cart(ovh_subsidiary => 'DE');

## carts

Produces an array of all available carts that are connected to the used account.

- Return: ARRAY

- Synopsis: my $carts = $ovh->order->carts();

## cart

Returns a single cart by id

- Parameter: cart_id - cart id

- Return: Webservice::OVH::Order::Cart

- Synopsis: my $cart = $ovh->order->cart(1234567);

## hosting

Gives Acces to the /order/hosting/ methods of the ovh api

- Return: Webservice::OVH::Order::Hosting

- Synopsis: $ovh->order->hosting

## email

Gives Acces to the /order/email/ methods of the ovh api

- Return: Webservice::OVH::Order::Email

- Synopsis: $ovh->order->email

## domain

Gives Acces to the /order/domain/ methods of the ovh api

- Return: Webservice::OVH::Order::Domain

- Synopsis: $ovh->order->domain